Kh2 rc2 fixes (#1608)

This commit is contained in:
JaredWeakStrike
2023-03-27 13:17:06 -04:00
committed by GitHub
parent 21c6c28755
commit e62f989ce8
5 changed files with 121 additions and 75 deletions

View File

@@ -856,31 +856,19 @@ Progression_Dicts = {
ItemName.NamineSketches
},
"AllVisitLocking": {
ItemName.CastleKey,
ItemName.CastleKey,
ItemName.BattlefieldsofWar,
ItemName.BattlefieldsofWar,
ItemName.SwordoftheAncestor,
ItemName.SwordoftheAncestor,
ItemName.BeastsClaw,
ItemName.BeastsClaw,
ItemName.BoneFist,
ItemName.BoneFist,
ItemName.ProudFang,
ItemName.ProudFang,
ItemName.SkillandCrossbones,
ItemName.SkillandCrossbones,
ItemName.Scimitar,
ItemName.Scimitar,
ItemName.MembershipCard,
ItemName.MembershipCard,
ItemName.WaytotheDawn,
ItemName.IdentityDisk,
ItemName.IdentityDisk,
ItemName.IceCream,
ItemName.IceCream,
ItemName.IceCream,
ItemName.NamineSketches,
ItemName.CastleKey: 2,
ItemName.BattlefieldsofWar: 2,
ItemName.SwordoftheAncestor: 2,
ItemName.BeastsClaw: 2,
ItemName.BoneFist: 2,
ItemName.ProudFang: 2,
ItemName.SkillandCrossbones: 2,
ItemName.Scimitar: 2,
ItemName.MembershipCard: 2,
ItemName.WaytotheDawn: 1,
ItemName.IdentityDisk: 2,
ItemName.IceCream: 3,
ItemName.NamineSketches: 1,
}
}

View File

@@ -1483,7 +1483,6 @@ exclusion_table = {
LocationName.OasisMap,
LocationName.OasisTornPages,
LocationName.OasisAPBoost,
LocationName.StationofSerenityPotion,
LocationName.StationofCallingPotion,
LocationName.CentralStationPotion1,
LocationName.STTCentralStationHiPotion,

View File

@@ -59,7 +59,7 @@ class SummonEXP(Range):
class Schmovement(Choice):
"""Level of Growth You Start With"""
"""Level of Progressive Movement You Start With"""
display_name = "Schmovement"
option_level_0 = 0
option_level_1 = 1
@@ -106,9 +106,10 @@ class Visitlocking(Choice):
class RandomVisitLockingItem(Range):
"""Start with random amount of visit locking items."""
display_name = "Random Visit Locking Item"
range_start = 0
range_end = 27
range_end = 25
default = 3
@@ -191,7 +192,7 @@ class LuckyEmblemsRequired(Range):
"""Number of Lucky Emblems to collect to Open The Final Door bosses.
If Goal is not Lucky Emblem Hunt this does nothing."""
display_name = "Lucky Emblems Required"
range_start = 0
range_start = 1
range_end = 60
default = 25
@@ -200,7 +201,7 @@ class LuckyEmblemsAmount(Range):
"""Number of Lucky Emblems that are in the pool.
If Goal is not Lucky Emblem Hunt this does nothing."""
display_name = "Lucky Emblems Available"
range_start = 0
range_start = 1
range_end = 60
default = 40
@@ -209,7 +210,7 @@ class BountyRequired(Range):
"""Number of Bounties that are Required.
If Goal is not Hitlist this does nothing."""
display_name = "Bounties Required"
range_start = 0
range_start = 1
range_end = 24
default = 7
@@ -218,7 +219,7 @@ class BountyAmount(Range):
"""Number of Bounties that are in the pool.
If Goal is not Hitlist this does nothing."""
display_name = "Bounties Available"
range_start = 0
range_start = 1
range_end = 24
default = 13

View File

@@ -52,12 +52,12 @@ class KH2World(World):
self.goofy_ability_pool = list()
self.sora_keyblade_ability_pool = list()
self.keyblade_slot_copy = list(Locations.Keyblade_Slots.keys())
self.keyblade_slot_copy.remove(LocationName.KingdomKeySlot)
self.totalLocations = len(all_locations.items())
self.growth_list = list()
for x in range(4):
self.growth_list.extend(Movement_Table.keys())
self.visitlockingitem = list()
self.visitlockingitem.extend(Progression_Dicts["AllVisitLocking"])
self.visitlocking_dict = Progression_Dicts["AllVisitLocking"]
def fill_slot_data(self) -> dict:
return {"hitlist": self.hitlist,
@@ -94,7 +94,7 @@ class KH2World(World):
self.sora_keyblade_ability_pool.extend(SupportAbility_Table.keys())
for item, value in self.multiworld.start_inventory[self.player].value.items():
if item in ActionAbility_Table.keys() or item in SupportAbility_Table.keys():
if item in ActionAbility_Table.keys() or item in SupportAbility_Table.keys() or exclusionItem_table["StatUps"]:
# cannot have more than the quantity for abilties
if value > item_dictionary_table[item].quantity:
logging.info(f"{self.multiworld.get_file_safe_player_name(self.player)} cannot have more than {item_dictionary_table[item].quantity} of {item}"
@@ -216,6 +216,15 @@ class KH2World(World):
self.RandomSuperBoss.remove(randomBoss)
self.totalLocations -= 1
# Kingdom Key cannot have No Experience so plandoed here instead of checking 26 times if its kingdom key
random_ability = self.multiworld.per_slot_randoms[self.player].choice(self.sora_keyblade_ability_pool)
while random_ability == ItemName.NoExperience:
random_ability = self.multiworld.per_slot_randoms[self.player].choice(self.sora_keyblade_ability_pool)
self.multiworld.get_location(LocationName.KingdomKeySlot, self.player).place_locked_item(self.create_item(random_ability))
self.item_quantity_dict[random_ability] -= 1
self.sora_keyblade_ability_pool.remove(random_ability)
self.totalLocations -= 1
# plando keyblades because they can only have abilities
for keyblade in self.keyblade_slot_copy:
random_ability = self.multiworld.per_slot_randoms[self.player].choice(self.sora_keyblade_ability_pool)
@@ -266,25 +275,33 @@ class KH2World(World):
# no visit locking
if self.multiworld.Visitlocking[self.player] == "no_visit_locking":
for item in self.visitlockingitem:
self.multiworld.push_precollected(self.create_item(item))
self.item_quantity_dict[item] -= 1
self.visitlockingitem.remove(item)
for item, amount in Progression_Dicts["AllVisitLocking"].items():
for _ in range(amount):
self.multiworld.push_precollected(self.create_item(item))
self.item_quantity_dict[item] -= 1
if self.visitlocking_dict[item] == 0:
self.visitlocking_dict.pop(item)
self.visitlocking_dict[item] -= 1
# first and second visit locking
elif self.multiworld.Visitlocking[self.player] == "second_visit_locking":
for item in Progression_Dicts["2VisitLocking"]:
self.item_quantity_dict[item] -= 1
self.visitlocking_dict[item] -= 1
if self.visitlocking_dict[item] == 0:
self.visitlocking_dict.pop(item)
self.multiworld.push_precollected(self.create_item(item))
self.visitlockingitem.remove(item)
for _ in range(self.multiworld.RandomVisitLockingItem[self.player].value):
if len(self.visitlockingitem) <= 0:
if sum(self.visitlocking_dict.values()) <= 0:
break
item = self.multiworld.per_slot_randoms[self.player].choice(self.visitlockingitem)
visitlocking_set = list(self.visitlocking_dict.keys())
item = self.multiworld.per_slot_randoms[self.player].choice(visitlocking_set)
self.item_quantity_dict[item] -= 1
self.visitlocking_dict[item] -= 1
if self.visitlocking_dict[item] == 0:
self.visitlocking_dict.pop(item)
self.multiworld.push_precollected(self.create_item(item))
self.visitlockingitem.remove(item)
# there are levels but level 1 is there to keep code clean
if self.multiworld.LevelDepth[self.player] == "level_99_sanity":