v0.7.5d: fixed missile weapons sticking to corrupted targets
This commit is contained in:
parent
da1f953d9d
commit
4fba6ff70b
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
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.buffs.PinCushion;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
|
@ -200,7 +201,7 @@ abstract public class MissileWeapon extends Weapon {
|
||||||
decrementDurability();
|
decrementDurability();
|
||||||
if (durability > 0){
|
if (durability > 0){
|
||||||
//attempt to stick the missile weapon to the enemy, just drop it if we can't.
|
//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);
|
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
||||||
if (p.target == enemy){
|
if (p.target == enemy){
|
||||||
p.stick(this);
|
p.stick(this);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user