diff options
| author | Yoann Fievez <yoann.fievez@gmail.com> | 2026-06-14 23:01:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-14 17:01:53 -0400 |
| commit | 320b7c780a870b3923fe94793ca3a93d5eae00db (patch) | |
| tree | 6db8af6882b90c39db4c1a7248f061294b835f2e /engine/events | |
| parent | Document `UpdatePikachuHappinessAndMood` routine (#155) (diff) | |
| download | pokeyellow-320b7c780a870b3923fe94793ca3a93d5eae00db.tar.gz pokeyellow-320b7c780a870b3923fe94793ca3a93d5eae00db.tar.xz pokeyellow-320b7c780a870b3923fe94793ca3a93d5eae00db.zip | |
Rename wd49b to wPikachuEmotionModifier (#156)
This variable serves as an override for Pikachu's emotion following specific events like refusing a Thunder Stone. It is automatically cleared when its mood normalizes.
Diffstat (limited to 'engine/events')
| -rw-r--r-- | engine/events/pikachu_happiness.asm | 2 | ||||
| -rw-r--r-- | engine/events/poison.asm | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engine/events/pikachu_happiness.asm b/engine/events/pikachu_happiness.asm index 32a69c2b..d952df34 100644 --- a/engine/events/pikachu_happiness.asm +++ b/engine/events/pikachu_happiness.asm @@ -73,7 +73,7 @@ ModifyPikachuHappiness:: jr c, .decreased cp b jr nc, .done - ld a, [wd49b] + ld a, [wPikachuEmotionModifier] and a jr nz, .done jr .update_mood diff --git a/engine/events/poison.asm b/engine/events/poison.asm index c2f7e8b3..e0464ae8 100644 --- a/engine/events/poison.asm +++ b/engine/events/poison.asm @@ -139,7 +139,7 @@ UpdatePikachuHappinessAndMood: ld hl, wPikachuMood ld a, [hl] cp 128 ; central value - jr z, .update_wd49b ; mood == 128, don't modify it + jr z, .clearEmotionModifier ; mood == 128, don't modify it jr c, .increaseMood ; mood < 128, must increase by 1 ; mood > 128, must decrease by 1 (so decrease by 2 and then increase by 1) dec a @@ -147,10 +147,10 @@ UpdatePikachuHappinessAndMood: .increaseMood inc a ld [hl], a -; if the mood has reached its "stable" central value, do not update wd49b +; if the mood has reached its "stable" central value, do not update the emotion modifier cp 128 ret nz -.update_wd49b +.clearEmotionModifier xor a - ld [wd49b], a ; variable used in other mood-related functions, to keep track if the mood was "stable" + ld [wPikachuEmotionModifier], a ; variable used in other mood-related functions, to keep track if the mood was "stable" ret |
