v0.9.0b: adjusted visual paralysis logic to prevent freeze+para bugs

This commit is contained in:
Evan Debenham 2020-10-14 15:20:02 -04:00
parent 833b182d75
commit 74f6df7b6b
3 changed files with 11 additions and 7 deletions

View File

@ -125,8 +125,13 @@ public class Frost extends FlavourBuff {
@Override
public void fx(boolean on) {
if (on) target.sprite.add(CharSprite.State.FROZEN);
else target.sprite.remove(CharSprite.State.FROZEN);
if (on) {
target.sprite.add(CharSprite.State.FROZEN);
target.sprite.add(CharSprite.State.PARALYSED);
} else {
target.sprite.remove(CharSprite.State.FROZEN);
if (target.paralysed <= 1) target.sprite.remove(CharSprite.State.FROZEN);
}
}
@Override

View File

@ -82,8 +82,8 @@ public class Paralysis extends FlavourBuff {
@Override
public void fx(boolean on) {
if (on) target.sprite.add(CharSprite.State.PARALYSED);
else target.sprite.remove(CharSprite.State.PARALYSED);
if (on) target.sprite.add(CharSprite.State.PARALYSED);
else if (target.paralysed <= 1) target.sprite.remove(CharSprite.State.PARALYSED);
}
@Override

View File

@ -82,6 +82,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
public enum State {
BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED, HEALING, SHIELDED
}
private int stunStates = 0;
protected Animation idle;
protected Animation run;
@ -369,7 +370,6 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
break;
case FROZEN:
iceBlock = IceBlock.freeze( this );
paused = true;
break;
case ILLUMINATED:
GameScene.effect( light = new TorchHalo( this ) );
@ -417,14 +417,13 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
alpha( 1f );
break;
case PARALYSED:
paused = false;
if (iceBlock != null) paused = false;
break;
case FROZEN:
if (iceBlock != null) {
iceBlock.melt();
iceBlock = null;
}
paused = false;
break;
case ILLUMINATED:
if (light != null) {