changeset 1676:b189ae1b391c

Improve skill handling, also handle the 'sleep' pseudo-skill.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 27 Mar 2024 17:23:36 +0200
parents 27281a74c507
children 32c6a74b989a
files ggrtf.tf
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ggrtf.tf	Mon Mar 25 19:20:10 2024 +0200
+++ b/ggrtf.tf	Wed Mar 27 17:23:36 2024 +0200
@@ -1960,18 +1960,25 @@
 	/endif
 
 ;; Start of skill
-/def -i -p9999 -msimple -t"You start concentrating on the skill." gskill_start =\
+/def -i gskill_initialize =\
 	/set skill_t=$[time()]%;\
 	/set cnt_skills=$[cnt_skills+1]%;\
 	/set skill_st=on%;\
 	/set skill_st2=off%;\
-	/set cast_info=SK%;/set cast_info_n=%;/set cast_info_t=%;@@cast info%;\
+	/set cast_info=SK%;\
+	/set cast_info_n=%;\
+	/set cast_info_t=%;\
+	/send @@cast info
+
+/def -i -p9999 -mregexp -t"^(You start concentrating on the skill|You begin searching for a proper place to rest)\.$" gskill_start =\
+	/gskill_initialize%;\
 	/msk @{BCyellow} ---- SKILL START ---- @{n} (@{Cyellow}%{cnt_skills}@{n})%;\
-	/gstatus_update%;/prexecfuncs %{event_skill_start}
+	/gstatus_update%;\
+	/prexecfuncs %{event_skill_start}
 
 
 ;; Skill done
-/def -i -p9999 -msimple -t"You are prepared to do the skill." gskill_end =\
+/def -i -p9999 -msimple -t"You are prepared to do the skill." gskill_done =\
 	/set cnt_sskills=$[cnt_sskills+1]%;\
 	/set skill_st=off%;\
 	/set skill_st2=on%;\