diff options
author | Led Mitz <smoothshifter@tuta.io> | 2023-07-07 01:57:38 +0000 |
---|---|---|
committer | Led Mitz <smoothshifter@tuta.io> | 2023-07-07 01:57:38 +0000 |
commit | 37a7a60c8c0b28f0737d601e2a260db977eac39d (patch) | |
tree | 9d87f687a86fd0a27c830a04ff575cc5e3210c97 /world/map/npc/functions/clear_vars.txt | |
parent | 0493f971848371f284a1e714624898c086e858a1 (diff) | |
parent | ac308293e0e10f0762c9adffec5bb9c81cd52275 (diff) | |
download | serverdata-37a7a60c8c0b28f0737d601e2a260db977eac39d.tar.gz serverdata-37a7a60c8c0b28f0737d601e2a260db977eac39d.tar.bz2 serverdata-37a7a60c8c0b28f0737d601e2a260db977eac39d.tar.xz serverdata-37a7a60c8c0b28f0737d601e2a260db977eac39d.zip |
Merge branch 'chronos' into 'master'
Chronos Fix
See merge request legacy/serverdata!630
Diffstat (limited to 'world/map/npc/functions/clear_vars.txt')
-rw-r--r-- | world/map/npc/functions/clear_vars.txt | 16 |
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; |