v0.3.0c: trap refactor pt2, traps completely changed to work based on instantiable trap objects instead of terrain types

This makes the trap system far more extendable.
This commit is contained in:
Evan Debenham
2015-06-03 20:40:58 -04:00
parent 7e79a10501
commit 85a907d14e
25 changed files with 336 additions and 285 deletions
@@ -403,8 +403,11 @@ public abstract class Char extends Actor {
if (Dungeon.level.map[pos] == Terrain.OPEN_DOOR) {
Door.leave( pos );
}
Actor.freeCell(pos);
pos = step;
Actor.occupyCell( this );
if (flying && Dungeon.level.map[pos] == Terrain.DOOR) {
Door.enter( pos );