attempt to start a trainer battle

This commit is contained in:
Bryan Bishop
2013-11-02 14:41:48 -05:00
parent 185856adb4
commit 211da4dcb3

View File

@@ -577,3 +577,17 @@ class crystal(object):
"""
hp = ((self.vba.memory[0xd218] << 8) | self.vba.memory[0xd217])
return hp
def start_trainer_battle(self, trainer_group, trainer_id):
memory = self.vba.memory
# setup the battle
memory[0xd459] = 0x81
memory[0xd22f] = trainer_group
memory[0xd231] = trainer_id
self.vba.memory = memory
Script_startbattle_address = 0x97436
self.call(0x25, Script_startbattle_address)