v1.4.0: fixed various visual errors with stacking barrier buffs
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blocking;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
@@ -68,8 +69,11 @@ public class Barrier extends ShieldBuff {
|
||||
|
||||
@Override
|
||||
public void fx(boolean on) {
|
||||
if (on) target.sprite.add(CharSprite.State.SHIELDED);
|
||||
else target.sprite.remove(CharSprite.State.SHIELDED);
|
||||
if (on) {
|
||||
target.sprite.add(CharSprite.State.SHIELDED);
|
||||
} else if (target.buff(Blocking.BlockBuff.class) == null) {
|
||||
target.sprite.remove(CharSprite.State.SHIELDED);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -401,7 +401,10 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
healing.pour(Speck.factory(Speck.HEALING), 0.5f);
|
||||
break;
|
||||
case SHIELDED:
|
||||
GameScene.effect( shield = new ShieldHalo( this ));
|
||||
if (shield != null) {
|
||||
shield.killAndErase();
|
||||
}
|
||||
GameScene.effect(shield = new ShieldHalo(this));
|
||||
break;
|
||||
case HEARTS:
|
||||
hearts = emitter();
|
||||
|
||||
Reference in New Issue
Block a user