Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Mar 7, 2024
1 parent 27c1edb commit 2586d4e
Show file tree
Hide file tree
Showing 7 changed files with 320 additions and 282 deletions.
15 changes: 15 additions & 0 deletions worlds/khrecom/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ def on_package(self, cmd: str, args: dict):
with open(os.path.join(self.game_communication_path, "worldorder.cfg"), 'w') as f:
f.write(str(world_order))
f.close()
if "Zeroes" in list(args['slot_data'].keys()):
zeroes_str = args['slot_data']["Zeroes"]
else:
zeroes_str = "Yes"
if zeroes_str == "No":
with open(os.path.join(self.game_communication_path, "nozeroes.cfg"), 'w') as f:
f.write("")
f.close()
if "Attack Power" in list(args['slot_data'].keys()):
attack_power = args['slot_data']["Attack Power"]
else:
attack_power = 10
with open(os.path.join(self.game_communication_path, "attackpower.cfg"), 'w') as f:
f.write(str(attack_power))
f.close()
if cmd in {"ReceivedItems"}:
start_index = args["index"]
if start_index != len(self.items_received):
Expand Down
83 changes: 42 additions & 41 deletions worlds/khrecom/Items.py

Large diffs are not rendered by default.

250 changes: 125 additions & 125 deletions worlds/khrecom/Locations.py

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions worlds/khrecom/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ class EarlyCure(DefaultOnToggle):
"""
display_name = "Early Cure"

class Zeroes(DefaultOnToggle):
"""
Toggle whether 0 value cards are included in card sets
"""
display_name = "Zeroes"

class AttackPower(Range):
"""
Modifier for Sora's strike power. Default is 10
"""
display_name = "Attack Power"
range_start = 1
range_end = 100
default = 10

class DaysLocations(Toggle):
"""
Toggle whether locations not available to the player until they watch 358/2 Days are included in the locations list.
Expand Down Expand Up @@ -56,3 +71,5 @@ class KHRECOMOptions(PerGameCommonOptions):
exp_multiplier: EXPMultiplier
minigames: ChecksBehindMinigames
levels: ChecksBehindSleightsLevels
zeroes: Zeroes
attack_power: AttackPower
126 changes: 63 additions & 63 deletions worlds/khrecom/Regions.py

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions worlds/khrecom/Rules.py

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions worlds/khrecom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,17 @@ def create_regions(self):

def fill_slot_data(self) -> dict:
self.decide_world_order()
zeroes_string = "Yes"
world_order_string = ""
for world_id in self.world_order:
world_order_string = world_order_string + str(world_id) + ","
world_order_string = world_order_string[:-1]
slot_data = {"EXP Multiplier": int(self.options.exp_multiplier)
,"World Order": world_order_string}
if not self.options.zeroes:
zeroes_string = "No"
slot_data = {"EXP Multiplier": int(self.options.exp_multiplier)
,"World Order": world_order_string
,"Zeroes": zeroes_string
,"Attack Power": int(self.options.attack_power)}
return slot_data

def decide_world_order(self):
Expand Down

0 comments on commit 2586d4e

Please sign in to comment.