v0.6.2: teleportation effects now set mob ai to wandering
This commit is contained in:
parent
02508571c6
commit
98df73743c
|
@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
|
@ -231,6 +232,9 @@ public class LloydsBeacon extends Artifact {
|
|||
} else {
|
||||
|
||||
ch.pos = pos;
|
||||
if (ch instanceof Mob && ((Mob) ch).state == ((Mob) ch).HUNTING){
|
||||
((Mob) ch).state = ((Mob) ch).WANDERING;
|
||||
}
|
||||
ch.sprite.place(ch.pos);
|
||||
ch.sprite.visible = Dungeon.level.heroFOV[pos];
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Sheep;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
|
||||
|
@ -165,6 +166,7 @@ public class CursedWand {
|
|||
GLog.w( Messages.get(ScrollOfTeleportation.class, "no_tele") );
|
||||
} else {
|
||||
ch.pos = pos;
|
||||
if (((Mob) ch).state == ((Mob) ch).HUNTING) ((Mob) ch).state = ((Mob) ch).WANDERING;
|
||||
ch.sprite.place(ch.pos);
|
||||
ch.sprite.visible = Dungeon.level.heroFOV[pos];
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
|
@ -53,6 +54,9 @@ public class Displacing extends Weapon.Enchantment {
|
|||
}
|
||||
|
||||
defender.pos = newPos;
|
||||
if (defender instanceof Mob && ((Mob) defender).state == ((Mob) defender).HUNTING){
|
||||
((Mob) defender).state = ((Mob) defender).WANDERING;
|
||||
}
|
||||
defender.sprite.place( defender.pos );
|
||||
defender.sprite.visible = Dungeon.level.heroFOV[defender.pos];
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
|
@ -68,6 +69,9 @@ public class TeleportationTrap extends Trap {
|
|||
} else {
|
||||
|
||||
ch.pos = pos;
|
||||
if (ch instanceof Mob && ((Mob) ch).state == ((Mob) ch).HUNTING){
|
||||
((Mob) ch).state = ((Mob) ch).WANDERING;
|
||||
}
|
||||
ch.sprite.place(ch.pos);
|
||||
ch.sprite.visible = Dungeon.level.heroFOV[pos];
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ public class Fadeleaf extends Plant {
|
|||
if (newPos != -1 && !Dungeon.bossLevel()) {
|
||||
|
||||
ch.pos = newPos;
|
||||
if (((Mob) ch).state == ((Mob) ch).HUNTING) ((Mob) ch).state = ((Mob) ch).WANDERING;
|
||||
ch.sprite.place( ch.pos );
|
||||
ch.sprite.visible = Dungeon.level.heroFOV[ch.pos];
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user