v0.3.4: fixed some bugs with actor time
This commit is contained in:
parent
b079aad640
commit
801fd58e7c
|
@ -136,7 +136,7 @@ public abstract class Actor implements Bundlable {
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
addDelayed( Dungeon.hero, -Float.MIN_VALUE );
|
add( Dungeon.hero );
|
||||||
|
|
||||||
for (Mob mob : Dungeon.level.mobs) {
|
for (Mob mob : Dungeon.level.mobs) {
|
||||||
add( mob );
|
add( mob );
|
||||||
|
@ -231,7 +231,7 @@ public abstract class Actor implements Bundlable {
|
||||||
ids.put( actor.id(), actor );
|
ids.put( actor.id(), actor );
|
||||||
|
|
||||||
all.add( actor );
|
all.add( actor );
|
||||||
actor.time = time;
|
actor.time += time;
|
||||||
actor.onAdd();
|
actor.onAdd();
|
||||||
|
|
||||||
if (actor instanceof Char) {
|
if (actor instanceof Char) {
|
||||||
|
|
|
@ -68,6 +68,13 @@ public class Tengu extends Mob {
|
||||||
properties.add(Property.BOSS);
|
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
|
@Override
|
||||||
public int damageRoll() {
|
public int damageRoll() {
|
||||||
return Random.NormalIntRange( 6, 15 );
|
return Random.NormalIntRange( 6, 15 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user