Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bumping into walls searches surroundings; close #32

  • Loading branch information...
commit bfc4d8f63e53d861755b80f4d46c6c35f8474698 1 parent c042c22
Mikolaj Konarski Mikolaj authored
Showing with 5 additions and 0 deletions.
  1. +3 −0  src/Actions.hs
  2. +2 −0  src/EffectAction.hs
3  src/Actions.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
2  src/EffectAction.hs
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
Please sign in to comment.
Something went wrong with that request. Please try again.