Skip to content

Commit

Permalink
add motens
Browse files Browse the repository at this point in the history
  • Loading branch information
nmarkro committed Apr 16, 2020
1 parent 6ab0c77 commit 93f2e7b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -8,6 +8,8 @@ We are currently in the alpha/beta stages, and the randomizer itself is not comp

The list of added features and changes to the randomizer can be seen on this document: https://docs.google.com/document/d/1pZ_aiLmRK1lYKKDy6A23m2iAVeU1wcVut1-mGM4vkLM

Feel free to join the Nocturne Randomizer discord: https://discord.gg/d25ZAha

### Credits

The randomizer was created and programmed by NMarkro and PinkPajamas, with additional help from:
Expand Down
10 changes: 5 additions & 5 deletions data/demon_names.txt
Expand Up @@ -317,12 +317,12 @@ Succubus (Boss)
Troll (Boss)
Will o' Wisp (Tutorial)
Preta (Tutorial)
Bishamonten 1 (Boss)
Bishamon 1 (Boss)
Mara (Boss)
Monten? (Boss)
Monten? (Boss)
Monten? (Boss)
Monten? (Boss)
Bishamon 2 (Boss)
Jikoku (Boss)
Koumoku (Boss)
Zouchou (Boss)
Clotho 2 (Boss)
Lachesis 2 (Boss)
Atropos 2 (Boss)
Expand Down
10 changes: 9 additions & 1 deletion logic.py
Expand Up @@ -86,6 +86,7 @@ def create_areas(world):
world.add_check('Pale Rider', asakusa, 2856928)
world.add_check("Black Frost", asakusa, 2845148)
world.add_check('White Rider', asakusa, 2856966)
world.add_check('Bishamon 1', asakusa, 2845186)
world.add_flag("Apocalypse Stone", 0x3F4)

obelisk = world.add_area('Obelisk')
Expand Down Expand Up @@ -152,9 +153,15 @@ def create_areas(world):
world.get_check('Noah').flag_rewards = [netherstone]
world.get_check('Baal Avatar').flag_rewards = [heavenstone]

bandou = world.add_area('Bandou Shrine')
world.add_check("Bishamon 2", bandou, 2848606)
world.add_check("Jikoku", bandou, 2848644)
world.add_check("Koumoku", bandou, 2854344)
world.add_check("Zouchou", bandou, 2854382)


# Bosses not to randomize
BANNED_BOSSES = ['Ongyo-Ki', 'Specter 1', 'Specter 2', 'Specter 3', 'Dante 1', 'Dante 2', 'Ahriman', 'Noah', 'Thor 2', 'Baal Avatar', 'Kagutsuchi', 'Lucifer']
BANNED_BOSSES = ['Ongyo-Ki', 'Specter 1', 'Specter 2', 'Specter 3', 'Ahriman', 'Noah', 'Thor 2', 'Baal Avatar', 'Kagutsuchi', 'Lucifer']

def create_world():
world = World()
Expand Down Expand Up @@ -234,6 +241,7 @@ def randomize_world(world, logger, attempts=100):
random.shuffle(magatama_pool)
world.bonus_magatama = magatama_pool.pop()
state.get_magatama(world.bonus_magatama.name)
logger.info('Bonus Magatama: {}'.format(world.bonus_magatama.name))

reward_pool = magatama_pool + flag_pool
random.shuffle(reward_pool)
Expand Down
8 changes: 5 additions & 3 deletions randomizer.py
Expand Up @@ -19,7 +19,7 @@
from fs.Iso_FS import IsoFS
from fs.DDS3_FS import DDS3FS

VERSION = '0.1.2'
VERSION = '0.1.3'
BETA = True
TEST = False

Expand Down Expand Up @@ -494,7 +494,7 @@ def randomize_boss_battles(self, world):
stat_mod = 1
exp_mod = self.config_exp_modifier
if new_boss_demon.name in ['White Rider (Boss)', 'Red Rider (Boss)', 'Black Rider (Boss)', 'Pale Rider (Boss)']:
stat_mod = 0.75
# stat_mod = 0.75
new_level = round(new_level * 0.85)
elif new_boss_demon.name == 'Albion (Boss)':
new_level = round(new_level * 0.75)
Expand Down Expand Up @@ -663,6 +663,8 @@ def run(self):
logger = logging.getLogger('')
if self.config_make_logs:
logging.basicConfig(filename='logs/spoiler.log', level=logging.INFO)
with open('logs/spoiler.log', 'w') as f:
f.write("")

print('initializing data')
nocturne.load_all(self.rom)
Expand Down Expand Up @@ -755,4 +757,4 @@ def run(self):
flags = sys.argv[3].strip()
rando = Randomizer(input_path, seed, flags)
rando.run()
input('Press any button to exit')
input('Press [Enter] to exit')
24 changes: 24 additions & 0 deletions rules.py
Expand Up @@ -83,6 +83,10 @@ def set_boss_rule(a, rule):
lambda state: state.has_terminal('Obelisk') and state.has_flag('Pyramidion') and state.has_terminal('Amala Temple') and
state.has_checked('Albion') and state.has_checked('Aciel') and state.has_checked('Skadi')
)
set_rule(
world.get_area('Bandou Shrine'),
lambda state: state.has_terminal('Yurakucho Tunnel') and state.has_terminal('Asakusa') and state.has_checked('Bishamon 1')
)

# Check access rules
set_rule(
Expand Down Expand Up @@ -292,6 +296,26 @@ def set_boss_rule(a, rule):
world.get_boss('Metatron'),
lambda state: state.has_resistance("Expel")
)
set_rule(
world.get_boss('Bishamon 1'),
lambda state: state.has_resistance("Fire")
)
set_rule(
world.get_boss('Bishamon 2'),
lambda state: state.has_resistance("Fire")
)
set_rule(
world.get_boss('Jikoku'),
lambda state: state.has_resistance("Ice")
)
set_rule(
world.get_boss('Koumoku'),
lambda state: state.has_resistance("Force")
)
set_rule(
world.get_boss('Zouchou'),
lambda state: state.has_resistance("Elec")
)

# Make sure Resist/Null/Absorb/Repel Phys bosses aren't in SMC
set_boss_rule(
Expand Down

0 comments on commit 93f2e7b

Please sign in to comment.