; substitutes.tf /purge tfsubst* /def -p999 -F -mregexp -t"^> " tfsubstPrompt = \ /substitute -a -p %{PR} /def -p2 -F -mregexp -t"^You feel more secure" tfsubstPlusDis = \ /substitute -a -p %{PL}You feel more secure (+ DIS)%{PR} /def -p2 -F -mregexp -t"but find no herbs" tfsubstNoHerbs = \ /substitute -a -p %{PL}but find no HERBS%{PR} /def -p2 -F -mregexp -t"howls:" tfsubstHowls = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"yells:" tfsubstYells = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"squeals:" tfsubstSqueals = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"chirps:" tfsubstChirps = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"jabbers:" tfsubstJabbers = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"blurts:" tfsubstBlurts = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"speaks in a hushed voice:" tfsubstSIAHVoice = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"booms:" tfsubstBooms = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"hisses:" tfsubstHisses = \ /substitute -a -p %{PL}says:%{PR} /def -p2 -F -mregexp -t"thunders:" tfsubstThunders = \ /substitute -a -p %{PL}says:%{PR} ; ---------------------- VITALS start ---------------------- /def -p2 -F -mregexp -t"at death's door" tfsubstHealth0 = \ /substitute -a -p %{PL}at death's door (0)%{PR} /def -p2 -F -mregexp -t"barely alive" tfsubstHealth1 = \ /substitute -a -p %{PL}barely alive (1)%{PR} /def -p2 -F -mregexp -t"terribly hurt" tfsubstHealth2 = \ /substitute -a -p %{PL}terribly hurt (2)%{PR} /def -p2 -F -mregexp -t"in a very bad shape" tfsubstHealth3 = \ /substitute -a -p %{PL}in a very bad shape (3)%{PR} /def -p2 -F -mregexp -t"in a bad shape" tfsubstHealth4 = \ /substitute -a -p %{PL}in a bad shape (4)%{PR} /def -p2 -F -mregexp -t"very hurt" tfsubstHealth5 = \ /substitute -a -p %{PL}very hurt (5)%{PR} /def -p2 -F -mregexp -t"feeling rather hurt" tfsubstHealth6 = \ /substitute -a -p %{PL}feeling rather hurt (6)%{PR} /def -p2 -F -mregexp -t"physically hurt" tfsubstHealth7a = \ /substitute -a -p %{PL}physically hurt (7)%{PR} /def -p2 -F -mregexp -t"is hurt" tfsubstHealth7b = \ /substitute -a -p %{PL}is hurt (7)%{PR} /def -p2 -F -mregexp -t"somewhat hurt" tfsubstHealth8 = \ /substitute -a -p %{PL}somewhat hurt (8)%{PR} /def -p2 -F -mregexp -t"slightly hurt" tfsubstHealth9 = \ /substitute -a -p %{PL}slightly hurt (9)%{PR} /def -p2 -F -mregexp -t"feeling very well" tfsubstHealth10 = \ /substitute -a -p %{PL}feeling very well (10)%{PR} /def -p2 -F -mregexp -t"mentally in a vegetable state\.$" tfsubstMental0 = \ /substitute -a -p %{PL}mentally in a vegetable state (0). /def -p2 -F -mregexp -t"mentally exhausted\.$" tfsubstMental1 = \ /substitute -a -p %{PL}mentally exhausted (1). /def -p2 -F -mregexp -t"mentally worn down\.$" tfsubstMental2 = \ /substitute -a -p %{PL}mentally worn down (2). /def -p2 -F -mregexp -t"mentally indisposed\.$" tfsubstMental3 = \ /substitute -a -p %{PL}mentally indisposed (3). /def -p2 -F -mregexp -t"mentally in a bad shape\.$" tfsubstMental4 = \ /substitute -a -p %{PL}mentally in a bad shape (4). /def -p2 -F -mregexp -t"mentally very degraded\.$" tfsubstMental5 = \ /substitute -a -p %{PL}mentally very degraded (5). /def -p2 -F -mregexp -t"mentally rather degraded\.$" tfsubstMental6 = \ /substitute -a -p %{PL}mentally rather degraded (6). /def -p2 -F -mregexp -t"mentally degraded\.$" tfsubstMental7 = \ /substitute -a -p %{PL}mentally degraded (7). /def -p2 -F -mregexp -t"mentally somewhat degraded\.$" tfsubstMental8 = \ /substitute -a -p %{PL}mentally somewhat degraded (8). /def -p2 -F -mregexp -t"mentally slightly degraded\.$" tfsubstMental9 = \ /substitute -a -p %{PL}mentally slightly degraded (9). /def -p2 -F -mregexp -t"mentally in full vigour\.$" tfsubstMental10 = \ /substitute -a -p %{PL}mentally in full vigour (10). /def -p2 -F -mregexp -t"^(> |)You feel (slightly |somewhat ||very |extremely )(panicky|worried|uneasy|calm|secure) and (slightly |somewhat ||very |extremely )(exhausted|tired|weary|alert)\.$" tfsubstVitalsFatigue = \ /if ({P2} =~ 'extremely ' & {P3} =~ 'panicky') \ /set vitalPanic 1%; \ /elseif ({P2} =~ 'very ' & {P3} =~ 'panicky') \ /set vitalPanic 2%; \ /elseif ({P2} =~ '' & {P3} =~ 'panicky') \ /set vitalPanic 3%; \ /elseif ({P2} =~ 'somewhat ' & {P3} =~ 'panicky') \ /set vitalPanic 4%; \ /elseif ({P2} =~ 'slightly ' & {P3} =~ 'panicky') \ /set vitalPanic 5%; \ /elseif ({P2} =~ 'extremely ' & {P3} =~ 'worried') \ /set vitalPanic 6%; \ /elseif ({P2} =~ 'very ' & {P3} =~ 'worried') \ /set vitalPanic 7%; \ /elseif ({P2} =~ '' & {P3} =~ 'worried') \ /set vitalPanic 8%; \ /elseif ({P2} =~ 'somewhat ' & {P3} =~ 'worried') \ /set vitalPanic 9%; \ /elseif ({P2} =~ 'slightly ' & {P3} =~ 'worried') \ /set vitalPanic 10%; \ /elseif ({P2} =~ 'extremely ' & {P3} =~ 'uneasy') \ /set vitalPanic 11%; \ /elseif ({P2} =~ 'very ' & {P3} =~ 'uneasy') \ /set vitalPanic 12%; \ /elseif ({P2} =~ '' & {P3} =~ 'uneasy') \ /set vitalPanic 13%; \ /elseif ({P2} =~ 'somewhat ' & {P3} =~ 'uneasy') \ /set vitalPanic 14%; \ /elseif ({P2} =~ 'slightly ' & {P3} =~ 'uneasy') \ /set vitalPanic 15%; \ /elseif ({P2} =~ 'slightly ' & {P3} =~ 'calm') \ /set vitalPanic 16%; \ /elseif ({P2} =~ 'somewhat ' & {P3} =~ 'calm') \ /set vitalPanic 17%; \ /elseif ({P2} =~ '' & {P3} =~ 'calm') \ /set vitalPanic 18%; \ /elseif ({P2} =~ 'very ' & {P3} =~ 'calm') \ /set vitalPanic 19%; \ /elseif ({P2} =~ 'extremely ' & {P3} =~ 'calm') \ /set vitalPanic 20%; \ /elseif ({P2} =~ 'slightly ' & {P3} =~ 'secure') \ /set vitalPanic 21%; \ /elseif ({P2} =~ 'somewhat ' & {P3} =~ 'secure') \ /set vitalPanic 22%; \ /elseif ({P2} =~ '' & {P3} =~ 'secure') \ /set vitalPanic 23%; \ /elseif ({P2} =~ 'very ' & {P3} =~ 'secure') \ /set vitalPanic 24%; \ /elseif ({P2} =~ 'extremely ' & {P3} =~ 'secure') \ /set vitalPanic 25%; \ /endif%; \ /if ({P4} =~ 'extremely ' & {P5} =~ 'exhausted') \ /set vitalFatigue 1%; \ /elseif ({P4} =~ 'very ' & {P5} =~ 'exhausted') \ /set vitalFatigue 2%; \ /elseif ({P4} =~ '' & {P5} =~ 'exhausted') \ /set vitalFatigue 3%; \ /elseif ({P4} =~ 'somewhat ' & {P5} =~ 'exhausted') \ /set vitalFatigue 4%; \ /elseif ({P4} =~ 'slightly ' & {P5} =~ 'exhausted') \ /set vitalFatigue 5%; \ /elseif ({P4} =~ 'extremely ' & {P5} =~ 'tired') \ /set vitalFatigue 6%; \ /elseif ({P4} =~ 'very ' & {P5} =~ 'tired') \ /set vitalFatigue 7%; \ /elseif ({P4} =~ '' & {P5} =~ 'tired') \ /set vitalFatigue 8%; \ /elseif ({P4} =~ 'somewhat ' & {P5} =~ 'tired') \ /set vitalFatigue 9%; \ /elseif ({P4} =~ 'slightly ' & {P5} =~ 'tired') \ /set vitalFatigue 10%; \ /elseif ({P4} =~ 'extremely ' & {P5} =~ 'weary') \ /set vitalFatigue 11%; \ /elseif ({P4} =~ 'very ' & {P5} =~ 'weary') \ /set vitalFatigue 12%; \ /elseif ({P4} =~ '' & {P5} =~ 'weary') \ /set vitalFatigue 13%; \ /elseif ({P4} =~ 'somewhat ' & {P5} =~ 'weary') \ /set vitalFatigue 14%; \ /elseif ({P4} =~ 'slightly ' & {P5} =~ 'weary') \ /set vitalFatigue 15%; \ /elseif ({P4} =~ 'slightly ' & {P5} =~ 'alert') \ /set vitalFatigue 16%; \ /elseif ({P4} =~ 'somewhat ' & {P5} =~ 'alert') \ /set vitalFatigue 17%; \ /elseif ({P4} =~ '' & {P5} =~ 'alert') \ /set vitalFatigue 18%; \ /elseif ({P4} =~ 'very ' & {P5} =~ 'alert') \ /set vitalFatigue 19%; \ /elseif ({P4} =~ 'extremely ' & {P5} =~ 'alert') \ /set vitalFatigue 20%; \ /endif%; \ /substitute -a -p You feel %{P2}%{P3} (%{vitalPanic}) and %{P4}%{P5} (%{vitalFatigue}). /def -p2 -F -mregexp -t"^(> |)You can (barely eat more|eat a little more|eat some more|eat a lot more|eat quite a lot more) and (barely drink more|drink a little more|drink some more|drink a lot more|drink quite a lot more)\.$$" tfsubstVitalsSoaked = \ /if ({P2} =~ 'barely eat more') \ /set vitalStuffed 4%; \ /elseif ({P2} =~ 'eat a little more') \ /set vitalStuffed 3%; \ /elseif ({P2} =~ 'eat some more') \ /set vitalStuffed 2%; \ /elseif ({P2} =~ 'eat a lot more') \ /set vitalStuffed 1%; \ /elseif ({P2} =~ 'eat quite a lot more') \ /set vitalStuffed 0%; \ /endif%; \ /if ({P3} =~ 'barely drink more') \ /set vitalSoaked 4%; \ /elseif ({P3} =~ 'drink a little more') \ /set vitalSoaked 3%; \ /elseif ({P3} =~ 'drink some more') \ /set vitalSoaked 2%; \ /elseif ({P3} =~ 'drink a lot more') \ /set vitalSoaked 1%; \ /elseif ({P3} =~ 'drink quite a lot more') \ /set vitalSoaked 0%; \ /endif%; \ /substitute -a -p You can %{P2} (%{vitalStuffed}) and %{P3} (%{vitalSoaked}). /def -p2 -F -mregexp -t"^(> |)You are (slightly |somewhat ||very |extremely )(sober|tipsy|intoxicated|drunk|tanked|blitzed|wasted|toasted|pissed|stoned|obliviated)\.$" tfsubstIntox = \ /if ({P2} =~ 'slightly ') \ /set intoxValue 1%; \ /elseif ({P2} =~ 'somewhat ') \ /set intoxValue 2%; \ /elseif ({P2} =~ '') \ /set intoxValue 3%; \ /elseif ({P2} =~ 'very ') \ /set intoxValue 4%; \ /elseif ({P2} =~ 'extremely ') \ /set intoxValue 5%; \ /endif%; \ /if ({P3} =~ 'sober') \ /set intoxValue 0%; \ /elseif ({P3} =~ 'tipsy') \ /set intoxValue=$[intoxValue + 0]%; \ /elseif ({P3} =~ 'intoxicated') \ /set intoxValue=$[intoxValue + 5]%; \ /elseif ({P3} =~ 'drunk') \ /set intoxValue=$[intoxValue + 10]%; \ /elseif ({P3} =~ 'tanked') \ /set intoxValue=$[intoxValue + 15]%; \ /elseif ({P3} =~ 'blitzed') \ /set intoxValue=$[intoxValue + 20]%; \ /elseif ({P3} =~ 'wasted') \ /set intoxValue=$[intoxValue + 25]%; \ /elseif ({P3} =~ 'toasted') \ /set intoxValue=$[intoxValue + 30]%; \ /elseif ({P3} =~ 'pissed') \ /set intoxValue=$[intoxValue + 35]%; \ /elseif ({P3} =~ 'stoned') \ /set intoxValue=$[intoxValue + 40]%; \ /elseif ({P3} =~ 'obliviated') \ /set intoxValue=$[intoxValue + 45]%; \ /endif%; \ /substitute -a -p You are %{P2}%{P3} (%{intoxValue}). /def -p2 -F -mregexp -t"^(> |)You are (damned|demonic|beastly|malevolent|evil|foul|nasty|wicked|sinister|unsympathetic|untrustworthy|disagreeable|neutral|agreeable|trustworthy|sympathetic|nice|sweet|good|devout|blessed|saintly|holy)\.$" tfsubstAlignment = \ /if ({P2} =~ 'damned') \ /set newAlign -12%; \ /elseif ({P2} =~ 'demonic') \ /set newAlign -11%; \ /elseif ({P2} =~ 'beastly') \ /set newAlign -10%; \ /elseif ({P2} =~ 'malevolent') \ /set newAlign -9%; \ /elseif ({P2} =~ 'evil') \ /set newAlign -8%; \ /elseif ({P2} =~ 'foul') \ /set newAlign -7%; \ /elseif ({P2} =~ 'nasty') \ /set newAlign -6%; \ /elseif ({P2} =~ 'wicked') \ /set newAlign -5%; \ /elseif ({P2} =~ 'sinister') \ /set newAlign -4%; \ /elseif ({P2} =~ 'unsympathetic') \ /set newAlign -3%; \ /elseif ({P2} =~ 'untrustworthy') \ /set newAlign -2%; \ /elseif ({P2} =~ 'disagreeable') \ /set newAlign -1%; \ /elseif ({P2} =~ 'neutral') \ /set newAlign 0%; \ /elseif ({P2} =~ 'agreeable') \ /set newAlign 1%; \ /elseif ({P2} =~ 'trustworthy') \ /set newAlign 2%; \ /elseif ({P2} =~ 'sympathetic') \ /set newAlign 3%; \ /elseif ({P2} =~ 'nice') \ /set newAlign 4%; \ /elseif ({P2} =~ 'sweet') \ /set newAlign 5%; \ /elseif ({P2} =~ 'good') \ /set newAlign 6%; \ /elseif ({P2} =~ 'devout') \ /set newAlign 7%; \ /elseif ({P2} =~ 'blessed') \ /set newAlign 8%; \ /elseif ({P2} =~ 'saintly') \ /set newAlign 9%; \ /elseif ({P2} =~ 'holy') \ /set newAlign 10%; \ /endif%; \ /substitute -a -p You are %{P2} (%{newAlign}).%; \ checkAlign %{newAlign} /def -p2 -F -msimple -t"You are unencumbered." tfsubstUnencumbered = \ /substitute -a -p You are unencumbered (0-15%%). /def -p2 -F -msimple -t"You are lightly burdened." tfsubstLightlyBurdened = \ /substitute -a -p You are lightly burdened (15%%-29%%). /def -p2 -F -msimple -t"You are burdened." tfsubstBurdened = \ /substitute -a -p You are burdened (29-43%%). /def -p2 -F -msimple -t"You are encumbered." tfsubstEncumbered = \ /substitute -a -p You are encumbered (43-58%%). /def -p2 -F -msimple -t"You are heavily loaded." tfsubstHeavilyLoaded = \ /substitute -a -p You are heavily loaded (58-72%%). /def -p2 -F -msimple -t"You are over taxed." tfsubstOverTaxed = \ /substitute -a -p You are over taxed (72-86%%). /def -p2 -F -msimple -t"You are collapsing under your load." tfsubstCollapsing = \ /substitute -a -p You are collapsing under your load (86-100%%). ; ---------------------- VITALS end ---------------------- /def -p2 -F -mregexp -t"^You have made (no measurable|insignificant|minimal|slight|low|a little|some|modest|average|nice|good|very good|great|extremely good|immense|fantastic) progress since you " tfsubstXpProgress = \ /if ({P1} =~ 'no measurable') \ /set progressValue -%; \ /elseif ({P1} =~ 'insignificant') \ /set progressValue 0%; \ /elseif ({P1} =~ 'minimal') \ /set progressValue 1%; \ /elseif ({P1} =~ 'slight') \ /set progressValue 2%; \ /elseif ({P1} =~ 'low') \ /set progressValue 3%; \ /elseif ({P1} =~ 'a little') \ /set progressValue 4%; \ /elseif ({P1} =~ 'some') \ /set progressValue 5%; \ /elseif ({P1} =~ 'modest') \ /set progressValue 6%; \ /elseif ({P1} =~ 'average') \ /set progressValue 7%; \ /elseif ({P1} =~ 'nice') \ /set progressValue 8%; \ /elseif ({P1} =~ 'good') \ /set progressValue 9%; \ /elseif ({P1} =~ 'very good') \ /set progressValue 10%; \ /elseif ({P1} =~ 'great') \ /set progressValue 11%; \ /elseif ({P1} =~ 'extremely good') \ /set progressValue 12%; \ /elseif ({P1} =~ 'immense') \ /set progressValue 13%; \ /elseif ({P1} =~ 'fantastic') \ /set progressValue 14%; \ /endif%; \ /substitute -a -p You have made %{P1} (%{progressValue}) progress since you %{PR} /def -p2 -F -mregexp -t"^You are (extremely |very |somewhat |slightly |)(pacifistic|meek|touchy|brutal|violent)\.$" tfsubstBrutality = \ /if ({P1} =~ 'extremely' & {P2} =~ 'pacifistic') \ /set bruteValue 1%; \ /elseif ({P1} =~ 'very ' & {P2} =~ 'pacifistic') \ /set bruteValue 2%; \ /elseif ({P1} =~ '' & {P2} =~ 'pacifistic') \ /set bruteValue 3%; \ /elseif ({P1} =~ 'somewhat ' & {P2} =~ 'pacifistic') \ /set bruteValue 4%; \ /elseif ({P1} =~ 'slightly ' & {P2} =~ 'pacifistic') \ /set bruteValue 5%; \ /elseif ({P1} =~ 'extremely ' & {P2} =~ 'meek') \ /set bruteValue 6%; \ /elseif ({P1} =~ 'very ' & {P2} =~ 'meek') \ /set bruteValue 7%; \ /elseif ({P1} =~ '' & {P2} =~ 'meek') \ /set bruteValue 8%; \ /elseif ({P1} =~ 'somewhat ' & {P2} =~ 'meek') \ /set bruteValue 9%; \ /elseif ({P1} =~ 'slightly ' & {P2} =~ 'meek') \ /set bruteValue 10%; \ /elseif ({P1} =~ 'slightly ' & {P2} =~ 'touchy') \ /set bruteValue 11%; \ /elseif ({P1} =~ 'somewhat ' & {P2} =~ 'touchy') \ /set bruteValue 12%; \ /elseif ({P1} =~ '' & {P2} =~ 'touchy') \ /set bruteValue 13%; \ /elseif ({P1} =~ 'very ' & {P2} =~ 'touchy') \ /set bruteValue 14%; \ /elseif ({P1} =~ 'extremely ' & {P2} =~ 'touchy') \ /set bruteValue 15%; \ /elseif ({P1} =~ 'slightly ' & {P2} =~ 'brutal') \ /set bruteValue 16%; \ /elseif ({P1} =~ 'somewhat ' & {P2} =~ 'brutal') \ /set bruteValue 17%; \ /elseif ({P1} =~ '' & {P2} =~ 'brutal') \ /set bruteValue 18%; \ /elseif ({P1} =~ 'very ' & {P2} =~ 'brutal') \ /set bruteValue 19%; \ /elseif ({P1} =~ 'extremely ' & {P2} =~ 'brutal') \ /set bruteValue 20%; \ /elseif ({P1} =~ 'slightly ' & {P2} =~ 'violent') \ /set bruteValue 21%; \ /elseif ({P1} =~ 'somewhat ' & {P2} =~ 'violent') \ /set bruteValue 22%; \ /elseif ({P1} =~ '' & {P2} =~ 'violent') \ /set bruteValue 23%; \ /elseif ({P1} =~ 'very ' & {P2} =~ 'violent') \ /set bruteValue 24%; \ /elseif ({P1} =~ 'extremely ' & {P2} =~ 'violent') \ /set bruteValue 25%; \ /endif%; \ /substitute -a -p You are %{P1}%{P2} (%{bruteValue}). /def -p2 -F -mregexp -t", (N|n)ovice, " tfsubstMLevelNovice = \ /substitute -a -p %{PL}, %{P1}ovice (0), %{PR} /def -p2 -F -mregexp -t", (G|g)reenhorne, " tfsubstMLevelGreenhorne = \ /substitute -a -p %{PL}, %{P1}reenhorne (10), %{PR} /def -p2 -F -mregexp -t", (B|b)eginner, " tfsubstMLevelBeginner = \ /substitute -a -p %{PL}, %{P1}eginner (20), %{PR} /def -p2 -F -mregexp -t", (A|a)pprentice, " tfsubstMLevelApprentice = \ /substitute -a -p %{PL}, %{P1}pprentice (30), %{PR} /def -p2 -F -mregexp -t", (W|w)anderer, " tfsubstMLevelWanderer = \ /substitute -a -p %{PL}, %{P1}anderer (40), %{PR} /def -p2 -F -mregexp -t", (A|a)dventurer, " tfsubstMLevelAdventurer = \ /substitute -a -p %{PL}, %{P1}dventurer (50), %{PR} /def -p2 -F -mregexp -t", (A|a)dept, " tfsubstMLevelAdept = \ /substitute -a -p %{PL}, %{P1}dept (60), %{PR} /def -p2 -F -mregexp -t", (G|g)reat adventurer, " tfsubstMLevelGreatAdventurer = \ /substitute -a -p %{PL}, %{P1}reat adventurer (70), %{PR} /def -p2 -F -mregexp -t", (V|v)eteran, " tfsubstMLevelVeteran = \ /substitute -a -p %{PL}, %{P1}eteran (80), %{PR} /def -p2 -F -mregexp -t", (E|e)xpert, " tfsubstMLevelExpert = \ /substitute -a -p %{PL}, %{P1}xpert (90), %{PR} /def -p2 -F -mregexp -t", (R|r)ising hero, " tfsubstMLevelRisingHero = \ /substitute -a -p %{PL}, %{P1}ising hero (100), %{PR} /def -p2 -F -mregexp -t", (H|h)ero, " tfsubstMLevelHero = \ /substitute -a -p %{PL}, %{P1}ero (110), %{PR} /def -p2 -F -mregexp -t", (T|t)itan, " tfsubstMLevelTitan = \ /substitute -a -p %{PL}, %{P1}itan (120), %{PR} /def -p2 -F -mregexp -t", (C|c)hampion, " tfsubstMLevelChampion = \ /substitute -a -p %{PL}, %{P1}hampion (130), %{PR} /def -p2 -F -mregexp -t", (L|l)egend, " tfsubstMLevelLegend = \ /substitute -a -p %{PL}, %{P1}egend (140), %{PR} /def -p2 -F -mregexp -t", (M|m)yth, " tfsubstMLevelMyth = \ /substitute -a -p %{PL}, %{P1}yth (150), %{PR} /def -p2 -F -mregexp -t"^You are (very far from|far from|halfway to|close to|very close to) (developing|rising|progressing|advancing|improving) to (.*)\.$" tfsubstStatProgress = \ /if ({P1} =~ 'very far from') \ /set statValue 0%; \ /elseif ({P1} =~ 'far from') \ /set statValue 2%; \ /elseif ({P1} =~ 'halfway to') \ /set statValue 4%; \ /elseif ({P1} =~ 'close to') \ /set statValue 6%; \ /elseif ({P1} =~ 'very close to') \ /set statValue 8%; \ /endif%; \ /if ({P3} =~ 'puny' | {P3} =~ 'stiff' | {P3} =~ 'sickly' | {P3} =~ 'moronic' | {P3} =~ 'inane' | {P3} =~ 'gutless') \ /set statValue=$[statValue - 999]%; \ /elseif ({P3} =~ 'feeble' | {P3} =~ 'lumbering' | {P3} =~ 'fragile' | {P3} =~ 'dimwitted' | {P3} =~ 'stupid' | {P3} =~ 'frightened') \ /set statValue=$[statValue + 0]%; \ /elseif ({P3} =~ 'flimsy' | {P3} =~ 'clumsy' | {P3} =~ 'frail' | {P3} =~ 'simple' | {P3} =~ 'idiotic' | {P3} =~ 'spineless') \ /set statValue=$[statValue + 10]%; \ /elseif ({P3} =~ 'weak' | {P3} =~ 'deft' | {P3} =~ 'skinny' | {P3} =~ 'dense' | {P3} =~ 'foolish' | {P3} =~ 'fearful') \ /set statValue=$[statValue + 20]%; \ /elseif ({P3} =~ 'well built' | {P3} =~ 'flexible' | {P3} =~ 'lean' | {P3} =~ 'slow' | {P3} =~ 'uneducated' | {P3} =~ 'cowardly') \ /set statValue=$[statValue + 30]%; \ /elseif ({P3} =~ 'muscular' | {P3} =~ 'nimble' | {P3} =~ 'healthy' | {P3} =~ 'limited' | {P3} =~ 'literate' | {P3} =~ 'insecure') \ /set statValue=$[statValue + 40]%; \ /elseif ({P3} =~ 'hefty' | {P3} =~ 'lithe' | {P3} =~ 'firm' | {P3} =~ 'keen' | {P3} =~ 'educated' | {P3} =~ 'timid') \ /set statValue=$[statValue + 50]%; \ /elseif ({P3} =~ 'strong' | {P3} =~ 'supple' | {P3} =~ 'hearty' | {P3} =~ 'clever' | {P3} =~ 'learned' | {P3} =~ 'sound') \ /set statValue=$[statValue + 60]%; \ /elseif ({P3} =~ 'powerful' | {P3} =~ 'agile' | {P3} =~ 'hardy' | {P3} =~ 'quick minded' | {P3} =~ 'scholarly' | {P3} =~ 'bold') \ /set statValue=$[statValue + 70]%; \ /elseif ({P3} =~ 'musclebound' | {P3} =~ 'swift' | {P3} =~ 'hale' | {P3} =~ 'intelligent' | {P3} =~ 'cultivated' | {P3} =~ 'brave') \ /set statValue=$[statValue + 80]%; \ /elseif ({P3} =~ 'ironlike' | {P3} =~ 'quick' | {P3} =~ 'robust' | {P3} =~ 'sharp' | {P3} =~ 'knowledgeable' | {P3} =~ 'courageous') \ /set statValue=$[statValue + 90]%; \ /elseif ({P3} =~ 'forceful' | {P3} =~ 'graceful' | {P3} =~ 'staunch' | {P3} =~ 'bright' | {P3} =~ 'erudite' | {P3} =~ 'fearless') \ /set statValue=$[statValue + 100]%; \ /elseif ({P3} =~ 'crushing' | {P3} =~ 'athletic' | {P3} =~ 'tough' | {P3} =~ 'inventive' | {P3} =~ 'wise' | {P3} =~ 'valiant') \ /set statValue=$[statValue + 110]%; \ /elseif ({P3} =~ 'mighty' | {P3} =~ 'gymnastic' | {P3} =~ 'sturdy' | {P3} =~ 'ingenious' | {P3} =~ 'sage' | {P3} =~ 'heroic') \ /set statValue=$[statValue + 120]%; \ /elseif ({P3} =~ 'titanic' | {P3} =~ 'acrobatic' | {P3} =~ 'vigorous' | {P3} =~ 'brilliant' | {P3} =~ 'enlightened' | {P3} =~ 'lionhearted') \ /set statValue=$[statValue + 130]%; \ /elseif ({P3} =~ 'epic strength' | {P3} =~ 'epic dexterity' | {P3} =~ 'epic constitution' | {P3} =~ 'epic intelligence' | {P3} =~ 'epic wisdom' | {P3} =~ 'epic discipline') \ /set statValue=$[statValue + 140]%; \ /elseif ({P3} =~ 'immortal strength' | {P3} =~ 'immortal dexterity' | {P3} =~ 'immortal constitution' | {P3} =~ 'immortal intelligence' | {P3} =~ 'immortal wisdom' | {P3} =~ 'immortal discipline') \ /set statValue=$[statValue + 150]%; \ /elseif ({P3} =~ 'supreme strength' | {P3} =~ 'supreme dexterity' | {P3} =~ 'supreme constitution' | {P3} =~ 'supreme intelligence' | {P3} =~ 'supreme wisdom' | {P3} =~ 'supreme discipline') \ /set statValue=$[statValue + 150]%; \ /endif%; \ /substitute -a -p You are %{P1} %{P2} to %{P3} (%{statValue}). /def -p2 -F -mregexp -t"^You are (just beginning on the path to|very far from|a long distance from|a fair distance from|just under halfway to|just over halfway to|getting closer to|fairly close to|very close to|on the verge of) (advancing|developing|progressing|being promoted|rising) to (novice|greenhorne|beginner|apprentice|wanderer|adventurer|adept|great adventurer|veteran|expert|rising hero|hero|titan|champion|legend|myth)\.$" tfsubstMortalProgress = \ /if ({P1} =~ 'just beginning on the path to') \ /set mortalValue 0%; \ /elseif ({P1} =~ 'very far from') \ /set mortalValue 1%; \ /elseif ({P1} =~ 'a long distance from') \ /set mortalValue 2%; \ /elseif ({P1} =~ 'a fair distance from') \ /set mortalValue 3%; \ /elseif ({P1} =~ 'just under halfway to') \ /set mortalValue 4%; \ /elseif ({P1} =~ 'just over halfway to') \ /set mortalValue 5%; \ /elseif ({P1} =~ 'getting closer to') \ /set mortalValue 6%; \ /elseif ({P1} =~ 'fairly close to') \ /set mortalValue 7%; \ /elseif ({P1} =~ 'very close to') \ /set mortalValue 8%; \ /elseif ({P1} =~ 'on the verge of') \ /set mortalValue 9%; \ /endif%; \ /if ({P3} =~ 'novice') \ /set mortalValue=$[mortalValue - 999]%; \ /elseif ({P3} =~ 'greenhorne') \ /set mortalValue=$[mortalValue + 0]%; \ /elseif ({P3} =~ 'beginner') \ /set mortalValue=$[mortalValue + 10]%; \ /elseif ({P3} =~ 'apprentice') \ /set mortalValue=$[mortalValue + 20]%; \ /elseif ({P3} =~ 'wanderer') \ /set mortalValue=$[mortalValue + 30]%; \ /elseif ({P3} =~ 'adventurer') \ /set mortalValue=$[mortalValue + 40]%; \ /elseif ({P3} =~ 'adept') \ /set mortalValue=$[mortalValue + 50]%; \ /elseif ({P3} =~ 'great adventurer') \ /set mortalValue=$[mortalValue + 60]%; \ /elseif ({P3} =~ 'veteran') \ /set mortalValue=$[mortalValue + 70]%; \ /elseif ({P3} =~ 'expert') \ /set mortalValue=$[mortalValue + 80]%; \ /elseif ({P3} =~ 'rising hero') \ /set mortalValue=$[mortalValue + 90]%; \ /elseif ({P3} =~ 'hero') \ /set mortalValue=$[mortalValue + 100]%; \ /elseif ({P3} =~ 'titan') \ /set mortalValue=$[mortalValue + 110]%; \ /elseif ({P3} =~ 'champion') \ /set mortalValue=$[mortalValue + 120]%; \ /elseif ({P3} =~ 'legend') \ /set mortalValue=$[mortalValue + 130]%; \ /elseif ({P3} =~ 'myth') \ /set mortalValue=$[mortalValue + 140]%; \ /endif%; \ /substitute -a -p Level: %{mortalValue} /def -F -mregexp -t"^Your (primary|secondary) focus is on (strength|dexterity|constitution|intelligence|wisdom|discipline)\.$" tfsubstMedFocus1 = \ /if ({P2} =~ 'strength') \ /set focus STR%; \ /elseif ({P2} =~ 'dexterity') \ /set focus DEX%; \ /elseif ({P2} =~ 'constitution') \ /set focus CON%; \ /elseif ({P2} =~ 'intelligence') \ /set focus INT%; \ /elseif ({P2} =~ 'wisdom') \ /set focus WIS%; \ /elseif ({P2} =~ 'discipline') \ /set focus DIS%; \ /endif%; \ /if ({P1} =~ 'primary') \ /set primaryFocus %{focus}%; \ /substitute -a -p%; \ /else \ /substitute -a -p Focus: %{primaryFocus} & %{focus}%; \ /endif /def -F -msimple -ag -t"The focus on your other stats is distributed evenly." tfsubstMedFocus2 ; ---------------------- FIGHT start ---------------------- /def -p5 -mregexp -ag -t"^You (beat|barely scrape|nick|just nick|rake|graze|cut|jab|scratch|seriously stab|seriously cut|seriously beat|stab|batter|pound|lightly bruise|rip into|viciously impale|fiercely rive|brutally pummel|pierce|barely touch|slice open|slash|tear into|lacerate|impale|nearly sever|almost sever|nearly sunder|gouge|lance through) (.*) with your (.*)\.$" tfsubstFightAtt1 = \ /tfshow %{P3}: %{P1} /def -p5 -mregexp -ag -t"^You (stab|bury|graze|scrape|drive) your (.*) (into|along) (.*)\.$" tfsubstFightAtt1b = \ /tfshow %{P2}:: %{P1} /def -F -mregexp -ag -t"^(The |)(.*) dodges your attack\.$" tfsubstFightAtt2 = \ /tfshow Dodge /def -F -mregexp -ag -t"^You (swing|thrust|strike) at (the |)([^']*)'s (.*) with your ([^,]*), but (he|she|it) (easily |)(dodges|parries) your attack\.$" tfsubstFightAtt3 = \ /tfshow %{P5}: %{P7}%{P8} /def -F -mregexp -ag -t"^You (swing|thrust|strike) at (the |)([^']*)'s (.*) with your ([^,]*), but (his|her|its) (.*) protects (him|her|it)\.$" tfsubstFightAtt4 = \ /tfshow %{P5}: %{P7} /def -F -mregexp -ag -t"^(The |)(.*) (grazes|scrapes|just nicks|lightly bruises|barely scrapes|cuts|beats|stabs|jabs|batters|scratches|pounds|rakes) your (.*) with ([^\.]*)(\.|)$" tfsubstFightDef1 = \ /tfshow %{P2}... %{P3} %{P4} /def -F -mregexp -ag -t"^(The |)(.*) (strikes|swings|thrusts) at your (.*) with ([^,]*), but you (easily |)(dodge|parry) (his|her|its) attack\.$" tfsubstFightDef2 = \ /tfshow %{P2}... %{P6}%{P7} /def -F -mregexp -ag -t"^(The |)(.*) (strikes|swings|thrusts) at your (.*) with ([^,]*), but your (.*) protects you\.$" tfsubstFightDef3 = \ /tfshow %{P2}... %{P6} /def -F -mregexp -ag -t"^You are now hunting ([^\.]*)\.$" tfsubstHunting1 = \ /def -F -p3 -n1 -mregexp -ag -t" leaves (.*)\\.$$" tfsubstHuntingB1 = \ /echo -paB You are now hunting %{P1}: %%{P1}%%; \ /purge tfsubstHuntingB /def -F -mregexp -ag -t" panics!$" tfsubstHunting2 = \ /def -F -n1 -mregexp -ag -t" panics and flees (.*)\\.$$" tfsubstFleeingB = \ /echo -paB %%{PL} panics and flees: %%{P2} ; ---------------------- FIGHT end ---------------------- ; ---------------------- FIGHT SPECIALS start ---------------------- ; ---------- stunned: /def -F -mregexp -ag -t' grabs hold of your .* and hinders your movement\.$' stunHoldStart = \ /tfshow STUN: Held by %{PL}. 10-15s of no damage. /def -F -mregexp -ag -t' releases (his|her|its) grip on you\.$' stunHoldEnd = \ /tfshow STUN: Released!%; \ mattack%; \ sstrike /def -F -msimple -t"You are too stunned to strike." tfsubstStrikeStunned = \ /repeat -1 1 sstrike /def -F -msimple -t"You are too stunned to use your Mercenary tactics!" = \ /repeat -1 1 mattack ; ---------- MATTACK: /def -F -ag -msimple -t'You feel ready to use Mercenary tactics again!' tfsubstMattackAgain = mattack /def -F -mregexp -ag -t"^Sensing your opportunity, you lunge with (.*) precision at " tfsubstMattack1 = \ /def -F -p3 -n1 -mregexp -ag -t"^You misjudge (.*) and your attack goes astray\\.$$" tfsubstMattack3a = \ /tfshow Mattack: %{P1} - astray !!!!!!!!!!!!!!!!!!!!!!%%; \ /purge tfsubstMattack3*%; \ /def -F -p3 -n1 -mregexp -ag -t"^You misjudge (.*) and your attack goes$$" tfsubstMattack3a2 = \ /tfshow Mattack: %{P1} - astray !!!!!!!!!!!!!%; \ /def -F -p3 -n1 -mregexp -ag -t" appears (.*) by your attack\\.$$" tfsubstMattack3b = \ /tfshow Mattack: %{P1} - %%{P1}%%; \ /purge tfsubstMattack3*%; \ /def -F -n1 -mregexp -t"" tfsubstMattack3z = \ /tfshow Mattack: %{P1}%%; \ /purge tfsubstMattack3* ; ---------- STRIKE: /def -F -ag -mregexp -t"^You ([^ ]+) (.*) with your (left|right) (foot|fist)\.$" tfsubstStrikePurestrike1 = \ /tfshow Strike (%{strikeItem}): Strike - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^Executing a deft spin on the balls of your feet, you ([^ ]+) " tfsubstStrikeDeftspin = \ /tfshow Strike (%{strikeItem}): Deftspin - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^Executing a quick roll on the ground, you ([^ ]+) " tfsubstStrikeQuickroll = \ /tfshow Strike (%{strikeItem}): Quickroll - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^Spinning around, you ([^ ]+) " tfsubstStrikeSpin = \ /tfshow Strike (%{strikeItem}): Spin - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^With a quick downward jab, you ([^ ]+) " tfsubstStrikeDownjab = \ /tfshow Strike (%{strikeItem}): Downjab - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^With a sweeping motion, you ([^ ]+) " tfsubstStrikeSweep = \ /tfshow Strike (%{strikeItem}): Sweep - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^Dropping to the ground, you ([^ ]+) " tfsubstStrikeDrop = \ /tfshow Strike (%{strikeItem}): Drop - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^Crouching down, you ([^ ]+) " tfsubstStrikeCrouch = \ /tfshow Strike (%{strikeItem}): Crouch - %{P1}%; \ sstrike /def -F -ag -mregexp -t"^Ducking down, you ([^ ]+) " tfsubstStrikeDuck = \ /tfshow Strike (%{strikeItem}): Duck - %{P1}%; \ sstrike ;Monk special. Automatic? ;Anger takes you suddenly, and you grab [orc]'s skull with both ;of your hands, dragging his head downward as you bring your leg up to deliver a ;devastating knee into his face! Tumbling back from you in pain and disbelief, ;[orc] covers his wounded mouth with his arm. ;Spinning in a sudden deft maneuver, you sink your lethal steel bardiche ; savagely into [hobbit]'s shoulder blade! ; ---------- MKAPPRAISE: /def -F -ag -mregexp -t"^(His|Her|Its|> His|> Her|> Its) (head|left arm|right arm|left paw|right paw|left front paw|right front paw|left rear paw|right rear paw|left wing|right wing|body|back|legs|tail|foreleg|hindleg|left front leg|right front leg|left hind leg|right hind leg) (appear|appears) (very fragile|delicate|fragile|rather frail|frail|weak|sturdy|strong|tough|robust|rugged|very rugged|invincible)\.$" tfsubstProt1 = \ /if ({P4} =~ 'very fragile') \ /set bodyValue=0%; \ /elseif ({P4} =~ 'delicate') \ /set bodyValue=1%; \ /elseif ({P4} =~ 'fragile') \ /set bodyValue=2%; \ /elseif ({P4} =~ 'rather frail') \ /set bodyValue=3%; \ /elseif ({P4} =~ 'frail') \ /set bodyValue=4%; \ /elseif ({P4} =~ 'weak') \ /set bodyValue=5%; \ /elseif ({P4} =~ 'sturdy') \ /set bodyValue=6%; \ /elseif ({P4} =~ 'strong') \ /set bodyValue=7%; \ /elseif ({P4} =~ 'tough') \ /set bodyValue=8%; \ /elseif ({P4} =~ 'robust') \ /set bodyValue=9%; \ /elseif ({P4} =~ 'rugged') \ /set bodyValue=10%; \ /elseif ({P4} =~ 'very rugged') \ /set bodyValue=11%; \ /elseif ({P4} =~ 'invincible') \ /set bodyValue=12%; \ /endif%; \ /set bodyValueTot=$[10*bodyValue]%; \ /if ({P2} =~ 'head') \ /set oppHead=$[bodyValueTot]%; \ /tfshow Head: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left arm') \ /set oppLArm=$[bodyValueTot]%; \ /tfshow LArm: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right arm') \ /set oppRArm=$[bodyValueTot]%; \ /tfshow RArm: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left paw') \ /set oppLPaw=$[bodyValueTot]%; \ /tfshow LPaw: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right paw') \ /set oppRPaw=$[bodyValueTot]%; \ /tfshow RPaw: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left front paw') \ /set oppLFPaw=$[bodyValueTot]%; \ /tfshow LFPaw: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right front paw') \ /set oppRFPaw=$[bodyValueTot]%; \ /tfshow RFPaw: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left rear paw') \ /set oppLRPaw=$[bodyValueTot]%; \ /tfshow LRPaw: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right rear paw') \ /set oppRRPaw=$[bodyValueTot]%; \ /tfshow RRPaw: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left wing') \ /set oppLWing=$[bodyValueTot]%; \ /tfshow LWing: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right wing') \ /set oppRWing=$[bodyValueTot]%; \ /tfshow RWing: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'body') \ /set oppBody=$[bodyValueTot]%; \ /tfshow Body: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'back') \ /set oppBack=$[bodyValueTot]%; \ /tfshow Back: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'legs') \ /set oppLegs=$[bodyValueTot]%; \ /tfshow Legs: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'tail') \ /set oppTail=$[bodyValueTot]%; \ /tfshow Tail: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'foreleg') \ /set oppFLeg=$[bodyValueTot]%; \ /tfshow FLeg: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'hindleg') \ /set oppHLeg=$[bodyValueTot]%; \ /tfshow HLeg: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left front leg') \ /set oppLFLeg=$[bodyValueTot]%; \ /tfshow LFLeg: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right front leg') \ /set oppRFLeg=$[bodyValueTot]%; \ /tfshow RFLeg: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'left hind leg') \ /set oppLHLeg=$[bodyValueTot]%; \ /tfshow LHLeg: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /elseif ({P2} =~ 'right hind leg') \ /set oppRHLeg=$[bodyValueTot]%; \ /tfshow RHLeg: %{bodyValue} (%{bodyValue}:%{P4} / 0:---)%; \ /endif /def -F -mregexp -ag -t"^(The|> The) (.*) covering (his|her|its) (very fragile|delicate|fragile|rather frail|frail|weak|sturdy|strong|tough|robust|rugged|very rugged|invincible) (head|left arm|right arm|left paw|right paw|left front paw|right front paw|left rear paw|right rear paw|left wing|right wing|body|back|legs|tail|foreleg|hindleg|left front leg|right front leg|left hind leg|right hind leg) (appear|appears) to offer (flimsy|feeble|little|some|a bit of|fair|good|very good|considerable|excellent|fantastic|impenetrable) protection\.$" tfsubstProt2 = \ /set protValue=0%; \ /set bodyValue=0%; \ /if ({P4} =~ 'very fragile') \ /set bodyValue=0%; \ /elseif ({P4} =~ 'delicate') \ /set bodyValue=1%; \ /elseif ({P4} =~ 'fragile') \ /set bodyValue=2%; \ /elseif ({P4} =~ 'rather frail') \ /set bodyValue=3%; \ /elseif ({P4} =~ 'frail') \ /set bodyValue=4%; \ /elseif ({P4} =~ 'weak') \ /set bodyValue=5%; \ /elseif ({P4} =~ 'sturdy') \ /set bodyValue=6%; \ /elseif ({P4} =~ 'strong') \ /set bodyValue=7%; \ /elseif ({P4} =~ 'tough') \ /set bodyValue=8%; \ /elseif ({P4} =~ 'robust') \ /set bodyValue=9%; \ /elseif ({P4} =~ 'rugged') \ /set bodyValue=10%; \ /elseif ({P4} =~ 'very rugged') \ /set bodyValue=11%; \ /elseif ({P4} =~ 'invincible') \ /set bodyValue=12%; \ /endif%; \ /if ({P7} =~ 'flimsy') \ /set protValue=1%; \ /elseif ({P7} =~ 'feeble') \ /set protValue=2%; \ /elseif ({P7} =~ 'little') \ /set protValue=3%; \ /elseif ({P7} =~ 'some') \ /set protValue=4%; \ /elseif ({P7} =~ 'a bit of') \ /set protValue=5%; \ /elseif ({P7} =~ 'fair') \ /set protValue=6%; \ /elseif ({P7} =~ 'good') \ /set protValue=7%; \ /elseif ({P7} =~ 'very good') \ /set protValue=8%; \ /elseif ({P7} =~ 'considerable') \ /set protValue=9%; \ /elseif ({P7} =~ 'excellent') \ /set protValue=10%; \ /elseif ({P7} =~ 'fantastic') \ /set protValue=11%; \ /elseif ({P7} =~ 'impenetrable') \ /set protValue=12%; \ /endif%; \ /set bodyValueTot=$[(10*bodyValue) + protValue]%; \ /if ({P5} =~ 'head') \ /set oppHead=$[bodyValueTot]%; \ /tfshow Head: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left arm') \ /set oppLArm=$[bodyValueTot]%; \ /tfshow LArm: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right arm') \ /set oppRArm=$[bodyValueTot]%; \ /tfshow RArm: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left paw') \ /set oppLPaw=$[bodyValueTot]%; \ /tfshow LPaw: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right paw') \ /set oppRPaw=$[bodyValueTot]%; \ /tfshow RPaw: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left front paw') \ /set oppLFPaw=$[bodyValueTot]%; \ /tfshow LFPaw: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right front paw') \ /set oppRFPaw=$[bodyValueTot]%; \ /tfshow RFPaw: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left rear paw') \ /set oppLRPaw=$[bodyValueTot]%; \ /tfshow LRPaw: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right rear paw') \ /set oppRRPaw=$[bodyValueTot]%; \ /tfshow RRPaw: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left wing') \ /set oppLWing=$[bodyValueTot]%; \ /tfshow LWing: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right wing') \ /set oppRWing=$[bodyValueTot]%; \ /tfshow RWing: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'body') \ /set oppBody=$[bodyValueTot]%; \ /tfshow Body: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'back') \ /set oppBack=$[bodyValueTot]%; \ /tfshow Back: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'legs') \ /set oppLegs=$[bodyValueTot]%; \ /tfshow Legs: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'tail') \ /set oppTail=$[bodyValueTot]%; \ /tfshow Tail: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'foreleg') \ /set oppFLeg=$[bodyValueTot]%; \ /tfshow FLeg: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'hindleg') \ /set oppHLeg=$[bodyValueTot]%; \ /tfshow HLeg: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left front leg') \ /set oppLFLeg=$[bodyValueTot]%; \ /tfshow LFLeg: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right front leg') \ /set oppRFLeg=$[bodyValueTot]%; \ /tfshow RFLeg: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'left hind leg') \ /set oppLHLeg=$[bodyValueTot]%; \ /tfshow LHLeg: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /elseif ({P5} =~ 'right hind leg') \ /set oppRHLeg=$[bodyValueTot]%; \ /tfshow RHLeg: %{bodyValueTot} (%{bodyValue}:%{P4} / %{protValue}:%{P7}) %{P2}%; \ /endif ; ---------------------- FIGHT SPECIALS end ---------------------- ; ---------------------- MAPPRAISE start ---------------------- /set mapp2working=0 /alias mapp2 \ /set mapp2working=1%; \ /set mapp2Target=%*%; \ /set mapp2Counter=0%; \ /set oppSkillWeaponSum=0%; \ /set oppSkillParrySum=0%; \ /set oppSkillDefenseSum=0%; \ /def -F -ag -t"*Appraise which being?" tfsubstMapp2gag1 = \ mapp2stop%; \ /def -F -ag -t"*You may only appraise someone if they are in combat." tfsubstMapp2gag2 = \ mapp2stop%; \ mapp %{mapp2Target} /alias mapp2continue \ /set mapp2working=1%; \ /set mapp2Target=%*%; \ /def -F -ag -t"*Appraise which being?" tfsubstMapp2gag1 = \ mapp2stop%; \ /def -F -ag -t"*You may only appraise someone if they are in combat." tfsubstMapp2gag2 = \ mapp2stop%; \ mapp %{mapp2Target} /alias mapp2stop \ /set mapp2working=-1%; \ /repeat -1 1 /set mapp2working=0%; \ /purge tfsubstMapp2gag*%; \ /if (mapp2Counter == 0) \ /tfshow No mapp data to show!%; \ /else \ /if (oppSkillParrySum > 0) \ /set oppSkillParryAverage=$[trunc(oppSkillParrySum * 1000.0 / mapp2Counter + 0.5) / 1000.0]%; \ /endif%; \ /set oppSkillDefenseAverage=$[trunc(oppSkillDefenseSum * 1000.0 / mapp2Counter + 0.5) / 1000.0]%; \ /set oppSkillWeaponAverage=$[trunc(oppSkillWeaponSum * 1000.0 / mapp2Counter + 0.5) / 1000.0]%; \ /if (oppSkillParrySum > 0) \ /tfshow Parry: %{oppSkillParryAverage}, Defense: %{oppSkillDefenseAverage}, %{oppSkillWeaponItem}: %{oppSkillWeaponAverage} (%{oppSkillParrySum},%{oppSkillDefenseSum},%{oppSkillWeaponSum} / %{mapp2Counter})%; \ /else \ /tfshow Defense: %{oppSkillDefenseAverage}, Unarmed: %{oppSkillWeaponAverage} (%{oppSkillDefenseSum},%{oppSkillWeaponSum} / %{mapp2Counter})%; \ /endif%; \ /endif /def -F -ag -mregexp -t"seems to be (unskilled|barely skilled|somewhat skilled|fairly skilled|quite skilled|very skilled|extremely skilled|unbelievably skilled) with the ([^\.]+)\. You notice that [^ ]+ is (unskilled|barely skilled|somewhat skilled|fairly skilled|quite skilled|very skilled|extremely skilled|unbelievably skilled) at parrying blows and (unskilled|barely skilled|somewhat skilled|fairly skilled|quite skilled|very skilled|extremely skilled|unbelievably skilled) at defending [^ ]+ in general\.$" tfsubstMapp1 = \ /if ({P1} =~ 'unskilled') \ /set oppSkillWeapon=0%; \ /elseif ({P1} =~ 'barely skilled') \ /set oppSkillWeapon=1%; \ /elseif ({P1} =~ 'somewhat skilled') \ /set oppSkillWeapon=2%; \ /elseif ({P1} =~ 'fairly skilled') \ /set oppSkillWeapon=3%; \ /elseif ({P1} =~ 'quite skilled') \ /set oppSkillWeapon=4%; \ /elseif ({P1} =~ 'very skilled') \ /set oppSkillWeapon=5%; \ /elseif ({P1} =~ 'extremely skilled') \ /set oppSkillWeapon=6%; \ /elseif ({P1} =~ 'unbelievably skilled') \ /set oppSkillWeapon=7%; \ /else \ /tfshow oppSkillWeapon UNKNOWN: %{P1}%; \ /set oppSkillWeapon=5%; \ /endif%; \ /if ({P3} =~ 'unskilled') \ /set oppSkillParry=0%; \ /elseif ({P3} =~ 'barely skilled') \ /set oppSkillParry=1%; \ /elseif ({P3} =~ 'somewhat skilled') \ /set oppSkillParry=2%; \ /elseif ({P3} =~ 'fairly skilled') \ /set oppSkillParry=3%; \ /elseif ({P3} =~ 'quite skilled') \ /set oppSkillParry=4%; \ /elseif ({P3} =~ 'very skilled') \ /set oppSkillParry=5%; \ /elseif ({P3} =~ 'extremely skilled') \ /set oppSkillParry=6%; \ /elseif ({P3} =~ 'unbelievably skilled') \ /set oppSkillParry=7%; \ /else \ /tfshow oppSkillParry UNKNOWN: %{P3}%; \ /set oppSkillParry=5%; \ /endif%; \ /if ({P4} =~ 'unskilled') \ /set oppSkillDefense=0%; \ /elseif ({P4} =~ 'barely skilled') \ /set oppSkillDefense=1%; \ /elseif ({P4} =~ 'somewhat skilled') \ /set oppSkillDefense=2%; \ /elseif ({P4} =~ 'fairly skilled') \ /set oppSkillDefense=3%; \ /elseif ({P4} =~ 'quite skilled') \ /set oppSkillDefense=4%; \ /elseif ({P4} =~ 'very skilled') \ /set oppSkillDefense=5%; \ /elseif ({P4} =~ 'extremely skilled') \ /set oppSkillDefense=6%; \ /elseif ({P4} =~ 'unbelievably skilled') \ /set oppSkillDefense=7%; \ /else \ /tfshow oppSkillDefense UNKNOWN: %{P4}%; \ /set oppSkillDefense=5%; \ /endif%; \ /set oppSkillWeaponItem=%{P2}%; \ /if (mapp2working == 1) \ /set mapp2Counter=$[mapp2Counter + 1]%; \ /set oppSkillWeaponSum=$[oppSkillWeaponSum + oppSkillWeapon]%; \ /set oppSkillParrySum=$[oppSkillParrySum + oppSkillParry]%; \ /set oppSkillDefenseSum=$[oppSkillDefenseSum + oppSkillDefense]%; \ mapp %{mapp2Target}%; \ /elseif (mapp2working == 0) \ /tfshow %{P2}: %{oppSkillWeapon}%; \ /tfshow Parry: %{oppSkillParry}%; \ /tfshow Defense: %{oppSkillDefense}%; \ /endif /def -F -ag -mregexp -t"seems to be (unskilled|barely skilled|somewhat skilled|fairly skilled|quite skilled|very skilled|extremely skilled|unbelievably skilled) at fighting unarmed, and (unskilled|barely skilled|somewhat skilled|fairly skilled|quite skilled|very skilled|extremely skilled|unbelievably skilled) at defending" tfsubstMapp2 = \ /if ({P1} =~ 'unskilled') \ /set oppSkillWeapon=0%; \ /elseif ({P1} =~ 'barely skilled') \ /set oppSkillWeapon=1%; \ /elseif ({P1} =~ 'somewhat skilled') \ /set oppSkillWeapon=2%; \ /elseif ({P1} =~ 'fairly skilled') \ /set oppSkillWeapon=3%; \ /elseif ({P1} =~ 'quite skilled') \ /set oppSkillWeapon=4%; \ /elseif ({P1} =~ 'very skilled') \ /set oppSkillWeapon=5%; \ /elseif ({P1} =~ 'extremely skilled') \ /set oppSkillWeapon=6%; \ /elseif ({P1} =~ 'unbelievably skilled') \ /set oppSkillWeapon=7%; \ /else \ /tfshow oppSkillWeapon UNKNOWN: %{P1}%; \ /set oppSkillWeapon=5%; \ /endif%; \ /if ({P2} =~ 'unskilled') \ /set oppSkillDefense=0%; \ /elseif ({P2} =~ 'barely skilled') \ /set oppSkillDefense=1%; \ /elseif ({P2} =~ 'somewhat skilled') \ /set oppSkillDefense=2%; \ /elseif ({P2} =~ 'fairly skilled') \ /set oppSkillDefense=3%; \ /elseif ({P2} =~ 'quite skilled') \ /set oppSkillDefense=4%; \ /elseif ({P2} =~ 'very skilled') \ /set oppSkillDefense=5%; \ /elseif ({P2} =~ 'extremely skilled') \ /set oppSkillDefense=6%; \ /elseif ({P2} =~ 'unbelievably skilled') \ /set oppSkillDefense=7%; \ /else \ /tfshow oppSkillDefense UNKNOWN: %{P2}%; \ /set oppSkillDefense=5%; \ /endif%; \ /set oppSkillWeaponItem=%{P2}%; \ /if (mapp2working == 1) \ /set mapp2Counter=$[mapp2Counter + 1]%; \ /set oppSkillWeaponSum=$[oppSkillWeaponSum + oppSkillWeapon]%; \ /set oppSkillDefenseSum=$[oppSkillDefenseSum + oppSkillDefense]%; \ mapp %{mapp2Target}%; \ /elseif (mapp2working == 0) \ /tfshow Unarmed: %{oppSkillWeapon}%; \ /tfshow Defense: %{oppSkillDefense}%; \ /endif ; ---------------------- MAPPRAISE end ---------------------- ; ---------------------- SMINSPECT start ---------------------- /set smInspecting 0 /set smInspectCounter -1 /set sminspect2ShowStep 50 /alias sminspect \ /set smInspecting 1%; \ /if (smInspectCounter = 0) \ /set smInspectCounter -1%; \ /set smInspectDrAverage=$[1.0 * smInspectDrSum / smInspectCounterStart]%; \ /set smInspectHrAverage=$[1.0 * smInspectHrSum / smInspectCounterStart]%; \ /set smInspectAcAverage=$[1.0 * smInspectAcSum / smInspectCounterStart]%; \ /if (smInspectArtifactSum > 0) \ /set smInspectArtifactAverage=, Artifact: $[smInspectArtifactSum * 100 / smInspectCounterStart]\%%; \ /else \ /set smInspectArtifactAverage=%; \ /endif%; \ /if (smInspectAcSum > 0) \ /tfshow AC: %{smInspectAcAverage}%{smInspectArtifactAverage}%; \ /else \ /tfshow HR: %{smInspectHrAverage}%{smInspectArtifactAverage}, DR: %{smInspectDrAverage}%; \ /endif%; \ /elseif (smInspectCounter > 0) \ /if ($[1.0 * smInspectCounter / sminspect2ShowStep] = $[smInspectCounter / sminspect2ShowStep]) \ /tfshow Sminspect %{smInspectItem}... %{smInspectCounter}%; \ /endif%; \ /set smInspectCounter=$[smInspectCounter - 1]%; \ /send sminspect %*%; \ /else \ /send sminspect %*%; \ /endif /set smInspectCounterStart 500 /alias sminspect2 \ /set smInspectCounter=$[smInspectCounterStart]%; \ /set smInspectDrSum 0%; \ /set smInspectHrSum 0%; \ /set smInspectAcSum 0%; \ /set smInspectArtifactSum 0%; \ /set smInspectItem %*%; \ sminspect %* /def -p5 -F -ag -mregexp -t"^You study the (weapon|armour|.*) carefully\.$" tfsubstSminspectWeaponInit = \ /set smInspectDr 0%; \ /set smInspectHr 0%; \ /set smInspectAc 0%; \ /set smInspectArtifact 0%; \ /if (smInspecting) \ /def -p1 -n9 -F -ag -mregexp -t"" tfsubstSminspectGag = donothing%; \ /else \ /echo You study the %{P1} carefully.%; \ /endif%; \ /if ({P1} !~ "weapon" & {P1} !~ "armour") \ /set smInspecting 0%; \ /set smInspectCounter -1%; \ /purge tfsubstSminspectGag%; \ /endif /def -p5 -F -ag -msimple -t"This weapon is an extremely powerful artifact." tfsubstSminspectArtifact = \ /if (smInspectCounter >= 0) \ /set smInspectArtifactSum=$[smInspectArtifactSum + 1]%; \ /endif%; \ /set smInspectArtifact 1 /def -p5 -F -ag -mregexp -t"^This (weapon|armour) is most likely enchanted\.$" tfsubstSminspectEnchanted = \ /if (smInspectCounter < 0) \ /tfshow Sminspect: ENCHANTED%; \ /endif ; ===== DR: /def -p5 -ag -F -msimple -t"This weapon doesn't seem very effective." tfsubstSminspectDr1 = \ /set smInspectDr 0 /def -p5 -ag -F -msimple -t"This weapon might do some damage with a lucky hit." tfsubstSminspectDr2 = \ /set smInspectDr 20 /def -p5 -ag -F -msimple -t"This weapon seems quite effective." tfsubstSminspectDr3 = \ /set smInspectDr 40 /def -p5 -ag -F -msimple -t"This weapon could most likely kill with a single swipe." tfsubstSminspectDr4 = \ /set smInspectDr 60 /def -p5 -ag -F -msimple -t"This weapon is extremely powerful and more lethal than many of the famous weapons." tfsubstSminspectDr5 = \ /set smInspectDr 80 /def -p5 -ag -F -msimple -t"With this weapon even a single warrior will be able to match a large force." tfsubstSminspectDr6 = \ /set smInspectDr 100 ; ===== HR: /def -p5 -F -ag -mregexp -t"^(It is almost impossible to get a good strike with this weapon\.|It is difficult to use this weapon properly\.|It feels good when you wield this weapon--you would most likely have no trouble getting a good hit with this weapon\.|You should have no trouble handling this weapon--or making a cruel hit with it for that matter\.|Even an apprentice warrior could kill easily with this weapon\.|With this weapon almost every strike could be a killing blow\.)$" tfsubstSminspectHr = \ /if ({P1} =~ "It is almost impossible to get a good strike with this weapon.") \ /set smInspectHr 0%; \ /elseif ({P1} =~ "It is difficult to use this weapon properly.") \ /set smInspectHr 20%; \ /elseif ({P1} =~ "It feels good when you wield this weapon--you would most likely have no trouble getting a good hit with this weapon.") \ /set smInspectHr 40%; \ /elseif ({P1} =~ "You should have no trouble handling this weapon--or making a cruel hit with it for that matter.") \ /set smInspectHr 60%; \ /elseif ({P1} =~ "Even an apprentice warrior could kill easily with this weapon.") \ /set smInspectHr 80%; \ /elseif ({P1} =~ "With this weapon almost every strike could be a killing blow.") \ /set smInspectHr 100%; \ /endif%; \ /purge tfsubstSminspectGag%; \ /set smInspecting 0%; \ /if (smInspectCounter >= 0) \ /set smInspectDrSum=$[smInspectDrSum + smInspectDr]%; \ /set smInspectHrSum=$[smInspectHrSum + smInspectHr]%; \ sminspect %{smInspectItem}%; \ /else \ /if (smInspectArtifact) \ /tfshow Sminspect: %{smInspectHr} / %{smInspectDr} (ARTIFACT)%; \ /else \ /tfshow Sminspect: %{smInspectHr} / %{smInspectDr}%; \ /endif%; \ /endif ; ===== AC: /def -p5 -F -ag -mregexp -t"^(This armour wouldn't even protect you from a very weak blow\.|This armour could perhaps reduce damage a little\.|This seems to be an armour of average quality\.|This armour would protect you very well\.|This is an extremely well-made armour which would protect you very well\.|Virtually nothing could harm you if you wore this armour\.)$" tfsubstSminspectAc = \ /if ({P1} =~ "This armour wouldn't even protect you from a very weak blow.") \ /set smInspectAc 0%; \ /elseif ({P1} =~ "This armour could perhaps reduce damage a little.") \ /set smInspectAc 20%; \ /elseif ({P1} =~ "This seems to be an armour of average quality.") \ /set smInspectAc 40%; \ /elseif ({P1} =~ "This armour would protect you very well.") \ /set smInspectAc 60%; \ /elseif ({P1} =~ "This is an extremely well-made armour which would protect you very well.") \ /set smInspectAc 80%; \ /elseif ({P1} =~ "Virtually nothing could harm you if you wore this armour.") \ /set smInspectAc 100%; \ /endif%; \ /purge tfsubstSminspectGag%; \ /set smInspecting 0%; \ /if (smInspectCounter >= 0) \ /set smInspectAcSum=$[smInspectAcSum + smInspectAc]%; \ sminspect %{smInspectItem}%; \ /else \ /tfshow Sminspect: %{smInspectAc}%; \ /endif ; ---------------------- SMINSPECT end ---------------------- /def -p2 -F -mregexp -t"^You start doing the leatherwork for the ([^\.]+)\.$" tfsubstForge1 = \ /set forgeslask=$[{forgecounter} + 1]%; \ /substitute -a -p Forging: %{P1} %{forgeslask} /def -p2 -F -t"You heat the metal in the forge until it is red-hot." tfsubstForge2 = \ /substitute -a -p Forging... 2 /def -p2 -F -t"You start hammering on the red-hot metal." tfsubstForge3 = \ /substitute -a -p Forging... 3 /def -p2 -F -t"The * you are working on begins to take shape." tfsubstForge4 = \ /substitute -a -p Forging... 4 /def -p2 -F -t"You give the * a final finish." tfsubstForge5 = \ /substitute -a -p Forging... 5