Beispiel #1
0
 @Override
 public String receive(Combat c, int damage, Result modifier, Character target) {
   if (modifier == Result.miss) {
     return String.format(
         "%s tries to yank off %s %s, but %s %s to hang onto it.",
         getSelf().subject(),
         target.nameOrPossessivePronoun(),
         stripped.getName(),
         target.pronoun(),
         target.action("manage"));
   } else {
     String msg =
         String.format(
             "%s grabs a hold of %s %s and yanks it off before %s can stop %s.",
             getSelf().subject(),
             target.nameOrPossessivePronoun(),
             stripped.getName(),
             target.pronoun(),
             getSelf().directObject());
     if (modifier == Result.critical && extra != null) {
       msg +=
           String.format(
               " Before %s can react, %s also strips off %s %s!",
               target.subject(), getSelf().name, target.possessivePronoun(), extra.getName());
     }
     return msg;
   }
 }
Beispiel #2
0
 @Override
 public String deal(Combat c, int damage, Result modifier, Character target) {
   if (modifier == Result.miss) {
     return "You attempt to strip off "
         + target.name()
         + "'s "
         + stripped.getName()
         + ", but she shoves you away.";
   } else {
     String msg =
         "After a brief struggle, you manage to pull off "
             + target.name()
             + "'s "
             + stripped.getName()
             + ".";
     if (modifier == Result.critical && extra != null) {
       msg +=
           String.format(
               " Taking advantage of the situation, you also" + " manage to snag %s %s!",
               target.possessivePronoun(), extra.getName());
     }
     return msg;
   }
 }