Skip to content

Commit

Permalink
KH2: AntipointReset (ArchipelagoMW#1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredWeakStrike authored May 18, 2023
1 parent 98b0bf7 commit 68bfe17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion KH2Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ async def give_item(self, item, ItemType="ServerItems"):
if len(self.kh2seedsave["AmountInvo"][ItemType]["Ability"][itemname]) < \
self.AbilityQuantityDict[itemname]:
if itemname in self.sora_ability_set:
self.kh2seedsave["AmountInvo"][ItemType]["Ability"][itemname].append(self.kh2seedsave["SoraInvo"][abilityInvoType])
self.kh2seedsave["AmountInvo"][ItemType]["Ability"][itemname].append(
self.kh2seedsave["SoraInvo"][abilityInvoType])
self.kh2seedsave["SoraInvo"][abilityInvoType] -= TwilightZone
elif itemname in self.donald_ability_set:
self.kh2seedsave["AmountInvo"][ItemType]["Ability"][itemname].append(
Expand Down Expand Up @@ -686,6 +687,10 @@ async def verifyItems(self):
self.kh2.read_bytes(self.kh2.base_address + self.Save + itemData.memaddr, 1), "big")
if (int.from_bytes(self.kh2.read_bytes(self.kh2.base_address + self.Save + itemData.memaddr, 1),
"big") & 0x1 << itemData.bitmask) == 0:
# when getting a form anti points should be reset to 0 but bit-shift doesn't trigger the game.
if itemName in {"Valor Form", "Wisdom Form", "Limit Form", "Master Form", "Final Form"}:
self.kh2.write_bytes(self.kh2.base_address + self.Save + 0x3410,
(0).to_bytes(1, 'big'), 1)
self.kh2.write_bytes(self.kh2.base_address + self.Save + itemData.memaddr,
(itemMemory | 0x01 << itemData.bitmask).to_bytes(1, 'big'), 1)

Expand Down

0 comments on commit 68bfe17

Please sign in to comment.