1 from plomrogue.errors import GameError
2 #from plomrogue.misc import quote
3 from plomrogue.mapping import YX
11 def __init__(self, thing, args=()):
20 class Task_WAIT(Task):
28 class Task_MOVE(Task):
29 argtypes = 'string:direction'
31 def get_move_target(self):
38 return self.thing.position + moves[self.args[0]]
41 test_pos = self.get_move_target()
42 if test_pos.y < 0 or test_pos.x < 0 or test_pos.y >= 24 or test_pos.x >= 40:
43 raise GameError('would move out of map')
46 self.thing.position = self.get_move_target()