switch state when counting deaths
All checks were successful
/ test (push) Successful in 38s

This commit is contained in:
Johan Lundberg 2026-08-15 00:18:32 +02:00
parent d6c1a117c2
commit c7f998029f
2 changed files with 86 additions and 27 deletions

View file

@ -78,15 +78,14 @@ STATE: {Hunt}
ChatMatch {the acidic mist!} ChatMatch {the acidic mist!}
DO: CallState {vr_gas_dodge} {Hunt} DO: CallState {vr_gas_dodge} {Hunt}
IF: All IF: All
ChatMatch {^.* I also have aids has died!$} ChatCapture {^Your fellow (?<who>\w[\w ]*\w) has died!$} {}
Expr {getvar[capturegroup_who]==getvar[followTarget]}
Expr {getvar[isLeader]==0} Expr {getvar[isLeader]==0}
DO: DoAll DO: DoAll
ChatExpr {\/f +getvar[followTarget] is dead\. Run away\!} ChatExpr {\/f +getvar[followTarget] is dead\. Run away\!}
SetState {run_away} SetState {run_away}
IF: ChatMatch {^.*has died!$} IF: ChatMatch {^.*has died!$}
DO: DoAll DO: CallState {count_death} {Hunt}
Chat {/f I SAW DEATH!}
DoExpr {setvar[deathCount, getvar[deathCount]+1]}
IF: All IF: All
Expr {getvar[deathCount]==1} Expr {getvar[deathCount]==1}
Not Expr {getvar[deathClock]} Not Expr {getvar[deathClock]}
@ -148,6 +147,13 @@ STATE: {Hunt}
Chat {/ub fellow quit} Chat {/ub fellow quit}
SetState {Default} SetState {Default}
STATE: {count_death}
IF: Always
DO: DoAll
Chat {/f I SAW DEATH!}
DoExpr {setvar[deathCount, getvar[deathCount]+1]}
Return
STATE: {run_away} STATE: {run_away}
IF: Always IF: Always
DO: DoAll DO: DoAll

View file

@ -11,7 +11,7 @@ n
n n
n n
n n
43 44
i i
1 1
i i
@ -463,11 +463,37 @@ K
V V
n n
n n
2 3
i i
4 28
TABLE
2
k
v
n
n
2
s s
^.* I also have aids has died!$ p
s
^Your fellow (?<who>\w[\w ]*\w) has died!$
s
c
s
i
26
TABLE
2
k
v
n
n
1
s
e
s
getvar[capturegroup_who]==getvar[followTarget]
i i
26 26
TABLE TABLE
@ -510,33 +536,24 @@ Hunt
i i
4 4
i i
3 5
s s
^.*has died!$ ^.*has died!$
TABLE TABLE
2 2
K
V
n
n
2
i
2
s
/f I SAW DEATH!
i
7
TABLE
2
k k
v v
n n
n n
1 2
s s
e st
s s
setvar[deathCount, getvar[deathCount]+1] count_death
s
ret
s
Hunt
s s
Hunt Hunt
i i
@ -1189,6 +1206,42 @@ K
V V
n n
n n
3
i
2
s
/f I SAW DEATH!
i
7
TABLE
2
k
v
n
n
1
s
e
s
setvar[deathCount, getvar[deathCount]+1]
i
6
i
0
s
count_death
i
1
i
3
i
0
TABLE
2
K
V
n
n
6 6
i i
2 2