v0.9.1: removed unusual delay behavior from flock traps
This commit is contained in:
parent
c60a1bf237
commit
f4177f8dad
|
@ -43,12 +43,6 @@ public class FlockTrap extends Trap {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activate() {
|
public void activate() {
|
||||||
//use an actor as we want to put this on a slight delay so all chars get a chance to act this turn first.
|
|
||||||
Actor.add(new Actor() {
|
|
||||||
|
|
||||||
{ actPriority = BUFF_PRIO; }
|
|
||||||
|
|
||||||
protected boolean act() {
|
|
||||||
PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 );
|
PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||||
Trap t;
|
Trap t;
|
||||||
|
@ -68,17 +62,11 @@ public class FlockTrap extends Trap {
|
||||||
t.activate();
|
t.activate();
|
||||||
}
|
}
|
||||||
Dungeon.level.occupyCell(sheep);
|
Dungeon.level.occupyCell(sheep);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Sample.INSTANCE.play(Assets.Sounds.PUFF);
|
Sample.INSTANCE.play(Assets.Sounds.PUFF);
|
||||||
Sample.INSTANCE.play(Assets.Sounds.SHEEP);
|
Sample.INSTANCE.play(Assets.Sounds.SHEEP);
|
||||||
Actor.remove(this);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user