@Override
  public void unInvoke() {
    // undo the affects of this spell
    if (!(affected instanceof MOB)) {
      super.unInvoke();
      return;
    }
    final MOB mob = (MOB) affected;
    if (canBeUninvoked()) mob.tell(L("Your teleportation ward dissipates."));

    super.unInvoke();
  }
예제 #2
0
 @Override
 public void affectCharStats(MOB affected, CharStats affectableStats) {
   super.affectCharStats(affected, affectableStats);
   affectableStats.setStat(
       CharStats.STAT_STRENGTH,
       (int) Math.round(CMath.div(affectableStats.getStat(CharStats.STAT_STRENGTH), 2.0)));
 }
예제 #3
0
 @Override
 public void unInvoke() {
   final Physical affected = super.affected;
   super.unInvoke();
   if (canBeUninvoked()) {
     if (affected instanceof MOB) ((MOB) affected).tell(L("Your anti-plant shell fades."));
   }
 }
예제 #4
0
  @Override
  public void unInvoke() {
    if (!(affected instanceof MOB)) return;
    final MOB mob = (MOB) affected;

    super.unInvoke();
    if (canBeUninvoked()) mob.tell(L("You begin to feel more like your regular cranky self."));
  }
예제 #5
0
  public void unInvoke() {
    // undo the affects of this spell
    if ((affected == null) || (!(affected instanceof MOB))) return;
    MOB mob = (MOB) affected;
    if (canBeUninvoked()) mob.tell("Your magic missile protection dissipates.");

    super.unInvoke();
  }
  @Override
  public void unInvoke() {
    if (!(affected instanceof MOB)) return;
    final MOB mob = (MOB) affected;

    super.unInvoke();
    if (canBeUninvoked()) mob.tell(L("Your sight becomes less keen."));
  }
예제 #7
0
  @Override
  public void unInvoke() {
    // undo the affects of this spell
    if (!(affected instanceof MOB)) return;
    final MOB mob = (MOB) affected;
    super.unInvoke();

    if (canBeUninvoked()) mob.tell(L("You begin to feel better."));
  }
예제 #8
0
  @Override
  public void unInvoke() {
    // undo the affects of this spell
    if (!(affected instanceof MOB)) return;
    final MOB mob = (MOB) affected;
    if (canBeUninvoked()) mob.tell(L("Your uninhibiting protection dissipates."));

    super.unInvoke();
  }
예제 #9
0
 @Override
 public void unInvoke() {
   if ((affected != null)
       && (affected instanceof Item)
       && (((Item) affected).owner() != null)
       && (((Item) affected).owner() instanceof Room))
     ((Room) ((Item) affected).owner())
         .showHappens(CMMsg.MSG_OK_ACTION, L("@x1 stops moving.", affected.name()));
   super.unInvoke();
 }
예제 #10
0
  @Override
  public void unInvoke() {
    if (!(affected instanceof MOB)) return;
    final MOB mob = (MOB) affected;

    super.unInvoke();
    if (canBeUninvoked())
      if ((mob.location() != null) && (!mob.amDead()))
        mob.location()
            .show(
                mob,
                null,
                CMMsg.MSG_OK_VISUAL,
                L("<S-YOUPOSS> ability to breathe underwater fades."));
  }
예제 #11
0
 @Override
 public void affectCharStats(MOB affected, CharStats affectableStats) {
   super.affectCharStats(affected, affectableStats);
   final int[] breatheables = affectableStats.getBreathables();
   if (breatheables.length == 0) return;
   if ((lastSet != breatheables) || (newSet == null)) {
     newSet =
         Arrays.copyOf(
             affectableStats.getBreathables(), affectableStats.getBreathables().length + 2);
     newSet[newSet.length - 1] = RawMaterial.RESOURCE_SALTWATER;
     newSet[newSet.length - 2] = RawMaterial.RESOURCE_FRESHWATER;
     Arrays.sort(newSet);
     lastSet = breatheables;
   }
   affectableStats.setBreathables(newSet);
 }
예제 #12
0
 public void unInvoke() {
   if ((canBeUninvoked()) && (affected != null)) {
     if (affected instanceof Exit) {
       Exit exit = (Exit) affected;
       exit.setDoorsNLocks(
           exit.hasADoor(),
           !exit.hasADoor(),
           exit.defaultsClosed(),
           exit.hasALock(),
           exit.hasALock(),
           exit.defaultsLocked());
     } else if (affected instanceof Container) {
       Container container = (Container) affected;
       container.setLidsNLocks(
           container.hasALid(), !container.hasALid(), container.hasALock(), container.hasALock());
     }
   }
   super.unInvoke();
 }
예제 #13
0
 public void affectCharStats(MOB affectedMOB, CharStats affectedStats) {
   super.affectCharStats(affectedMOB, affectedStats);
   affectedStats.setStat(
       CharStats.STAT_SAVE_FIRE, affectedStats.getStat(CharStats.STAT_SAVE_FIRE) + 100);
 }
예제 #14
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_FLYING);
 }
예제 #15
0
 @Override
 public void setAffectedOne(Physical affected) {
   if (super.affected != affected) pointsRemaining = 3 + (adjustedLevel(invoker(), 0) / 5);
   super.setAffectedOne(affected);
 }
예제 #16
0
 @Override
 public void affectCharStats(MOB affected, CharStats affectableStats) {
   super.affectCharStats(affected, affectableStats);
   affectableStats.setStat(
       CharStats.STAT_CHARISMA, affectableStats.getStat(CharStats.STAT_CHARISMA) + 6);
 }
예제 #17
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(mask & mask2);
 }
예제 #18
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSpeed(CMath.div(affectableStats.speed(), 2.0));
 }
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_INVISIBLE);
 }