summaryrefslogtreecommitdiff
path: root/world/map/npc/functions
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2023-07-07 01:57:38 +0000
committerLed Mitz <smoothshifter@tuta.io>2023-07-07 01:57:38 +0000
commitac308293e0e10f0762c9adffec5bb9c81cd52275 (patch)
treef6b67b68ce0191ed9c87dbdf5606d6a6d7d6018c /world/map/npc/functions
parent4f23b6a8f220bafe85516f3396261e4c13c2a8f1 (diff)
downloadserverdata-ac308293e0e10f0762c9adffec5bb9c81cd52275.tar.gz
serverdata-ac308293e0e10f0762c9adffec5bb9c81cd52275.tar.bz2
serverdata-ac308293e0e10f0762c9adffec5bb9c81cd52275.tar.xz
serverdata-ac308293e0e10f0762c9adffec5bb9c81cd52275.zip
Chronos Fix
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r--world/map/npc/functions/clear_vars.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index 00173429..23577434 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -18,6 +18,7 @@ function|script|ClearVariables
callsub S_Bitmask;
callsub S_BlueSage;
callsub S_Luca;
+ callsub S_Keshlam;
callsub S_Valentine2021;
@@ -80,6 +81,21 @@ S_LucaX:
set FLAGS, FLAGS | FLAG_LUCA_FIX;
return;
+S_Keshlam:
+ if (FLAGS & FLAG_KESHLAM_REPACKED) goto S_Return;
+ set KESHLAM_STATE, #BOSS_MEDALS | (#BOSS_MEDALS_AVAILABLE << BYTE_1_SHIFT);
+ set #BOSS_MEDALS, 0;
+ set #BOSS_MEDALS_AVAILABLE, 0;
+ // old
+ // FLAG_KESHLAM_FLAWEDLENS 16384 shift 14
+ // FLAG_KESHLAM_RAREDROP 32768 shift 15
+ // new
+ // FLAG_KESHLAM_FLAWEDLENS 65536 shift 16
+ // FLAG_KESHLAM_RAREDROP 131072 shift 17
+ set KESHLAM_STATE, KESHLAM_STATE | ((FLAGS & 16384) >> 14) << 16 | ((FLAGS & 32768) >> 15) << 17;
+ set FLAGS, FLAGS | FLAG_KESHLAM_REPACKED ^ 16384 ^ 32768;
+ return;
+
S_Flags:
if (Open_Underground_Palace_Barrier)
set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND;