start:
gosub actions
setvariable Patient none
if_1 setvariable Patient %1
healing:
gosub Clean
if_2 then goto done
gosub heal
if "%Patient" = "none" then goto done
goto healing
done:
exit
actions:
setvariable Body 0
setvariable Poison 0
setvariable Preparedspell none
setvariable critically 4
setvariable dangerously 3
setvariable seriously 2
setvariable mildly 1
action setvariable Preparedspell yes when You are already preparing
action setvariable Preparedspell none when ^You don't have a spell prepared!|You gesture\.|With a wave of your hand|You wave your hand|The mana you were holding contributes to the spell\.
action math Harn subtract 1 when You tap into the mana
action put #setvariable Disease 0;put #setvariable Vitality 0;put #setvariable Poison 0;put #setvariable List none when You sense a successful empathic link has been forged
action put #setvariable Part $1 when Wounds to the (\w+):
action setvariable Body 1 when He is dead\.
action setvariable Body 1 when She is dead\.
action put #setvariable Part $1.$2 when Wounds to the (L|R)\w+ (\w+):
action put #setvariable List $List$1.3 when poisoned (\w+)\.
action put #setvariable List $List$1.$2.3 when poisoned (L|R)\w+ (\w+)\.
action put #setvariable List $ListNerve.3 when has a.* strong nerve poison\.
action put #if {contains("devastating|useless", $1)} {#setvariable List $List$Part.1.1.0} {#setvariable List $List$Part.1.1.1} when Fresh External:.*--.* (\w+)
action put #if {contains("devastating|useless", $1)} {#setvariable List $List$Part.1.2.0} {#setvariable List $List$Part.1.2.1} when Fresh Internal:.*--.* (\w+)
action put #setvariable List $List$Part.2.1 when (Fresh|Scars) External:
action put #setvariable List $List$Part.2.2 when (Fresh|Scars) Internal:
action put #setvariable Vitality $1 when \((.+)%\)
action goto done when ^Touch what?|^What do you want to get|^I could not find what you were referring to|^You sense nothing wrong
action put #setvariable Wounds none;put #setvariable Poison 0;put #setvariable Vitality 0;put #setvariable Disease 0;put #setvariable Fatigue 0 when Your body feels
action put #setvariable Vitality 1 when Your body feels.*beat up|Your body feels.*bad shape|Your body feels.*death's door|You feel your vitality transferring to
action put #setvariable Disease 1 when wounds are .*infected.
action put #setvariable Fatigue 1 when ^You are .*(?:very|extremely) (?:Fatigued|tired)
action put #setvariable Fatigue 2 when ^You are .*Exhaust
action put #math Poison add %$1 when (\w+) (?:strong nerve poison|poisoned)
action setvariable BS 1 when ^Your bleeding is halted|before settling itself between your shoulders.|You sense the Blood Staunching spell upon you,
action setvariable BS 0 when ^The binding force which has been holding your wounds closed wears off|You reach out with your senses.
action action remove (\w+) poisoned when The poison seems to be unaffected by the spell's power.
action put #setvariable Poison 0 when The poison seems to be unaffected by the spell's power
action send dance when eval $standing != 1
return
Clean:
if "%Patient" = "none" then return
put prep gol 10
pause 12
put cast
gosub prep Refresh 9
pause 11
gosub cast
gosub touch %Patient
if $Vitality > 0 then if %Body = 0 then gosub take
if $Disease = 1 then gosub take disease quick
if "$List" = "none" then return
gosub Cycle.take take.1
pause 6
gosub Cycle.take take.2
if contains("$List", "0") then return
setvariable Patient none
return
heal:
gosub health
if $Fatigue != 0 then gosub Refresher
gosub VH
gosub CD
gosub FP
gosub check.specific.wounds
if contains("$Wounds", "Head") then gosub check.wounds Head
if contains("$Wounds", "head") then gosub check.wounds head
if contains("$Wounds", "Skin") then gosub check.wounds Skin
if contains("$Wounds", "skin") then gosub check.wounds skin
if contains("$Wounds", "neck") then gosub check.wounds Neck
if contains("$Wounds", "neck") then gosub check.wounds neck
if contains("$Wounds", "Abdomen") then gosub check.wounds Abdomen
if contains("$Wounds", "abdomen") then gosub check.wounds abdomen
if contains("$Wounds", "chest") then gosub check.wounds chest
if contains("$Wounds", "Back") then gosub check.wounds Back
if contains("$Wounds", "back") then gosub check.wounds back
if contains("$Wounds", "right arm") then gosub check.wounds right arm
if contains("$Wounds", "left arm") then gosub check.wounds left arm
if contains("$Wounds", "right hand") then gosub check.wounds right hand
if contains("$Wounds", "left hand") then gosub check.wounds left hand
if contains("$Wounds", "right leg") then gosub check.wounds right leg
if contains("$Wounds", "left leg") then gosub check.wounds left leg
if contains("$Wounds", "right eye") then gosub check.wounds right eye
if contains("$Wounds", "left eye") then gosub check.wounds left eye
if "$Wounds" != "none" then goto heal
return
check.specific.wounds:
setvariable Healed 0
gosub VH
if contains("$Wounds", "paralysis of the entire body") then gosub Heal.spell IWH 7 7 1 nerve
if contains("$Wounds", "difficulty controlling actions") then gosub Heal.spell IWH 7 7 1 nerve
if contains("$Wounds", "some severe twitching") then gosub Heal.spell IWH 7 7 1 nerve
if contains("$Wounds", "some minor twitching") then gosub Heal.spell IWH 7 7 1 nerve
if contains("$Wounds", "general numbness all over") then gosub Heal.spell ISH 11 5 1 nerve
if contains("$Wounds", "arms and legs") then gosub Heal.spell ISH 11 5 1 nerve
if contains("$Wounds", "fingers and toes") then gosub Heal.spell ISH 11 5 1 nerve
if contains("$Wounds", "severe skin loss exposing bone and internal organs") then gosub Heal.spell ESH 10 5 2 skin
if contains("$Wounds", "severely stiff and shriveled skin that seems to be peeling off the body") then gosub Heal.spell ESH 9 8 1 skin
if contains("$Wounds", "missing chunks out of the head") then gosub Heal.spell ESH 9 8 1 head
if contains("$Wounds", "some shriveled and oddly folded skin") then gosub Heal.spell ESH 9 5 1 skin
if contains("$Wounds", "open and bleeding sores all over the skin") then gosub Heal.spell EWH 5 5 1 skin
if contains("$Wounds", "boils and sores around the skin") then gosub Heal.spell EWH 4 4 1 skin
if contains("$Wounds", "a crushed skull with horrendous wounds") then gosub Heal.spell EWH 5 5 1 head
if contains("$Wounds", "an abdomen deeply gouged with gaping wounds") then gosub Heal.spell EWH 4 4 1 abdomen
if contains("$Wounds", "a cracked skull with deep slashes") then gosub Heal.spell EWH 5 5 1 head
if contains("$Wounds", "a painful, enflamed body rash") then gosub Heal.spell EWH 4 1 1 skin
if contains("$Wounds", "some deep slashes and cuts about the head") then gosub Heal.spell EWH 4 4 1 head
if contains("$Wounds", "some moderately deep cuts about the head") then gosub Heal.spell EWH 4 4 1 head
if contains("$Wounds", "a body rash") then gosub Heal.spell EWH 4 1 1 skin
if contains("$Wounds", "a large skin rash") then gosub Heal.spell EWH 4 1 1 skin
if contains("$Wounds", "a small skin rash") then gosub Heal.spell EWH 4 1 1 skin
if contains("$Wounds", "severe scarring about the head") then gosub Heal.spell ESH 9 8 1 head
if contains("$Wounds", "severe skin discoloration") then gosub Heal.spell ESH 9 5 1 skin
if contains("$Wounds", "minor skin discoloration") then gosub Heal.spell ESH 9 5 1 skin
if contains("$Wounds", "minor scars about the head") then gosub Heal.spell ESH 9 5 1 head
if contains("$Wounds", "loss of skin tone") then gosub Heal.spell ESH 9 5 1 skin
if contains("$Wounds", "a confused look with sporadic twitching of the forehead") then gosub Heal.spell ISH 12 5 1 head
if contains("$Wounds", "a severely painful chest area with significant problems breathing") then gosub Heal.spell ISH 11 6 1 chest
if contains("$Wounds", "a severely yellow pallor and a look of starvation") then gosub Heal.spell ISH 11 7 2 abdomen
if contains("$Wounds", "a severely painful back with significant problems moving") then gosub Heal.spell ISH 11 7 1 back
if contains("$Wounds", "partial paralysis around the head") then gosub Heal.spell ISH 11 7 2 head
if contains("$Wounds", "a painful chest area and difficulty getting a breath without pain") then gosub Heal.spell ISH 11 7 1 chest
if contains("$Wounds", "a definite greenish pallor and emaciated look") then gosub Heal.spell ISH 11 7 1 abdomen
if contains("$Wounds", "a painful back and difficulty moving without pain") then gosub Heal.spell ISH 11 7 1 back
if contains("$Wounds", "a ghastly bloated head with bleeding from the ears") then gosub Heal.spell IWH 6 5 1 head
if contains("$Wounds", "major swelling and bruising around the head") then gosub Heal.spell IWH 8 4 1 head
if contains("$Wounds", "a badly bruised and swollen head") then gosub Heal.spell IWH 8 5 1 head
if contains("$Wounds", "a deeply bruised head") then gosub Heal.spell IWH 8 4 1 head
if contains("$Wounds", "a bruised head") then gosub Heal.spell IWH 6 4 1 head
if contains("$Wounds", "a somewhat emaciated look") then gosub Heal.spell ISH 12 4 1 abdomen
if contains("$Wounds", "an occasional twitch on the forehead") then gosub Heal.spell ISH 10 2 2 head
if contains("$Wounds", "an occasional twitching of the head") then gosub Heal.spell ISH 10 2 2 head
if %Healed = 0 then return
gosub health
goto check.specific.wounds
check.wounds:
gosub VH
if contains("$Wounds", "an ugly flesh stump for a $0") then gosub Heal.spell ESH 10 5 1 "$0"
if contains("$Wounds", "an empty $0 socket overgrown with bits of odd shaped flesh") then gosub Heal.spell ESH 10 5 1 "$0"
if contains("$Wounds", "mangled and malformed $0") then gosub Heal.spell ESH 10 5 1 "$0"
if contains("$Wounds", "a painfully mangled and malformed $0 in a shattered eye socket") then gosub Heal.spell ESH 10 5 1 "$0"
if contains("$Wounds", "severe scarring and chunks of flesh missing from the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "a punctured and shriveled $0") then gosub Heal.spell ESH 9 8 1 "$0"
if contains("$Wounds", "an ugly stump for a $0") then gosub Heal.spell EWH 5 5 1 "$0"
if contains("$Wounds", "a pulpy cavity for a $0") then gosub Heal.spell EWH 5 5 1 "$0"
if contains("$Wounds", "a shattered $0") then gosub Heal.spell EWH 4 4 1 "$0"
if contains("$Wounds", "a bruised, swollen and shattered $0") then gosub Heal.spell EWH 4 4 1 "$0"
if contains("$Wounds", "gaping holes in the $0") then gosub Heal.spell EWH 4 4 1 "$0"
if contains("$Wounds", "a bruised, swollen and slashed $0") then gosub Heal.spell EWH 4 4 1 "$0"
if contains("$Wounds", "a broken $0 with gaping holes") then gosub Heal.spell EWH 4 1 1 "$0"
if contains("$Wounds", "deep slashes across the $0") then gosub Heal.spell EWH 4 4 1 "$0"
if contains("$Wounds", "a bruised, swollen and bleeding $0") then gosub Heal.spell EWH 4 4 1 "$0"
if contains("$Wounds", "deep cuts across the $0") then gosub Heal.spell EWH 4 3 1 "$0"
if contains("$Wounds", "a bruised and swollen $0") then gosub Heal.spell EWH 4 3 1 "$0"
if contains("$Wounds", "cuts and bruises about the $0") then gosub Heal.spell EWH 4 3 1 "$0"
if contains("$Wounds", "a black and blue $0") then gosub Heal.spell EWH 4 1 1 "$0"
if contains("$Wounds", "some tiny scratches to the $0") then gosub Heal.spell EWH 4 2 1 "$0"
if contains("$Wounds", "some minor abrasions to the $0") then gosub Heal.spell EWH 4 1 1 "$0"
if contains("$Wounds", "severe scarring and ugly gashes about the $0") then gosub Heal.spell ESH 9 8 1 "$0"
if contains("$Wounds", "deeply scarred gashes across the $0") then gosub Heal.spell ESH 9 8 1 "$0"
if contains("$Wounds", "severe scarring along the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "severe scarring across the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "minor scarring along the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "minor scars across the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "some tiny scars across the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "a few nearly invisible scars along the $0") then gosub Heal.spell ESH 9 4 1 "$0"
if contains("$Wounds", "a completely paralyzed $0") then gosub Heal.spell ISH 10 6 3 "$0"
if contains("$Wounds", "a blind $0") then gosub Heal.spell ISH 12 6 3 "$0"
if contains("$Wounds", "a severely paralyzed $0") then gosub Heal.spell ISH 11 7 2 "$0"
if contains("$Wounds", "a completely clouded $0") then gosub Heal.spell ISH 11 7 2 "$0"
if contains("$Wounds", "a severely bloated and discolored $0") then gosub Heal.spell IWH 6 6 2 "$0"
if contains("$Wounds", "severely swollen and bruised $0") then gosub Heal.spell IWH 8 7 1 "$0"
if contains("$Wounds", "a partially paralyzed $0") then gosub Heal.spell ISH 12 3 2 "$0"
if contains("$Wounds", "a clouded $0") then gosub Heal.spell ISH 11 7 2 "$0"
if contains("$Wounds", "a severely swollen and shattered $0") then gosub Heal.spell IWH 6 7 2 "$0"
if contains("$Wounds", "a severely swollen, cruised and blind $0") then gosub Heal.spell IWH 6 7 1 "$0"
if contains("$Wounds", "a severely swollen and deeply bruised $0") then gosub Heal.spell IWH 6 6 1 "$0"
if contains("$Wounds", "a severely swollen, bruised and blind $0") then gosub Heal.spell IWH 6 7 1 "$0"
if contains("$Wounds", "a severely swollen, bruised and cloudy $0") then gosub Heal.spell IWH 8 7 1 "$0"
if contains("$Wounds", "a severely swollen, bruised and crossed $0") then gosub Heal.spell IWH 8 7 1 "$0"
if contains("$Wounds", "minor swelling and bruising around the $0") then gosub Heal.spell IWH 6 6 1 "$0"
if contains("$Wounds", "minor swelling and bruising in the $0") then gosub Heal.spell IWH 6 6 1 "$0"
if contains("$Wounds", "a constant twitching in the $0") then gosub Heal.spell ISH 10 4 1 "$0"
if contains("$Wounds", "an occasional twitching in the $0") then gosub Heal.spell ISH 10 4 1 "$0"
return
Heal.spell:
setvariable Healed 1
gosub mana
gosub prep $1 $2
pause 0.5
gosub harn $3 $4
pause 8
gosub cast $5
return
Cycle.take:
gosub $1 ABDOMEN
gosub $1 CHEST
gosub $1 BACK
gosub $1 NECK
gosub $1 HEAD
gosub $1 SKIN
gosub $1 NERVE
gosub $1 R.HAND
gosub $1 L.HAND
gosub $1 R.ARM
gosub $1 L.ARM
gosub $1 R.LEG
gosub $1 L.LEG
gosub $1 R.EYE
gosub $1 L.EYE
return
take.1:
if contains("$List", "$1.1.1.1") then gosub take $1 quick
if contains("$List", "$1.1.1.0") then gosub take $1 half quick
if contains("$List", "$1.1.2.1") then gosub take $1 int quick
if contains("$List", "$1.1.2.0") then gosub take $1 int half quick
if contains("$List", "$1.3") then gosub take $1 poison quick
return
take.2:
if contains("$List", "$1.2.1") then gosub take $1 scar quick
if contains("$List", "$1.2.2") then gosub take $1 int scar quick
return
FP:
if $Poison = 0 then return
gosub mana
gosub prep FP 6
put #math Poison mod 3;#math Poison add 1
gosub harn 4 $Poison
if $Poison = 0 then pause 3
gosub cast
gosub health
goto FP
CD:
if $Disease = 0 then return
gosub mana
gosub prep CD 10
gosub harn 5
gosub harn 5
gosub cast
gosub health
goto CD
VH:
if $Vitality = 0 then return
gosub prep VH 5
gosub harn 5
pause 0.5
gosub cast
gosub health
goto VH
Refresher:
if $Fatigue = 1 then gosub Refresh 10
if $Fatigue = 2 then gosub Refresh 20
gosub health
if $Fatigue = 0 then return
goto Refresher
Refresh:
gosub prep Refresh
pause $0
gosub cast
return
Mana:
if $mana > 95 then return
pause 2
goto Mana
# ------------------------------------------------
# Base utility labels.
# ------------------------------------------------
matchwait:
match pause ...wait
match pause Sorry, you may only type ahead
match pause You can't do that while entangled in a web.
matchwait
pause:
pause 0.3
goto %Return
return.p:
pause .1
return:
return
# ------------------------------------------------
# Checking conditions.
# ------------------------------------------------
health:
action put #setvariable Wounds $1 when ^You have ((?!no|a \S+ poisoned).+)
pause .5
action action remove ^You have ((?!no|a \S+ poisoned).+)\r when ^You have
setvariable Return health
match return.p Your body feels
put health
goto matchwait
Attunement:
setvariable Return Attunement
match return.p Attunement:
put mana
goto matchwait
# ------------------------------------------------
# Changing Conditions
# ------------------------------------------------
sit:
if not $prone = 1 then return
setvariable Return Sit
match return You sit up.
match return You sit down.
match return You are already sitting.
put sit
matchwait
# ------------------------------------------------
# Interaction with others.
# ------------------------------------------------
take:
gosub sit
setvariable Return take
match return You touch
put take %Patient $0
goto matchwait
touch:
setvariable Return touch
match return.p You touch
match return.p injuries include...
match return You sense a tugging sensation from the center of the orb, pulling at your consciousness.
put touch $0
goto matchwait
# ------------------------------------------------
# Magic labels.
# ------------------------------------------------
prep:
if "%Preparedspell" = "$1" then return
gosub release
setvariable Return prep
match prep You are already preparing
match prepared You trace an arcane sigil in the air,
match prepared You lick the tip of your finger and trace a sigil in the air
match prepared You raise your arms skyward, chanting
match prepared The wailing of lost souls accompanies
match prepared As you begin to solemnly intone the
match prepared Your eyes darken to black as a starless
match prepared You close your eyes and breathe deeply
match prepared That is not a spell you can cast.
match prepared Your skin briefly withers and tightens
match prepared Tiny tendrils of lightning jolt
match prepared You begin chanting a prayer to invoke the
match prepared You are now prepared
put prepare $0
goto matchwait
prepared:
setvariable Preparedspell $1
return
harn:
setvariable Harn 1
if "$0" != "$1" then setvariable Harn $2
harness:
if %Harn < 1 then return
setvariable Return harness
match harness You tap into the mana
match return Usage:
match return Attunement:
match mana You strain, but
put harness $1
goto matchwait
cast:
setvariable Return cast
match return.p You reach out toward
match return.p You gesture
match return You don't have a spell prepared!
match return You reach with both your hands and your
match return With a wave of your hand
match return You wave your hand
match return I could not find what you were
match return You roll your hands in an elliptical pattern in front of you
match return Invisible strands of aether roil in the air, twisting into a tight braid.
match return Your secondary spell pattern dissipates because your target is dead, but the main spell remains intact.
match return You can't cast
match mana You are unable to
put cast $0
goto matchwait
release:
if "%Preparedspell" = "none" then return
setvariable Return release
match return Type RELEASE HELP
match return You aren't holding
match return You release
put release $0
goto matchwait