summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2022-10-24 23:33:34 +0000
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2022-10-24 23:33:34 +0000
commitd3942a51238f34ae7807e5747f6569b55924e0d1 (patch)
tree9e9c0cb3cca49cd5080f5ae2ed361c4e98165efb /src/map/script-fun.cpp
parent9a3566484f2345db599552a6c18311978a0071ea (diff)
downloadtmwa-d3942a51238f34ae7807e5747f6569b55924e0d1.tar.gz
tmwa-d3942a51238f34ae7807e5747f6569b55924e0d1.tar.bz2
tmwa-d3942a51238f34ae7807e5747f6569b55924e0d1.tar.xz
tmwa-d3942a51238f34ae7807e5747f6569b55924e0d1.zip
Sc cooldown added frillyar and kaflosh status symbols and <1s fix
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r--src/map/script-fun.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 135aef9..90ae671 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -3393,14 +3393,29 @@ void builtin_sc_start(ScriptState *st)
StatusChange type = static_cast<StatusChange>(conv_num(st, &AARG(0)));
interval_t tick = static_cast<interval_t>(conv_num(st, &AARG(1)));
if (tick < 1_s)
- // work around old behaviour of:
- // speed potion
- // atk potion
- // matk potion
- //
- // which used to use seconds
- // all others used milliseconds
- tick *= 1000;
+ switch (type)
+ {
+ // all those use ms so this checks for < 1s are not needed on those
+ // and it would break the cooldown symbol since many spells have cooldowns less than 1s
+ case StatusChange::SC_PHYS_SHIELD:
+ case StatusChange::SC_MBARRIER:
+ case StatusChange::SC_COOLDOWN:
+ case StatusChange::SC_COOLDOWN_MG:
+ case StatusChange::SC_COOLDOWN_MT:
+ case StatusChange::SC_COOLDOWN_R:
+ case StatusChange::SC_COOLDOWN_AR:
+ break;
+
+ default:
+ // work around old behaviour of:
+ // speed potion
+ // atk potion
+ // matk potion
+ //
+ // which used to use seconds
+ // all others used milliseconds
+ tick *= 1000;
+ }
val1 = conv_num(st, &AARG(2));
if (HARG(3)) //指定したキャラを状態異常にする | Make the specified character abnormal
bl = map_id2bl(wrap<BlockId>(conv_num(st, &AARG(3))));