Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions args/coliseum.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def parse(parser):
coliseum.add_argument("-cnil", "--coliseum-no-illuminas", action = "store_true",
help = "Illuminas will not appear in coliseum")

coliseum.add_argument("-cc", "--coliseum-controllable", action = "store_true",
help = "Make characters controllable in coliseum (except Umaro)")

def process(args):
args._process_min_max("coliseum_rewards_visible_random")

Expand Down Expand Up @@ -56,6 +59,9 @@ def flags(args):
if args.coliseum_no_illuminas:
flags += " -cnil"

if args.coliseum_controllable:
flags += " -cc"

return flags

def options(args):
Expand Down Expand Up @@ -84,6 +90,7 @@ def options(args):
("Rewards Menu", args.coliseum_rewards_menu),
("No Exp. Eggs", args.coliseum_no_exp_eggs),
("No Illuminas", args.coliseum_no_illuminas),
("Controllable", args.coliseum_controllable),
]

def menu(args):
Expand Down
17 changes: 17 additions & 0 deletions data/coliseum.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ def randomize_rewards_hidden(self):
for match_index in hidden_indices:
self.matches[match_index].reward_hidden = 1

def controllable(self):
# Replacing these commands from vanilla with NO-OPS to make Coliseum battles controllable:
# C2/092F: AD 97 3A LDA $3A97 (RAM $3A97 = character are on auto-pilot [colosseum])
# C2/0932: D0 91 BNE $08C5 (exit if in the Colosseum)

# and runnable...
# C2/5BEC: AD 97 3A LDA $3A97
# C2/5BEF: D0 29 BNE $5C1A (exit if in Colosseum)
from memory.space import Reserve
import instruction.asm as asm

space = Reserve(0x02092f, 0x020933, "removing Coliseum check for commands", asm.NOP())
space = Reserve(0x025bec, 0x025bf0, "removing Coliseum no-run", asm.NOP())

def mod(self):
if self.args.coliseum_opponents_shuffle:
self.shuffle_opponents()
Expand All @@ -91,6 +105,9 @@ def mod(self):
if self.args.coliseum_rewards_visible_random:
self.randomize_rewards_hidden()

if self.args.coliseum_controllable:
self.controllable()

def log(self):
from log import section
section("Coliseum", self.formatted_rows(), [])
Expand Down