mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-08-09 10:47:24 -05:00
a quick function to set pokemon hp in battle
This commit is contained in:
parent
7b1be358d8
commit
4c6a904db1
|
|
@ -523,6 +523,13 @@ class crystal(object):
|
|||
self.vba.write_memory_at(0xd216, 0)
|
||||
self.vba.write_memory_at(0xd217, 1)
|
||||
|
||||
def set_battle_mon_hp(self, hp):
|
||||
"""
|
||||
Set the BattleMonHP variable to the given hp.
|
||||
"""
|
||||
self.vba.write_memory_at(0xc63c, hp / 0x100)
|
||||
self.vba.write_memory_at(0xc63c + 1, hp % 0x100)
|
||||
|
||||
def nstep(self, steplimit=500):
|
||||
"""
|
||||
Steps the CPU forward and calls some functions in between each step.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user