From e4291d86ffa8421dfa95988535ab04a211332220 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 5 Feb 2021 12:53:27 -0500 Subject: [PATCH] v0.9.2: ethereal chains can no longer pull a rooted hero --- core/src/main/assets/messages/items/items.properties | 1 + .../items/artifacts/EtherealChains.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 28612b0ef..b7b77b744 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -304,6 +304,7 @@ items.artifacts.driedrose$ghosthero.desc=A frail looking ethereal figure with a ##back to artifacts items.artifacts.etherealchains.name=ethereal chains items.artifacts.etherealchains.ac_cast=CAST +items.artifacts.etherealchains.rooted=Your chains cannot pull you while you are rooted. items.artifacts.etherealchains.no_charge=Your chains do not have enough charge. items.artifacts.etherealchains.cursed=You can't use cursed chains. items.artifacts.etherealchains.does_nothing=That won't do anything. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java index 244d7b21e..0f4e6f54d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java @@ -189,9 +189,15 @@ public class EtherealChains extends Artifact { })); } - //pulls the hero along the chain to the collosionPos, if possible. + //pulls the hero along the chain to the collisionPos, if possible. private void chainLocation( Ballistica chain, final Hero hero ){ - + + //don't pull if rooted + if (hero.rooted){ + GLog.w( Messages.get(EtherealChains.class, "rooted") ); + return; + } + //don't pull if the collision spot is in a wall if (Dungeon.level.solid[chain.collisionPos]){ GLog.i( Messages.get(this, "inside_wall"));