fix: prevent crash from bush spawning mimics hopefully
This commit is contained in:
@@ -3,10 +3,11 @@
|
|||||||
* 1.4.7
|
* 1.4.7
|
||||||
- Fixed generation error with Big Key in starting inventory (thanks Cody!)
|
- Fixed generation error with Big Key in starting inventory (thanks Cody!)
|
||||||
- HMG/NL logic fixes by Muffins
|
- HMG/NL logic fixes by Muffins
|
||||||
- Enemizer: Disabled Wlkaing Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway)
|
- Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway)
|
||||||
- "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons
|
- Enemizer: Banned new Mimics from being the randomized bush sprite due to crash
|
||||||
|
- "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip)
|
||||||
- Logic error with enemizer and standard should use new enemy logic rules
|
- Logic error with enemizer and standard should use new enemy logic rules
|
||||||
- Fixed a bug with the inconsistent treatment of the beemizer setting
|
- Fixed a bug with the inconsistent treatment of the beemizer setting
|
||||||
- Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House)
|
- Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House)
|
||||||
- Fixed an issue with dark sanctuary spawn at tavern north door (thanks Codemann!)
|
- Fixed an issue with dark sanctuary spawn at tavern north door (thanks Codemann!)
|
||||||
- Various enemy bans for the last couple months
|
- Various enemy bans for the last few months
|
||||||
|
|||||||
@@ -408,8 +408,9 @@ def randomize_overworld_enemies(data_tables, custom_ow):
|
|||||||
chosen = random.choices(candidate_sprites, weight, k=1)[0]
|
chosen = random.choices(candidate_sprites, weight, k=1)[0]
|
||||||
sprite.kind = chosen.sprite
|
sprite.kind = chosen.sprite
|
||||||
# randomize the bush sprite per area
|
# randomize the bush sprite per area
|
||||||
|
bush_candidates = [x for x in candidate_sprites if x.bush_valid]
|
||||||
weight = [data_tables.ow_weights[r.sprite] for r in candidate_sprites]
|
weight = [data_tables.ow_weights[r.sprite] for r in candidate_sprites]
|
||||||
bush_sprite_choice = random.choices(candidate_sprites, weight, k=1)[0]
|
bush_sprite_choice = random.choices(bush_candidates, weight, k=1)[0]
|
||||||
data_tables.bush_sprite_table[area_id] = bush_sprite_choice
|
data_tables.bush_sprite_table[area_id] = bush_sprite_choice
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class SpriteRequirement:
|
|||||||
self.uw_valid = True
|
self.uw_valid = True
|
||||||
self.can_randomize = True
|
self.can_randomize = True
|
||||||
self.water_phobic = False
|
self.water_phobic = False
|
||||||
|
self.bush_valid = True
|
||||||
|
|
||||||
self.groups = []
|
self.groups = []
|
||||||
self.sub_groups = defaultdict(list)
|
self.sub_groups = defaultdict(list)
|
||||||
@@ -94,6 +95,10 @@ class SpriteRequirement:
|
|||||||
self.uw_valid = False
|
self.uw_valid = False
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def no_bush(self):
|
||||||
|
self.bush_valid = False
|
||||||
|
return self
|
||||||
|
|
||||||
def good_for_uw_water(self):
|
def good_for_uw_water(self):
|
||||||
return self.water_only and not self.static and not self.dont_use and self.uw_valid
|
return self.water_only and not self.static and not self.dont_use and self.uw_valid
|
||||||
|
|
||||||
@@ -366,8 +371,8 @@ def init_sprite_requirements():
|
|||||||
SpriteRequirement(EnemySprite.MagicShopAssistant).affix().sub_group(0, 0x4b).sub_group(3, 0x5a),
|
SpriteRequirement(EnemySprite.MagicShopAssistant).affix().sub_group(0, 0x4b).sub_group(3, 0x5a),
|
||||||
SpriteRequirement(EnemySprite.SomariaPlatform).affix().sub_group(2, 0x27),
|
SpriteRequirement(EnemySprite.SomariaPlatform).affix().sub_group(2, 0x27),
|
||||||
SpriteRequirement(EnemySprite.CastleMantle).affix().sub_group(0, 0x5d),
|
SpriteRequirement(EnemySprite.CastleMantle).affix().sub_group(0, 0x5d),
|
||||||
SpriteRequirement(EnemySprite.GreenMimic).sub_group(1, 0x2c),
|
SpriteRequirement(EnemySprite.GreenMimic).sub_group(1, 0x2c).no_bush(),
|
||||||
SpriteRequirement(EnemySprite.RedMimic).sub_group(1, 0x2c),
|
SpriteRequirement(EnemySprite.RedMimic).sub_group(1, 0x2c).no_bush(),
|
||||||
SpriteRequirement(EnemySprite.MedallionTablet).affix().sub_group(2, 0x12),
|
SpriteRequirement(EnemySprite.MedallionTablet).affix().sub_group(2, 0x12),
|
||||||
|
|
||||||
# overlord requirements - encapsulated mostly in the required sheets
|
# overlord requirements - encapsulated mostly in the required sheets
|
||||||
|
|||||||
Reference in New Issue
Block a user