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