fix: fix up some vanilla key logic

fix: fix tile pattern
This commit is contained in:
aerinon
2024-01-02 17:09:08 -07:00
parent 337ace1fa3
commit 846423fc38
4 changed files with 28 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ from typing import DefaultDict, Dict, List
from itertools import chain
from BaseClasses import RegionType, Region, Door, DoorType, Sector, CrystalBarrier, DungeonInfo, dungeon_keys
from BaseClasses import PotFlags, LocationType, Direction
from BaseClasses import PotFlags, LocationType, Direction, KeyRuleType
from Doors import reset_portals
from Dungeons import dungeon_regions, region_starts, standard_starts, split_region_starts
from Dungeons import dungeon_bigs, dungeon_hints
@@ -261,8 +261,24 @@ def vanilla_key_logic(world, player):
world.key_logic[player][builder.name] = key_layout.key_logic
world.key_layout[player][builder.name] = key_layout
log_key_logic(builder.name, key_layout.key_logic)
# if world.shuffle[player] == 'vanilla' and world.accessibility[player] == 'items' and not world.retro[player] and not world.keydropshuffle[player]:
# validate_vanilla_key_logic(world, player)
# special adjustments for vanilla
if world.mode[player] != 'standard':
# adjust hc doors
def adjust_hc_door(door_rule):
if door_rule.new_rules[KeyRuleType.WorstCase] == 3:
door_rule.new_rules[KeyRuleType.WorstCase] = 2
door_rule.small_key_num = 2
rules = world.key_logic[player]['Hyrule Castle'].door_rules
adjust_hc_door(rules['Sewers Secret Room Key Door S'])
adjust_hc_door(rules['Hyrule Dungeon Map Room Key Door S'])
adjust_hc_door(rules['Sewers Dark Cross Key Door N'])
# adjust pod front door
pod_front = world.key_logic[player]['Palace of Darkness'].door_rules['PoD Middle Cage N']
if pod_front.new_rules[KeyRuleType.WorstCase] == 6:
pod_front.new_rules[KeyRuleType.WorstCase] = 1
pod_front.small_key_num = 1
# gt logic? I'm unsure it needs adjusting
def validate_vanilla_reservation(dungeon, world, player):

View File

@@ -38,7 +38,7 @@ from source.enemizer.DamageTables import DamageTable
from source.enemizer.Enemizer import randomize_enemies
from source.rom.DataTables import init_data_tables
version_number = '1.4.0.0'
version_number = '1.4.0.1'
version_branch = '-v'
__version__ = f'{version_number}{version_branch}'
@@ -487,6 +487,10 @@ def copy_world(world):
ret.intensity = world.intensity.copy()
ret.decoupledoors = world.decoupledoors.copy()
ret.door_self_loops = world.door_self_loops.copy()
ret.door_type_mode = world.door_type_mode.copy()
ret.trap_door_mode = world.trap_door_mode.copy()
ret.key_logic_algorithm = world.key_logic_algorithm.copy()
ret.aga_randomness = world.aga_randomness.copy()
ret.experimental = world.experimental.copy()
ret.shopsanity = world.shopsanity.copy()
ret.dropshuffle = world.dropshuffle.copy()

View File

@@ -141,6 +141,9 @@ These are now independent of retro mode and have three options: None, Random, an
# Bug Fixes and Notes
* 1.4.0.1v
* Key logic: Vanilla key logic fixes. Statically set some HC logic and PoD front door
* Generation: Fix a broken tile pattern
* 1.4.0.0v
* Initial support for HMG (Thanks Muffins!)
* Generation: fix for bunny walk logic taking up too much memory

View File

@@ -90,7 +90,7 @@ tile_patterns = [
(7, 2), (8, 5), (1, 3), (1, 5), (4, 2), (3, 5), (4, 6), (8, 4), (5, 6)]),
('creeper face', [(3, 7), (4, 5), (5, 4), (5, 6), (3, 3), (2, 2), (3, 2), (7, 3), (6, 7), (4, 6), (6, 3), (7, 2),
(2, 3), (4, 4), (3, 6), (6, 2), (6, 6), (5, 5)]),
('fast', [7, 7])
('fast', [(7, 7)])
]