home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make terrain types configurable.
[plomrogue2]
/
plomrogue
/
tasks.py
diff --git
a/plomrogue/tasks.py
b/plomrogue/tasks.py
index 4b63634a9ebad71bd01ec9e08321830a252328ef..f7fb3124da02b32e46a887b95eed9ee8a57214ea 100644
(file)
--- a/
plomrogue/tasks.py
+++ b/
plomrogue/tasks.py
@@
-34,10
+34,11
@@
class Task_MOVE(Task):
def check(self):
test_yxyx = self._get_move_target()
def check(self):
test_yxyx = self._get_move_target()
+ move_blockers = self.thing.game.get_movement_blockers()
if test_yxyx in [t.position for t in self.thing.game.things
if t.blocking]:
raise PlayError('blocked by other thing')
if test_yxyx in [t.position for t in self.thing.game.things
if t.blocking]:
raise PlayError('blocked by other thing')
- elif self.thing.game.maps[test_yxyx[0]][test_yxyx[1]]
!= '.'
:
+ elif self.thing.game.maps[test_yxyx[0]][test_yxyx[1]]
in move_blockers
:
raise PlayError('blocked by impassable tile')
def do(self):
raise PlayError('blocked by impassable tile')
def do(self):
@@
-77,7
+78,7
@@
class Task_FLATTEN_SURROUNDINGS(Task):
self.thing.position).values()):
if not self.thing.game.can_do_tile_with_pw(*yxyx, self.args[0]):
continue
self.thing.position).values()):
if not self.thing.game.can_do_tile_with_pw(*yxyx, self.args[0]):
continue
- self.thing.game.maps[yxyx[0]][yxyx[1]] =
'.'
+ self.thing.game.maps[yxyx[0]][yxyx[1]] =
self.game.get_flatland()
self.thing.game.record_fov_change(yxyx)
self.thing.game.record_fov_change(yxyx)