From ebac9f0a2ee832f273d5dc4b728385b19d9569ed Mon Sep 17 00:00:00 2001 From: Brandon Cornejo Date: Tue, 10 Feb 2026 19:23:23 -0600 Subject: [PATCH] fix snatch highlighting only capturing 'suddenly' --- .gitignore | 2 +- src/actions.tin | 2 +- src/gems.tin | 107 ------------------------------------------------ 3 files changed, 2 insertions(+), 109 deletions(-) delete mode 100644 src/gems.tin diff --git a/.gitignore b/.gitignore index a8a1b1e..9fe6830 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ *.log notes/ src/quow.db.old -src/personal.tin src/wamgsaver.tin src/constants.tin src/timer.tin src/testing.tin +src/gems.tin diff --git a/src/actions.tin b/src/actions.tin index 885dfd8..7019e2c 100644 --- a/src/actions.tin +++ b/src/actions.tin @@ -21,7 +21,7 @@ #NOP ==[Incident Highlighting]== #SUB {^The%1grabs your%2. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.} {<488><119>The<088>%1<488><119>grabs your<088>%2<488><119>. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.}; #SUB {^The%1and%2struggle briefly over%3before%4wrests it free%5$} {<488><119>The<088>%1<488><119>and<088>%2<488><119>struggle briefly over<088>%3<488><119>before%4wrests it free%5}; -#SUB {^The%1suddenly snatches%2from%3and makes a run for it.$} {<488><119>The<088><188>%1<488><119>suddenly snatches<088><188>%2<488><119>from<088><188>%3<488><119>and makes a run for it.}; +#SUB {^The%1{suddenly snatches|snatches}%2from%3and makes a run for it.$} {<488><119>The<088><188>%1<488><119>suddenly snatches<088><188>%2<488><119>from<088><188>%3<488><119>and makes a run for it.}; #HIGHLIGHT {^As %1 dies %2 drops %3 in shock.$} {green underscore}; #HIGHLIGHT {^When you open the %1 you think you can hear a faint rumbling sound from it.$} {red underscore}; #HIGHLIGHT {^Whoops! You tried to carry too many things and fumbled %1} {red underscore}; diff --git a/src/gems.tin b/src/gems.tin deleted file mode 100644 index 965bd6a..0000000 --- a/src/gems.tin +++ /dev/null @@ -1,107 +0,0 @@ -#CLASS {gems} {kill}; -#CLASS {gems} {open}; - -#var {gem} {}; - -#action {^It is a{n|} %2 quality %3 that could be cut into a %4 gem with one of the following forms: %5\; or could be tumbled and then cut into %6.$} { - #var {gem[quality]} {%2}; - #var {gem[type]} {%3}; - #var {gem[size]} {%4}; - - #nop ==[Parse the cut output]==; - #var {gem[cut_list]} {%5}; - - #nop What's our best available cut?; - #var {gem[best_cut]} {octagonal step}; - #regex {$gem[cut_list]} {trillion} {#var {gem[best_cut]}{trillion};}; - #regex {$gem[cut_list]} {pear\-shaped} {#var {gem[best_cut]}{pear-shaped};}; - #regex {$gem[cut_list]} {cushion} {#var {gem[best_cut]} {cushion};}; - #regex {$gem[cut_list]} {rose} {#var {gem[best_cut]} {rose};}; - #regex {$gem[cut_list]} {marquise} {#var {gem[best_cut]} {marquise};}; - #regex {$gem[cut_list]} {brilliant} {#var {gem[best_cut]} {brilliant};}; - #regex {$gem[cut_list]} {heart\-shaped} {#var {gem[best_cut]} {heart-shaped};}; - #regex {$gem[cut_list]} {oval\-shaped} {#var {gem[best_cut]} {oval-shaped};}; - #regex {$gem[cut_list]} {teardrop} {#var {gem[best_cut]} {teardrop};}; - #regex {$gem[cut_list]} {princess} {#var {gem[best_cut]} {princess};}; - - #if {$gem[active] == 1} { - #if {"$gem[size]" != "tiny"} { - #echo {<149>[Gemcrafting] Found a non-tiny gem, chipping and returning to crate<099>}; - #send {chip uncut gem with gemcutting tool}; - #send {put gems in crate}; - - #return; - }; - - #else { - #echo {<149>[Gemcrafting] Found a $gem[size] $gem[type], cutting to a $gem[best_cut] cut.<099>}; - #send {cut uncut gem into a tiny $gem[best_cut] cut gem with gemcutting tools}; - #send {grind gem on wheel}; - #send {polish gem with cloth}; - #send {put gems in crate}; - }; - - #var {gem[active]} {0}; - }; - -}; - -#alias {workgem} { - #nop Get a gem and appraise it; - #send {get uncut gem from crate in me}; - #send {appraise uncut gem}; - - #var {gem[active]} {1}; -}; - -#alias {workgem2} { - #send {get uncut gem from crate in me}; - #send {appraise gem}; - - #action { cabochon cut} { - #unaction { cabochon cut}; - - #if {$gem[size] != "tiny"} { - #echo {<149>[Gemcrafting] Found a non-tiny gem, chipping and returning to crate<099>}; - #send {chip gem with gemcutting tool}; - #send {put gems in crate}; - - #return; - }; - - #echo {<149>[Gemcrafting] Found a $gem[size] $gem[type], cutting to a $gem[best_cut] cut.<099>}; - #send {cut gem into a tiny $gem[best_cut] cut gem with gemcutting tools}; - #send {put gems in crate}; - }; - - #action {^It is a %1 quality %2 that could be cut into a %3 gem with one of the following forms: %4} { - #var {gem[quality]} {%1}; - #var {gem[type]} {%2}; - #var {gem[size]} {%3}; - }; - - #action {octagonal step cut{, | }{[\w\s-,]+}} { - #var {gem[cut_list]} {%2}; - - #nop Turn the raw cuts into a proper list - #replace {gem[cut_list]} { cut} {}; - #replace {gem[cut_list]} {, } {;}; - #replace {gem[cut_list]} { and } {;}; - - #nop What's our best available cut?; - #var {gem[best_cut]} {octagonal step}; - #regex {$gem[cut_list]} {trillion} {#var {gem[best_cut]}{trillion};}; - #regex {$gem[cut_list]} {pear\-shaped} {#var {gem[best_cut]}{pear-shaped};}; - #regex {$gem[cut_list]} {cushion} {#var {gem[best_cut]} {cushion};}; - #regex {$gem[cut_list]} {rose} {#var {gem[best_cut]} {rose};}; - #regex {$gem[cut_list]} {marquise} {#var {gem[best_cut]} {marquise};}; - #regex {$gem[cut_list]} {brilliant} {#var {gem[best_cut]} {brilliant};}; - #regex {$gem[cut_list]} {heart\-shaped} {#var {gem[best_cut]} {heart-shaped};}; - #regex {$gem[cut_list]} {oval\-shaped} {#var {gem[best_cut]} {oval-shaped};}; - #regex {$gem[cut_list]} {teardrop} {#var {gem[best_cut]} {teardrop};}; - #regex {$gem[cut_list]} {princess} {#var {gem[best_cut]} {princess};}; - }; - -}; - -#CLASS {gems} {close};