home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve intro help screen handling.
[plomrogue2-experiments]
/
new2
/
plomrogue
/
tasks.py
diff --git
a/new2/plomrogue/tasks.py
b/new2/plomrogue/tasks.py
index a75352625fba3ee7042091de2fa88874caf57296..fffb36a117421bdf04a9082d5e4d3d3649995ef4 100644
(file)
--- a/
new2/plomrogue/tasks.py
+++ b/
new2/plomrogue/tasks.py
@@
-25,6
+25,7
@@
class Task_WAIT(Task):
class Task_MOVE(Task):
class Task_MOVE(Task):
+ todo = 1
argtypes = 'string:direction'
def get_move_target(self):
argtypes = 'string:direction'
def get_move_target(self):
@@
-33,8
+34,20
@@
class Task_MOVE(Task):
def check(self):
test_pos = self.get_move_target()
def check(self):
test_pos = self.get_move_target()
- if test_pos
.y < 0 or test_pos.x < 0 or test_pos.y >= 24 or test_pos.x >= 40:
+ if test_pos
is None:
raise GameError('would move out of map')
def do(self):
self.thing.position = self.get_move_target()
raise GameError('would move out of map')
def do(self):
self.thing.position = self.get_move_target()
+
+
+
+class Task_WRITE(Task):
+ todo = 1
+ argtypes = 'string:char'
+
+ def check(self):
+ pass
+
+ def do(self):
+ self.thing.game.map[self.thing.position] = self.args[0]