Bomblogic added

This commit is contained in:
StructuralMike
2021-07-23 20:35:48 +02:00
parent bfd5c5ceeb
commit 051a47e0cd
13 changed files with 54 additions and 26 deletions

View File

@@ -114,6 +114,7 @@ class World(object):
set_player_attr('compassshuffle', False)
set_player_attr('keyshuffle', False)
set_player_attr('bigkeyshuffle', False)
set_player_attr('bomblogic', False)
set_player_attr('difficulty_requirements', None)
set_player_attr('boss_shuffle', 'none')
set_player_attr('enemy_shuffle', 'none')
@@ -686,8 +687,7 @@ class CollectionState(object):
# In the future, this can be used to check if the player starts without bombs
def can_use_bombs(self, player):
StartingBombs = True
return StartingBombs or self.has('Bomb Upgrade (+10)', player)
return (not self.world.bomblogic[player] or self.has('Bomb Upgrade (+10)', player))
def can_hit_crystal(self, player):
return (self.can_use_bombs(player)
@@ -2013,6 +2013,7 @@ class Spoiler(object):
'logic': self.world.logic,
'mode': self.world.mode,
'retro': self.world.retro,
'bomblogic': self.world.bomblogic,
'weapons': self.world.swords,
'goal': self.world.goal,
'shuffle': self.world.shuffle,
@@ -2111,6 +2112,7 @@ class Spoiler(object):
outfile.write('Experimental: %s\n' % ('Yes' if self.metadata['experimental'][player] else 'No'))
outfile.write('Key Drops shuffled: %s\n' % ('Yes' if self.metadata['keydropshuffle'][player] else 'No'))
outfile.write(f"Shopsanity: {'Yes' if self.metadata['shopsanity'][player] else 'No'}\n")
outfile.write('Bomblogic: %s\n' % ('Yes' if self.metadata['bomblogic'][player] else 'No'))
if self.doors:
outfile.write('\n\nDoors:\n\n')
outfile.write('\n'.join(