v0.3.4: fixed some bugs with actor time

This commit is contained in:
Evan Debenham 2015-12-28 13:19:44 -05:00 committed by Evan Debenham
parent b079aad640
commit 801fd58e7c
2 changed files with 9 additions and 2 deletions

View File

@ -136,7 +136,7 @@ public abstract class Actor implements Bundlable {
public static void init() {
addDelayed( Dungeon.hero, -Float.MIN_VALUE );
add( Dungeon.hero );
for (Mob mob : Dungeon.level.mobs) {
add( mob );
@ -231,7 +231,7 @@ public abstract class Actor implements Bundlable {
ids.put( actor.id(), actor );
all.add( actor );
actor.time = time;
actor.time += time;
actor.onAdd();
if (actor instanceof Char) {

View File

@ -68,6 +68,13 @@ public class Tengu extends Mob {
properties.add(Property.BOSS);
}
@Override
protected void onAdd() {
//when he's removed and re-added to the fight, his time is always set to now.
spend(-cooldown());
super.onAdd();
}
@Override
public int damageRoll() {
return Random.NormalIntRange( 6, 15 );