v1.1.0: telekinetic grab now work on throned DK, and Dk leaves his throne more consistently

This commit is contained in:
Evan Debenham 2021-12-06 14:55:23 -05:00
parent e43a0b56da
commit d99e42eec5
2 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DwarfKing;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@ -37,6 +38,14 @@ public class TelekineticGrab extends TargetedSpell {
protected void affectTarget(Ballistica bolt, Hero hero) {
Char ch = Actor.findChar(bolt.collisionPos);
//special logic for DK when he is on his throne
if (ch == null && bolt.path.size() > bolt.dist+1){
ch = Actor.findChar(bolt.path.get(bolt.dist+1));
if (!(ch instanceof DwarfKing && Dungeon.level.solid[ch.pos])){
ch = null;
}
}
if (ch != null && ch.buff(PinCushion.class) != null){
Item item = ch.buff(PinCushion.class).grabOne();

View File

@ -279,6 +279,7 @@ public class CityBossLevel extends Level {
boss.state = boss.WANDERING;
boss.pos = pointToCell(arena.center());
GameScene.add( boss );
boss.beckon(Dungeon.hero.pos);
if (heroFOV[boss.pos]) {
boss.notice();