v0.7.5d: fixed missile weapons sticking to corrupted targets

This commit is contained in:
Evan Debenham 2019-10-18 18:21:34 -04:00
parent da1f953d9d
commit 4fba6ff70b

View File

@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
@ -200,7 +201,7 @@ abstract public class MissileWeapon extends Weapon {
decrementDurability();
if (durability > 0){
//attempt to stick the missile weapon to the enemy, just drop it if we can't.
if (enemy != null && enemy.isAlive() && sticky) {
if (sticky && enemy != null && enemy.isAlive() && enemy.buff(Corruption.class) == null){
PinCushion p = Buff.affect(enemy, PinCushion.class);
if (p.target == enemy){
p.stick(this);