Permalink
Browse files

bumping into walls searches surroundings; close #32

  • Loading branch information...
1 parent c042c22 commit bfc4d8f63e53d861755b80f4d46c6c35f8474698 @Mikolaj Mikolaj committed Apr 11, 2011
Showing with 5 additions and 0 deletions.
  1. +3 −0 src/Actions.hs
  2. +2 −0 src/EffectAction.hs
View
@@ -533,6 +533,9 @@ moveOrAttack allowAttacks autoOpen actor dir
when (actor == pl) $
messageAdd $ lookAt False True state lmap tloc ""
advanceTime actor
+ else if actor == pl && not (openable 1 lmap tloc) then do
+ messageAdd "You search your surroundings." -- TODO: proper msg
+ search
else if autoOpen then
-- try to open a door
actorOpenClose actor False True dir
View
@@ -134,6 +134,8 @@ itemEffectAction source target item = do
-- The message describes the target part of the action.
(b, msg) <- effectToAction effect source target (ipower item)
-- Determine how the player perceives the event.
+ -- TODO: factor it out as a function messageActor
+ -- and messageActorVerb (incorporating subjectActorVerb).
if mloc tm `S.member` ptvisible per
then messageAdd msg
else if not b

0 comments on commit bfc4d8f

Please sign in to comment.