import pyMeow as pm

class MK77Hack:
    # 008438DC is MK-77 Ammo -> offset 0x12C from local_player (0x8437B0)
    # 008438B8 is MK-77 Mag -> offset 0x108 from local_player (0x8437B0)
    offset_ammo = 0x12C
    offset_mag = 0x108

    @classmethod
    def apply(cls, proc, local_player_addr, ammo_value=999, mag_value=99):
        """local_player의 MK-77 총알 및 탄창 개수를 고정시킵니다."""
        try:
            pm.w_int(proc, local_player_addr + cls.offset_ammo, ammo_value)
            pm.w_int(proc, local_player_addr + cls.offset_mag, mag_value)
        except Exception as e:
            pass
