UNPKG

puzzlescript

Version:

Play PuzzleScript games in your terminal!

722 lines (634 loc) 14.8 kB
title Hazard Golf author Mark Richardson again_interval 0.1 run_rules_on_level_start zoomscreen 14x13 (verbose_logging) ======== OBJECTS ======== Background Black Hud Black Stroke LightGray Gray DarkGray ...0. ...0. ..02. 111.. .12.. OverPar #F22 #D00 #800 ...0. ...0. ..02. 111.. .12.. Player White Pink DarkBlue Red LightGray .00.. .11.. 22224 .03.4 .30.4 Ball White ..... ..... ..0.. ..... ..... AirBall White ..... .00.. .00.. ..... ..... Tee Red #A00 ..... ..... 0...0 ..1.. ..... Hole Black White ..1.. ..1.. ..0.. ..... ..... Pin Red White ..0.. ..00. ..000 ..1.. ..1.. Green #6F6 Fairway #2F2 Rough #0D0 Water Blue BridgeV #C83 #D94 #B72 #A61 01110 02220 03330 01110 02220 BridgeH #C83 #D94 #B72 #A61 00000 21321 21321 21321 00000 Sand #FF4 #FF0 #DD0 00022 12110 22120 00121 21001 Tree Brown #7F7 #3F3 #0B0 .111. 32221 32221 .333. ..0.. Concrete #AAA #999 10000 10000 10000 10000 01111 Ice #FF8 Crack #FFD ....0 0.00. .0.0. ..0.. ..0.. BrokenGlass #FFF #BBF #77F 11020 01100 20202 11001 20110 Duck White Yellow Gray ..... ...0. 02001 .000. ..... AirDuck White Yellow Gray ..... 22.0. 02201 .000. ..... Bear Red Black #B72 #A61 ..... .222. 22221 22220 3..3. AimH White ..... ..... .000. ..... ..... AimV White ..... ..0.. ..0.. ..0.. ..... Cursor1 Transparent Yellow ..... .0.0. ..... .0.0. ..... Cursor2 White ..... ..0.. .000. ..0.. ..... Cursor3 Transparent Yellow .0.0. 0...0 ..... 0...0 .0.0. CheatMessage Transparent BrokenGlassMessage Transparent Hole12Message Transparent Blood Red 0...0 .0... 00000 0..0. ...0. OutOfBounds #F88 0...0 ..... ..... ..... 0...0 Init Transparent ======= LEGEND ======= / = Stroke and Hud and Rough _ = Hud and Rough @ = Player and Rough Y = Fairway and Tee and Ball and CheatMessage and Init W = Rough and BrokenGlassMessage Z = Rough and Duck and Hole12Message P = Hole and Green : = Green , = Fairway . = Rough ~ = Water # = BridgeV H = BridgeH - = Sand T = Tree and Rough Q = Tree and Fairway + = Concrete % = Ice " = BrokenGlass d = Duck and Rough e = Duck and Fairway f = Duck and Green g = Duck and Water A = Bear and Rough B = Bear and Fairway * = Blood and Fairway (Hole planning) x = Rough c = Rough Deadly = Bear Edible = Player or Duck Hitable = Ball or Duck or Bear AirHitable = AirBall or AirDuck Sinkable = Ball or Player Swimable = Duck WalkStop = Water or Tree or BrokenGlass or OutOfBounds AirStop = Tree or OutOfBounds RollGo = Green or BridgeV or BridgeH or Concrete or Ice RollStop = AirStop or Duck or Player or Bear Score = Stroke or OverPar Aim = AimH or AimV Hit2 = Green or Fairway or Concrete or Ice or Rough or BridgeV or BridgeH or Water or Sand or BrokenGlass Hit3 = Green or Fairway or Concrete or Ice or Rough or BridgeV or BridgeH or Water Hit5 = Green or Fairway or Concrete or Ice AirDeco = Pin or OutOfBounds or CheatMessage or BrokenGlassMessage or Hole12Message ======= SOUNDS ======= AirBall Create 58489507 AirDuck Create 60653709 Blood Create 50259908 Crack Create 93556707 Water Create 48152908 EndLevel 26251903 sfx1 26251903 (Sink ball) sfx2 96277908 (Splash) ================ COLLISIONLAYERS ================ Background (I don't need this layer) RollGo, Hit2 (Surfaces) Tee, Hole, Crack, Blood (Ground decoration) Hitable (Ground objects) Player, Tree, Bear (Obstacles) AirHitable (Airborne objects) AirDeco (Air decoration) Cursor1, Cursor2, Cursor3, Init (Cursors) Hud (Hud underlay) Aim, Stroke, OverPar (Hud overlay) ====== RULES ====== (Decoration) up[Init][Hole|no Pin]->[Init][Hole|Pin] [Init][no AirDeco]->[Init][left OutOfBounds] left[Init][||||||left OutOfBounds|||||||]->[Init][||||||down OutOfBounds|||||||] down[Init][||||||down OutOfBounds||||||]->[Init][||||||||||||] [Init][moving OutOfBounds]->[Init][OutOfBounds] [Init]->[] (Cheat) up[moving Player][OverPar|OverPar][CheatMessage]->[moving Player][OverPar|OverPar][]message Psst... If you want to cheat, just walk up the hole and press X. [action Player Hole][OverPar]->[action Player Hole][] [action Player Hole][Ball]->[Player Hole Ball][]again message ♪ Nobody's watching, and... Hooray! I scored par! (Dead) [Edible|Deadly]->[Blood|Deadly] (Adjust aim) [moving Player][Cursor2]->[Player][moving Cursor2] [> Cursor2|Cursor1][Aim]->[> Cursor2|Cursor1][] [> Cursor2|Cursor1]->[|] [action Cursor2 Hitable]->cancel (Ready swing) [> Player|Hitable]->[Player|^ Hitable action Cursor1] [> Hitable Hit2 action Cursor1 |no AirStop no AimH]->[> Hitable Hit2 Cursor1|AimH Cursor2] [> Hitable Hit2|AimH |no AirStop no AimH]->[> Hitable Hit2|AimH|AimH] [> Hitable Hit3|AimH|AimH |no AirStop no AimH]->[> Hitable Hit3|AimH|AimH|AimH] [> Hitable Hit5|AimH|AimH|AimH |no AirStop no AimH]->[> Hitable Hit5|AimH|AimH|AimH|AimH] [> Hitable Hit5|AimH|AimH|AimH|AimH|no AirStop no AimH]->[> Hitable Hit5|AimH|AimH|AimH|AimH|AimH] [vertical Hitable][AimH]->[vertical Hitable][AimV] [action Cursor1]->[] [> Hitable]->[Hitable] (Swim) [moving Player][stationary Swimable Water]->[moving Player][randomdir Swimable Water] [Cursor1][moving Swimable]->[Cursor1][Swimable] [> Swimable|no Water]->[Swimable|] (Cancel aim) [Player|Cursor1 Ball][> Cursor2][Aim]->[> Player|Cursor1 Ball][> Cursor2][] [Player|Cursor1][< Cursor2][Aim]->[< Player|Cursor1][< Cursor2][] [Player|Cursor1 Ball][> Cursor2]->[> Player|Ball][] [Player|Cursor1][< Cursor2]->[< Player|][] [> Cursor2|no Aim]->[Cursor2|] (Move ball) [Cursor1|stationary Cursor3 stationary Ball RollGo|no RollStop]->[> Cursor1|> Cursor3 > Ball RollGo|]again [Cursor1|stationary Cursor3 stationary Ball]->[|Ball] late[Cursor1 AirBall|Cursor3 Ice]->[Cursor1|Cursor3 Ice Crack] late[Cursor1 AirBall|Cursor3]->[Cursor1|Cursor3 Ball]again late[Cursor1 AirDuck|Cursor3]->[|Duck] [Cursor1 AirHitable|...|Cursor3]->[> Cursor1 > AirHitable|...|Cursor3]again (Sink) late[Player Ice Crack]->[Player Water]again [Water Sinkable]->[Water]sfx2 (Hit ball) [action Cursor2][Aim]->[action Cursor2][] up[Cursor1 Ball][action Cursor2][Stroke|no Stroke]->[Cursor1 AirBall][Cursor3][|]again up[Cursor1 Ball][action Cursor2][OverPar|Hud no OverPar]->[Cursor1 AirBall][Cursor3][OverPar|Hud OverPar]again up[Cursor1 Ball][action Cursor2][Hud||||||||||||Hud]->[Cursor1 AirBall][Cursor3][Hud OverPar||||||||||||Hud]again [Cursor1 Duck][action Cursor2]->[Cursor1 AirDuck][Cursor3]again (Walk) [> Player|BrokenGlass][BrokenGlassMessage]->[Player|BrokenGlass][]message Ouch! That's broken glass! [> Player|WalkStop]->cancel [> Player][stationary Score]->[> Player][> Score] [> Player][stationary Hud]->[> Player][> Hud] late[Player|Deadly]->again (Start Hole 12) late down[Player Hole12Message][Hud||||||||||||Hud]->[Player][Hud|||||||||Stroke|Stroke|Stroke|Hud Stroke]message Hole 12, Par 4 (Fail) late [Ball Hole][OverPar]->[Ball Hole][OverPar]again sfx1 message I'm over par. Let's pretend that never happened and try again. [Ball Hole][OverPar]->restart ============== WINCONDITIONS ============== some Player all Hole on Ball no OverPar ======= LEVELS ======= message What a lovely day to play a round of golf. message Hole 1, Par 3 ....................... ....................... ....................... ..T.................... ...................T... ....................... .........T............. ..........,,,,,........ ......T..,,:::,,....... .........,:::::,....... ........,,::P::,..+++++ ........,,,::::,....... .T......,,,,::,,....... .._.....,,,,,,,........ .._.....,,,,,.......... .._.....,,,,,.T........ .._.T....,,,........... .._.................... .._.................... .._......@Y...T........ .._T................... .._.................... .._.......+.......T.... ../.......+............ ../..T....+............ ../.......+............ ..........+............ message Hole 2, Par 4 .....T................ ...................... ............T......... ...................... .......T.........T.... ...................... ...............T...... ..........,,,......... ..T......,,:,,....T... .........,:P:,........ .........,,:,,........ .........,,,,,...T.... ........,,,,,--....... .....T..,,,----....... ........,,,---........ .........,,,,,........ ..T......,,,,,........ ..........,,,,,....... ..........,,,,,...T... ..........,,,,,....... ......T..,,,,,........ .........,,,,,........ ..._.....---,,,....... T.._....----,,,....... ..._....--,,,,........ ..._.....,,,,......... ..._T................. ..._............T..... ..._......@Y.......... ..._.................. ..._..T..............T .../.......+.......... .../.......+.......... .../.......+....T..... .T./.......+.......... ...........+.......... message Hole 3, Par 5 .....+.T..T..T..T........ ...T.+............T...... .....+++++++++++......... ...............+......... ...T..T..T..T..+..T...... ......................... ......................... ..............,,,....T... ..T..........,,:,,....... .............,:P:,....... .............,,:,,....... .............,,,,,.....T. .............,,,,,....... .........T...,,,,,....... ...T.........,,,,,..T.... .............,,,,........ ............,,,,......... ............,,,,......T.. .....T.....,,,,,......... ._.........,,,,...T...... T_........,,,,........... ._......,,,,,............ ._......,,,,..........T.. ._.............T......... ._....................... ._T.....@Y............... ._...............T....... ./....................... ./.......+.T...........T. ./.......+............... ./.......+.........T..... ./...T...+............... .........+............... message Hole 4, Par 4 ..............T..+.......... .................+.......... .........T.......+.......... .................+.....T..T. .....T...........+..T....... .................+......~~~~ ......T.....T.T..+.~~g~~~~~~ ..........T.....~#~~~~g~~~.. ..T.....T....~~~~#~~~~...... ...........~~~~~.,,,....T.T. ......T..~~~~~.,,,:,,.T..... ....T...~~~~.,,,,:P:,....... ......~~~~.,,,,,,,:,,...T... ._T..~~~~~,,,,,,,,,,........ ._..~~~~~,,,,,,,............ ._T.~~~.,,,,,,........T..... ._..~~~.,,,................. ._.~~~~.........T........... ._.~g~~..................... ._.~~~..@Y.................. ._.~~~......T.......T....... ._~~~~...................... ./~~~~...+.................. ./~~~~...+........T......... ./~~~....+.....T............ ./~~~....+.................. ..~~~....+.................. message There's ducks on the fairway! Why am I paying green fees? message Hole 5, Par 3 ~~~~...T................. ~~~~~~...T......T........ ++~~~~~~...T..........T.. .++++~~~~~...T........... ....++++~~~~...T...T..... .......+..~~~~........... ............~~~..T....... .........,,,.~~~......... ........,,:,,.~~~..T..... ........,:P:,.~~~~....T.. ........,,:,,..~~~..T.... ......_.,,,,,...~~~...... ......_.,,e,,,,,~~~~.T... ......_.,e,,,,,,,~~~..... ......_..,,e,,,,,~~~.T... ......_.......d..~~~..... ......_..........~~~.T... ......_......@Y..~~~..... ......_.........~g~~.T... ......_.........~~~...... ......_.......+~~~~.T.... ....../......++~~~....... ....../......+~~~~.T..T.. ....../.....++~~~........ ............+~~~~.T...... message What's that sparkly stuff? message Hole 6, Par 4 ........................ ...T.................... ..................T..... ........................ ............T........... .......T................ .....................T.. ....T....,,,...T........ ........,,:,,........... ++++++..,:P:,.....T..... ........,,:,,........... ..T......,,,,,.......... ......._.,,,,,,.......T. ......._"",,,,,""....... ......._"",,,,,""....... ...T..._....,,,......... ......._............T... ......._.T.............. ......._......@YW.++++++ ......._................ .T....._................ ......./...T........T... ......./................ ......./........T....... ......./................ .....T.................. message Hole 7, Par 5 ...T.....T.......T.......T... .T...T.......T......T........ ........T........T.....T..... ...T........T...T........T... .T....T...T..........T....... ....T........T....T.....T.... .T.....T........T..........T. ....T......T..T...,,,.T...... ..T......T......T,,:,,....T.. ......T.....T....,:P:,..T.... ...T....""...T.T.,,:,,..+++++ ._...T.."",,,,,..T,,,...T.... ._T.....,,,,,,,,T.,,,T....T.. ._...T..,,,,,"",.T,,,........ T_.....T,,,T.,,,,,,,,.T...T.. ._..T.......T,,,,,"",...T.... ._T........T..,,,,""......... ._....T.@Y......T....T.....T. ._............T....T...T..... ./.T.....T.....T............. T/....T.+...T....T...T...T... ./......+T....T.......T....T. ./..T...+....T....T......T... ./....T.+..T..........T...... .T......+T......T........T... message That's a bear sleeping there. I'd better not disturb him. message Hole 8, Par 5 .............................. .............................. .............................. .............................. .............................. .............................. .T.T.......................... .....T.T...........--......... +++......T.........---........ ~~+++++....T......,,---....... ~~~~~~++++...T...,,:,--....... ~~~~~~~~~+++.....,:P:,........ ~~~~~~~~~~~++++..,,:,,...T.... ...T~~~~~~~~#~~~~~,,,......T.T T........~~~#~~~g~~~~~~~~..... ..T...---.....~~~~~~~~~~~~~~~~ T.....----.........~~g~~~~~~~~ .T.....---,,,,,,,,,,,...~~~~~~ ._.....,,,,,,,,,,,B,,,..T....T ._T....,,,,,,,,,,,,,,,....T... T_.....,,,,,,,,,,,,---..T....T ._.T....,,,,,,,,,,,----....T.. ._..................---..T.... ._..T......................T.. T_......@Y..............T..... ._.T.............T...T....T.T. ./....T......T.....T....T..... T/..T....+.....T......T....T.. ./.T...T.+..T.T......T..T....T ./...T...+.......T........T... ./T......+.....T...T...T...... T.....T..+...T...T.........T.. message Oh. Now I see why the course isn't being maintained... message Hole 9, Par 5 ....T...T...T.......T....T. .T..T..........T.......T... .........T...T....T........ ......T............T....T.. ..T............T........... ......T..T.T..T..........T. .T..T...................... ........T..T....,,,........ ....T..........,,:,,....... .T........T....,:P:,..+++++ ...T..T.....T..,,:,,....... ........T.....,,,,,........ ..T..........,,,,,,........ ......T....,,,B,,,......... ...T.....,,,,,,,,,......... ........,,,B*,,--,......... .....T..,,,,,,,----........ ..T.....,,,,,,,.---........ ........,,,,,.............. .._.T...,,,,,.............. .._.....,,,,,.............. .._.....,,,,,............T. .._......,,,.........T.T... .._................T....+++ .._............T.T...++++~~ .._......@Y..T....++++~~~~~ .._............++++~~~g~~~. ../....T....++++~~~~~~~.... ../T.T.......~~~~~~~....T.T .T/.......~g~~~~~.....T.... ../....~~~~~~~....T.T...... ../.~~~~~~~.....T.......... .~~~~~~~....T.T............ message Maybe I'll take up lawn bowls instead.