From 3c471b3e19a60ff6a79ec144335d75e52854f87e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 27 Aug 2014 00:53:22 -0400 Subject: [PATCH] V0.2.0: Tweaked behaviour relating to order of actions, fixes a bug: when a buff is first attached it randomly acts twice instead of once. --- .../shatteredpixel/shatteredpixeldungeon/actors/Actor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java index 02c1387b1..3e8cdab35 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java @@ -24,6 +24,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.watabou.utils.Bundlable; @@ -149,7 +150,8 @@ public abstract class Actor implements Bundlable { Arrays.fill( chars, null ); for (Actor actor : all) { - if (actor.time < now) { + //if multiple things act at the same time, hero should go first. + if (actor.time < now || (actor instanceof Hero && actor.time == now)) { now = actor.time; current = actor; }