Skip to content

Instantly share code, notes, and snippets.

@sfiera
Last active March 15, 2024 02:50
Show Gist options
  • Save sfiera/dba085c1417a8c4bb0c30f3f29327d2b to your computer and use it in GitHub Desktop.
Save sfiera/dba085c1417a8c4bb0c30f3f29327d2b to your computer and use it in GitHub Desktop.
Heroes of Sokoban and Other Tales: The Sorceress https://www.puzzlescript.net/play.html?p=dba085c1417a8c4bb0c30f3f29327d2b
title Heroes of Sokoban and Other Tales: The Sorceress
author Chris Pickel
homepage https://www.puzzlescript.net/play.html?p=7072276
text_color yellow
key_repeat_interval 0.25
again_interval 0.05
run_rules_on_level_start
========
OBJECTS
========
Background
#AAA #DDD
00000
00100
00000
00010
00000
Goal
Brown Yellow
.000.
00000
00010
00000
00000
Wall
Darkgrey #222
01000
11111
00010
00010
11111
Fighter
#F44 Pink DarkBrown
.000.
.111.
00000
.000.
.2.2.
Thief
#0B0 Pink DarkBrown
.000.
.010.
00000
.0.0.
.0.0.
Wizard
#26F Pink
.000.
.010.
00000
.000.
00000
Priest
#FFFFAA Pink
.000.
.111.
00000
.000.
00000
Druid
#FF8800 Pink DarkBrown
.212.
.111.
00000
.000.
00000
Sorceress
#F8C Brown Black
.222.
.212.
01110
20002
00000
Ranger
#A74 Green DarkBrown
.222.
.212.
11011
.000.
.1.1.
Dog
#A74 DarkBrown
.....
.000.
01010
00100
.0.0.
SFighter
#800 Pink DarkBrown
.000.
.111.
00000
.000.
.2.2.
SThief
#060 Pink DarkBrown
.000.
.010.
00000
.0.0.
.0.0.
SWizard
#008 Pink
.000.
.010.
00000
.000.
00000
SPriest
#B8B800 Pink
.000.
.111.
00000
.000.
00000
SDruid
#884400 Pink DarkBrown
.212.
.111.
00000
.000.
00000
SSorceress
#B69 Brown Black
.222.
.212.
01110
20002
00000
SRanger
#754 Green DarkBrown
.222.
.212.
11011
.000.
.1.1.
SDog
#754 DarkBrown
.....
.000.
01010
00100
.0.0.
LDragon
Green Red Orange Yellow DarkGreen
.....
1100.
3210.
1100.
...4.
RDragon
Green Red Orange Yellow DarkGreen
.....
.0011
.0123
.0011
.4...
Breathing
Red
Goblin
Green DarkBrown DarkGreen
0.2.0
00000
..0..
.111.
.1.1.
Snake
Green Red
.000.
00000
00.01
.0.10
0....
Dying
Red
Saved
#D8D800
..0..
.000.
..0..
..0..
.....
NotSaved
Transparent
Restarting
Transparent
Petted
Pink
0.0..
.0...
.....
.....
.....
Corpse
#CCC
.000.
.000.
00000
.0.0.
.0.0.
Crate
Orange #520
.111.
10001
10001
10001
.111.
YellowSwitch
Yellow Black
.....
.111.
.101.
.111.
.....
YellowOpen
Yellow
0...0
.....
.....
.....
0...0
YellowDoor
Yellow #A72
01010
10001
00000
10001
01010
PurpleSwitch
#61C Black
.....
.111.
.101.
.111.
.....
PurpleDoor
#61C #208
01010
10001
00000
10001
01010
PurpleOpen
#61C
0...0
.....
.....
.....
0...0
MonsterDoor
DarkGrey #222222 Red
21002
22122
20212
20012
21112
Teleport
Pink
Opening
Purple
=======
LEGEND
=======
Player = Fighter or Thief or Wizard or Priest or Sorceress or Ranger or Druid
SPlayer = SFighter or SThief or SWizard or SPriest or SSorceress or SRanger or SDruid
Hero = Player or SPlayer
Companion = Dog or SDog
Dragon = LDragon or RDragon
Monster = Dragon or Goblin or Snake
ClosedDoor = PurpleDoor or YellowDoor or MonsterDoor
OpenDoor = YellowOpen or PurpleOpen
Switch = PurpleSwitch or YellowSwitch
Healer = Priest or SPriest
Lethal = Goblin
Mortal = Hero or Monster
Moveable = Crate or SPlayer or Companion or Monster
Pusher = Fighter or Dog or Moveable
Puller = Thief
Static = Wall or ClosedDoor
Weighing = Crate or Hero or Companion or Monster or Corpse
Solid = Weighing or Static
Flammable = Solid
. = Background
# = Wall
F = Fighter
T = Thief
W = Wizard
P = Priest
D = Druid
R = Ranger
E = Dog
S = Sorceress
1 = SFighter
2 = SThief
3 = SWizard
4 = SPriest
5 = SDruid
6 = SRanger
Y = SDog
7 = SSorceress
L = LDragon
K = RDragon
O = Goblin
(S = Snake)
* = Crate
G = Goal
¡ = YellowDoor
¿ = PurpleDoor
! = YellowSwitch
? = PurpleSwitch
M = MonsterDoor
=======
SOUNDS
=======
Moveable move 82056307 (push crate)
ClosedDoor create 92172900 (lock)
ClosedDoor destroy 15129100 (unlock)
Sfx0 63194902 (kill monster)
Sfx1 81996702 (kill player)
Sfx2 69860105 (save player)
Sfx3 16306103 (pet doggo)
Sfx4 21221308 (teleport)
Sfx5 93615108 (transmutation)
Sfx6 66399906 (switch player)
EndLevel 36315908
EndGame 86793500
================
COLLISIONLAYERS
================
Background
Teleport
Opening
Goal, Switch, OpenDoor
Static, Hero, Companion, Monster, Corpse, Crate
Dying, Saved, Breathing
NotSaved
Petted
Restarting
======
RULES
======
(Restart if there is a corpse and nothing is still dying)
random [Corpse] -> [Restarting Corpse]
[Dying] [Restarting] -> [Dying] []
[Restarting] -> restart
(The dog follows the ranger over any distance.
The ranger pushes the dog, but isn't allowed to push other objects by pushing the dog into them.)
[< Ranger | ... | Dog] -> [< Ranger | ... | < Dog ]
[> Ranger | Dog | Moveable] -> [ Ranger | Dog | Moveable]
[> Ranger | Dog] -> [> Ranger | > Dog]
(The fighter and dog push any number of movable objects
The thief pulls one movable object)
[> Pusher | Moveable ] -> [> Pusher | > Moveable]
[< Puller | Moveable ] -> [< Puller | < Moveable]
(The wizard swaps with moveable objects)
[> Wizard | ... | Solid] -> [ Wizard | ... | Teleport Solid]
[ Wizard | ... | Teleport Moveable] -> [ Moveable | ... | Wizard] Sfx4
[ Wizard | ... | Teleport] -> [> Wizard | ... |]
(The Druid converts turns stone into wood, wood into stone)
[> Druid | Moveable] -> [Druid | Wall] Sfx5
[> Druid | Wall] -> [Druid | Crate] Sfx5
(The sorceress teleports through adjacent objects if possible)
[no Teleport > Sorceress | Moveable | ... | no Solid] -> [ Teleport Sorceress | Moveable | ... | Teleport] Sfx4
[Teleport Sorceress | Moveable | ... | Teleport | no Solid ] -> [ | | ... | Moveable | Sorceress]
[Teleport Sorceress | | ... | Teleport] -> [ | | ... | Sorceress]
(Character switching. Try each possibility in turn; first succeeds)
[action Fighter ] [SThief ] -> [SFighter ] [Thief ] Sfx6
[action Fighter ] [SWizard ] -> [SFighter ] [Wizard ] Sfx6
[action Fighter ] [SPriest ] -> [SFighter ] [Priest ] Sfx6
[action Fighter ] [SDruid ] -> [SFighter ] [Druid ] Sfx6
[action Fighter ] [SRanger ] -> [SFighter ] [Ranger ] Sfx6
[action Fighter ] [SSorceress] -> [SFighter ] [Sorceress] Sfx6
[action Thief ] [SWizard ] -> [SThief ] [Wizard ] Sfx6
[action Thief ] [SPriest ] -> [SThief ] [Priest ] Sfx6
[action Thief ] [SDruid ] -> [SThief ] [Druid ] Sfx6
[action Thief ] [SRanger ] -> [SThief ] [Ranger ] Sfx6
[action Thief ] [SSorceress] -> [SThief ] [Sorceress] Sfx6
[action Thief ] [SFighter ] -> [SThief ] [Fighter ] Sfx6
[action Wizard ] [SPriest ] -> [SWizard ] [Priest ] Sfx6
[action Wizard ] [SDruid ] -> [SWizard ] [Druid ] Sfx6
[action Wizard ] [SRanger ] -> [SWizard ] [Ranger ] Sfx6
[action Wizard ] [SSorceress] -> [SWizard ] [Sorceress] Sfx6
[action Wizard ] [SFighter ] -> [SWizard ] [Fighter ] Sfx6
[action Wizard ] [SThief ] -> [SWizard ] [Thief ] Sfx6
[action Priest ] [SDruid ] -> [SPriest ] [Druid ] Sfx6
[action Priest ] [SRanger ] -> [SPriest ] [Ranger ] Sfx6
[action Priest ] [SSorceress] -> [SPriest ] [Sorceress] Sfx6
[action Priest ] [SFighter ] -> [SPriest ] [Fighter ] Sfx6
[action Priest ] [SThief ] -> [SPriest ] [Thief ] Sfx6
[action Priest ] [SWizard ] -> [SPriest ] [Wizard ] Sfx6
[action Druid ] [SRanger ] -> [SDruid ] [Ranger ] Sfx6
[action Druid ] [SSorceress] -> [SDruid ] [Sorceress] Sfx6
[action Druid ] [SFighter ] -> [SDruid ] [Fighter ] Sfx6
[action Druid ] [SThief ] -> [SDruid ] [Thief ] Sfx6
[action Druid ] [SWizard ] -> [SDruid ] [Wizard ] Sfx6
[action Druid ] [SPriest ] -> [SDruid ] [Priest ] Sfx6
[action Ranger ] [SSorceress] -> [SRanger ] [Sorceress] Sfx6
[action Ranger ] [SFighter ] -> [SRanger ] [Fighter ] Sfx6
[action Ranger ] [SThief ] -> [SRanger ] [Thief ] Sfx6
[action Ranger ] [SWizard ] -> [SRanger ] [Wizard ] Sfx6
[action Ranger ] [SPriest ] -> [SRanger ] [Priest ] Sfx6
[action Ranger ] [SDruid ] -> [SRanger ] [Druid ] Sfx6
[action Sorceress] [SFighter ] -> [SSorceress] [Fighter ] Sfx6
[action Sorceress] [SThief ] -> [SSorceress] [Thief ] Sfx6
[action Sorceress] [SWizard ] -> [SSorceress] [Wizard ] Sfx6
[action Sorceress] [SPriest ] -> [SSorceress] [Priest ] Sfx6
[action Sorceress] [SDruid ] -> [SSorceress] [Druid ] Sfx6
[action Sorceress] [SRanger ] -> [SSorceress] [Ranger ] Sfx6
(Clean up dying characters from before “again”)
late [Dying Monster] -> [] Sfx0
late [Dying Hero] -> [Corpse] Sfx1
(Note if no character was previously Saved, then clear Saved state
random [] no [Saved] -> [NotSaved])
late [NotSaved] -> []
late random [] -> [NotSaved]
late [Saved] [NotSaved] -> [] []
late [Saved] -> []
(Entities start Dying next to Lethal entities or in a Dragon’s path)
late [Dragon] -> [Breathing Dragon]
late left [Breathing LDragon | ... | Solid] -> [LDragon | ... | Dying Solid]
late right [Breathing RDragon | ... | Solid] -> [RDragon | ... | Dying Solid]
late [Lethal |] -> [Lethal | Dying]
(Move Petted state to Companion if it exists elsewhere.
Play sound if Companion would be Dying and newly Petted)
late [Petted no Companion] [Companion] -> [] [Petted Companion]
late [no Companion Petted] -> []
late [Petted Companion no Dying] -> [Companion]
late [Dying Companion no Petted] -> [Petted Companion] Sfx3
(Save Priest and neighbors.
Play sound only if no character was previously Saved)
late [Dying Healer] -> [Saved Healer]
late [Dying Hero | Healer] -> [Saved Hero | Healer]
late [Saved] [NotSaved] -> [Saved] [] Sfx2
late [no Mortal] -> [no Dying]
late [Dying] -> again
(Doors try to open, but are closed if any condition blocks it)
late [YellowDoor] -> [Opening YellowDoor]
late [YellowSwitch no Weighing] [Opening YellowDoor] -> [YellowSwitch] [YellowDoor]
late [YellowSwitch no Weighing] [ YellowOpen] -> [YellowSwitch] [YellowDoor]
late [Opening YellowDoor] -> [YellowOpen] again
late [PurpleDoor] -> [Opening PurpleDoor]
late [PurpleSwitch no Weighing] [Opening PurpleDoor] -> [PurpleSwitch] [PurpleDoor]
late [PurpleSwitch no Weighing] [ PurpleOpen] -> [PurpleSwitch] [PurpleDoor]
late [Opening PurpleDoor] -> [PurpleOpen] again
late [MonsterDoor] -> [Opening MonsterDoor]
late [Monster] [Opening MonsterDoor] -> [Monster] [MonsterDoor]
late [Opening MonsterDoor] -> [] again
(Copy active/inactive state from ranger to dog)
late [SRanger] [Dog ] -> [SRanger] [SDog]
late [Ranger ] [SDog] -> [Ranger ] [Dog]
==============
WINCONDITIONS
==============
All Hero on Goal
All Goal on Hero
No Corpse
No Dying
=======
LEVELS
=======
Message Welcome back. It's been a while.
Message [You've played Jonah Ostroff's excellent originals, yes?]
Message [If not, this might be confusing.]
(***
*** Prologue
*** 1 level
***)
(Throne of Sokoban)
#########
##O#4#O##
##.O#O.##
#1#...#2#
##.G.G.##
##G.D.G##
#########
(***
*** Act I: The Sorceress
*** 4 levels
***)
Message Pink sorceress teleports through blocks.
(What Sorcery is This?)
#############
#....***....#
#.S..***..G.#
#....***....#
#############
Message She brings a block with her, if there is space.
(Wallhacking)
#############
#...#*..#...#
#.S*#.*.#.G.#
#...#..*#...#
#############
(A Familiar Arrangement)
#########
#.....#G#
#.#*..#¡#
#.**.S..#
#.......#
#.!.!.!.#
#.......#
#########
(Loop Group)
#######
#S#G#.#
#.#.#.#
#.*...#
#.###*#
#.....#
#######
(Detour Allure)
###########
#....G....#
###########
#....*.S..#
####.####.#
#....#....#
#.##.#.##.#
#.#**#.#*.#
#.##.#*##.#
#....#....#
###########
Message She can teleport through or with other heroes, too.
(Narrow Corridor)
#########
#.1S#G.G#
#########
(Two Way Street)
#######
#G.G.G#
#.....#
#######
#.....#
#F#4#7#
#######
(Jump Jail)
#######
#F...G#
###.###
#2.*#G#
###.###
#7...G#
#######
(Into the Wood)
#########
####..G.#
#####..G#
###.##..#
###..##.#
#.#...###
#5.######
#.S.#####
#########
(The Great Crate Heist)
########
#..*.###
#.***###
########
#!..!#G#
#.W7.¡.#
#!..!#G#
########
Message Get ready!
###
#S#
###
(Congratulations!)
###########
#..FT..GG.#
#.SWD.GGG.#
#.YRP..GG.#
###########
Message Thanks for playing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment