Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → (Pokered) Is there a way to disable healing Items during battles?

#1 2020-05-07 01:14:33

Gabriel
New member
Registered: 2020-02-27
Post 2/3

(Pokered) Is there a way to disable healing Items during battles?

Hello everyone, I'm working on a personal hack (Pokémon Red) and I'm still new using pokered disassembly,anyway, I was wondering if there is a way to disable healing items (potions, Revives, antidotes....) just during battles. I've been looking through the items.asm file and to be honest I'm kind of...lost, so anyway, that's my question for now.

Offline

#2 2020-05-07 02:56:51

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,161/1,188

Re: (Pokered) Is there a way to disable healing Items during battles?

Here's a similar (but opposite) example - items which can only be used in battle, like Pokeballs:

ItemUseBall:

; Balls can't be used out of battle.
    ld a, [wIsInBattle]
    and a
    jp z, ItemUseNotTime

You can add similar logic to ItemUseMedicine:

ItemUseMedicine:

; Medicine can't be used during battle.
    ld a, [wIsInBattle]
    and a
    jp nz, ItemUseNotTime

Offline

#3 2020-05-07 13:37:44

Gabriel
New member
Registered: 2020-02-27
Post 3/3

Re: (Pokered) Is there a way to disable healing Items during battles?

Thank you very much, Danny! It works perfectly.

Offline

  • Index
  • → Help/Question
  • → (Pokered) Is there a way to disable healing Items during battles?

Board footer

Powered by FluxBB