Esempio n. 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();
 }
Esempio n. 2
0
 public Combat(Character p1, Character p2, Area loc, int code) {
   this(p1, p2, loc);
   stance = new Neutral(p1, p2);
   message = "";
   timer = 0;
   switch (code) {
     case 1:
       p2.undress(this);
       p1.emote(Emotion.dominant, 50);
       p2.emote(Emotion.nervous, 50);
     default:
   }
   p1.state = State.combat;
   p2.state = State.combat;
 }