v1.1.0: telekinetic grab now work on throned DK, and Dk leaves his throne more consistently
This commit is contained in:
parent
e43a0b56da
commit
d99e42eec5
|
@ -6,6 +6,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DwarfKing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
@ -37,6 +38,14 @@ public class TelekineticGrab extends TargetedSpell {
|
||||||
protected void affectTarget(Ballistica bolt, Hero hero) {
|
protected void affectTarget(Ballistica bolt, Hero hero) {
|
||||||
Char ch = Actor.findChar(bolt.collisionPos);
|
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){
|
if (ch != null && ch.buff(PinCushion.class) != null){
|
||||||
|
|
||||||
Item item = ch.buff(PinCushion.class).grabOne();
|
Item item = ch.buff(PinCushion.class).grabOne();
|
||||||
|
|
|
@ -279,6 +279,7 @@ public class CityBossLevel extends Level {
|
||||||
boss.state = boss.WANDERING;
|
boss.state = boss.WANDERING;
|
||||||
boss.pos = pointToCell(arena.center());
|
boss.pos = pointToCell(arena.center());
|
||||||
GameScene.add( boss );
|
GameScene.add( boss );
|
||||||
|
boss.beckon(Dungeon.hero.pos);
|
||||||
|
|
||||||
if (heroFOV[boss.pos]) {
|
if (heroFOV[boss.pos]) {
|
||||||
boss.notice();
|
boss.notice();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user