Example #1
0
 public void intervene(Character intruder, Character assist) {
   Character target;
   if (p1 == assist) {
     target = p2;
   } else {
     target = p1;
   }
   if (target.resist3p(this, intruder, assist)) {
     target.gainXP(20 + target.lvlBonus(intruder));
     intruder.gainXP(10 + intruder.lvlBonus(target));
     intruder.getArousal().empty();
     if (intruder.has(Trait.insatiable)) {
       intruder.getArousal().restore((int) (intruder.getArousal().max() * 0.2D));
     }
     target.undress(this);
     intruder.defeated(target);
     intruder.defeated(assist);
   } else {
     intruder.intervene3p(this, target, assist);
     assist.victory3p(this, target, intruder);
     phase = 2;
     if (!(p1.human() || p2.human() || intruder.human())) {
       end();
     } else if (intruder.human()) {
       Global.gui().watchCombat(this);
     }
   }
   updateMessage();
 }