packages feed

ironforge 0.1.0.22 → 0.1.0.23

raw patch · 3 files changed

+53/−23 lines, 3 files

Files

Game/Antisplice/Dungeon/Ironforge/Cambridge.hs view
@@ -69,16 +69,23 @@           _ -> noneM         putAtom murdererA (a+1) -  -- CAMBRIDGE : GERT BROELEMANN AVENUE-  broeleC <- constructRoom $ ctorRoom "Gert Broelemann Avenue" "This is a long street to the east and to the west. You see the entrance to the Deeprun Tram."+  -- CAMBRIDGE : GERT's AVENUE+  broeleC <- constructRoom $ ctorRoom "Gert's Avenue" "This is a long street to the east and to the west. You see the entrance to the Deeprun Tram."   bipath stationC broeleC Up-  let broeleAv = constructRoom $ ctorRoom "Gert Broelemann Avenue" "This is a long street to the east and to the west."+  let broeleAv = constructRoom $ ctorRoom "Gert's Avenue" "This is a long street to the east and to the west."   broele1WC <- broeleAv   bipath broeleC broele1WC West   broele2WC <- broeleAv-  bipath broele1WC broele2WC West+  kOfficer <- registerKind+  let officerGuard :: Prerequisite+      officerGuard = do+        rs <- getRoomState+        return $ null $ filter ((==kOfficer).objectKindOf) $ anyBstInorder $ roomObjectsOf rs+  unipath broele1WC broele2WC West+  guardedPath broele2WC broele1WC East officerGuard   broele3WC <- broeleAv-  bipath broele2WC broele3WC West+  guardedPath broele2WC broele3WC West officerGuard+  unipath broele3WC broele2WC East   unipath broele3WC broele3WC West   broele1EC <- broeleAv   bipath broeleC broele1EC East@@ -90,6 +97,9 @@       ctorMob "Karl-Heinz" ["kalle","karl-heinz","teacher"] "Karl-Heinz is an old maths teacher. Strange, but harmless." ["strange","harmless","old"]       ctorRoute [stationC,broeleC,broele1EC,broeleC,broele1WC,broele2WC,broele1WC,broeleC] 10000 +  -- CAMBRIDGE : JAIL+  cellJ <- constructRoom $ ctorRoom "Your Cell" "This is the cell they assigned to you. Pretty small, but it will suffice."+   -- CAMBRIDGE : SUPERMARKET   cartA <- newAtom   putAtom cartA 0@@ -101,14 +111,38 @@         0 -> mprintLn "Cashier: \"Welcome!\""         n -> mprintLn $ printf "Cashier: \"That's $%i.%02i.\"" (n `div` 100) (n `mod` 100)       cashierSte <- registerStereoM $ do-        a <- getAtom cartA-        mergeSkill $ skill "pay" !+ consumeCurrencyA money a+        mergeSkill $ skill "pay" !+ bareCondition (\_ -> do c <- getCurrency money; a <- getAtom cartA; return (c>=a))+                                 !+ bareAction (\_ -> do a <- getAtom cartA; modifyCurrency money (subtract a))                                  !+ bareAction (\_ -> mprintLn "Cashier: \"Thank you for choosing our market!\"")                                  !+ bareAction (\_ -> putAtom cartA 0)       addFeature $ Stereo Near cashierSte     return ()   withRoom broele2WC $ addRoomDesc "To the north there is the supermarket."-  bipath superMarket broele2WC South+  guardedPath broele2WC superMarket North officerGuard+  officerSte <- registerStereoM $ do+    mergeSkill $ skill "pay" !+ consumeCurrencyA money 300000+    mergeSkill $ skill "jail" !+ bareAction (\_ -> do+      rs <- getRoomState+      let os = filter ((==kOfficer).objectKindOf) $ anyBstInorder $ roomObjectsOf rs+      forM_ os $ removeRoomObject . objectIdOf+      enterAndAnnounce cellJ)+  gatedPath superMarket broele2WC South $ ActionBefore $+    let pq :: Prerequisite+        pq = return True+        h :: Handler+        h = getAtom cartA >>= \a -> when (a>0) $ withRoom broele2WC $ do+          officer <- addRoomObject $ do+            ctorMob "the police officer" ["officer"] "This is the police officer. He is very angry at you. You really should pay - otherwise you'll end up in jail..." ["angry"]+            setObjectKind kOfficer+            onSight $ schedule 0 $ do+              mprintLn "Officer: \"Stop! I think you didn't pay for that!\""+              mprintLn "The officer points at your shopping basket."+              mprintLn "Officer: \"Pay a fee of $3000 or go to jail.\""+              m <- getCurrency money+              when (m<300000) $ mprintLn "Hint: You don't have $3000."+            addFeature $ Stereo Near officerSte+          return ()+    in Action pq h    -- CAMBRIDGE : SUPERMARKET PRODUCE SECTION   let regGood :: (MonadAtoms m,MonadVocab m) => KindId -> NodeId -> String -> String -> [String] -> [String] -> Int -> m (Atom ObjectState)@@ -147,7 +181,7 @@   janA <- newAtom   putAtom janA True   entranceL <- constructRoom $ do-    ctorRoom "Entrance" "This is the entrance to the MIT's AI Lab. To the south there is the main room.x"+    ctorRoom "Entrance" "This is the entrance to the MIT's AI Lab. To the south there is the main room."     addRoomObject $ do       ctorMob "Jan" ["jan","geek","enthusiast"] "This is Jan, an enthusiastic - but sometimes a little clumsy - computer geek. And he loooves pancakes." ["enthusiastic","clumsy"]       onSight $ schedule 0 $ getAtom janA >>= \a -> when a $ do
Game/Antisplice/Dungeon/Ironforge/IronforgeCity.hs view
@@ -81,16 +81,7 @@          --  IRONFORGE : THE MILITARY WARD   militaryW <- constructRoom $ do-    ctorRoom "The Military Ward" "This is where the anti-terror act of the Asocial Network will happen."-  cangaroo <- withRoom militaryW $ addRoomObject $ do-    ctorMob "a cangaroo" ["cangaroo","communist"] "This is a communist cangaroo, who has fought for Vietcong." []-  withObject cangaroo $ do-    onFirstSight $ do-      let laugh :: Handler-          laugh = guardRoom militaryW $ guardObjectInRoom cangaroo militaryW $ do-            mprintLn "\"Haha!\", the cangaroo says and laughs."-            schedule 10000 laugh-      schedule 10000 laugh+    ctorRoom "The Military Ward" "This is where the warriors meet."   bipath greatForge militaryW SouthEast      --  IRONFORGE : THE COMMONS@@ -163,9 +154,14 @@   bipath commonsW mysticW North      --  IRONFORGE : THE FORLORN CAVERN-  cavernW <- constructRoom $ ctorRoom "The Forlorn Cavern" "Uncanny."-  guardedPath mysticW cavernW East $ return False-  unipath cavernW mysticW West+  cavernW <- constructRoom $ ctorRoom "The Forlorn Cavern" "Uncanny. You see your home to the north."+  bipath cavernW mysticW West++  --  IRONFORGE : HOME+  homeW <- constructRoom $ do+    ctorRoom "Home" "Home, sweet home."+    addRoomObject $ ctorMob "mom" ["mom"] "This is your mom. She knows really %{V7;everything} about cooking." ["beloved"]+  bipath cavernW homeW North      --  IRONFORGE : HALL OF EXPLORERS   halloeW <- constructRoom $ ctorRoom "Hall of Explorers" "Here you can be rewarded."
ironforge.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.1.0.22+version:             0.1.0.23  -- A short (one-line) description of the package. synopsis:            A technical demo for Antisplice.