Skip to content

Commit

Permalink
bumping into walls searches surroundings; close #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj committed Apr 11, 2011
1 parent c042c22 commit bfc4d8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Actions.hs
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/EffectAction.hs
Expand Up @@ -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
Expand Down

0 comments on commit bfc4d8f

Please sign in to comment.