summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdain <luiscarlosholguinperez@outlook.com>2021-06-26 21:25:39 -0400
committerIdain <luiscarlosholguinperez@outlook.com>2021-06-26 21:25:39 -0400
commit1716b45c23ff6b75371459417f9af8d6f64334fb (patch)
treebf03995cb9eaa0531931032e294f08c0b3668275
parent054f528d4677b841f369f2558ed10453696bbeb4 (diff)
Fixing tip about giving enemy Trainers max happiness.
-rw-r--r--Tips-and-tricks.md36
1 files changed, 16 insertions, 20 deletions
diff --git a/Tips-and-tricks.md b/Tips-and-tricks.md
index dd0f891..43cd764 100644
--- a/Tips-and-tricks.md
+++ b/Tips-and-tricks.md
@@ -83,28 +83,24 @@ Edit [gfx/overworld/npc_sprites.pal](../blob/master/gfx/overworld/npc_sprites.pa
## Enemy trainers have maximum happiness for a powerful Return
-Edit [engine/pokemon/move_mon.asm](../blob/master/engine/pokemon/move_mon.asm):
+Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm):
```diff
- TryAddMonToParty:
- ...
- GeneratePartyMonStats:
- ; wBattleMode specifies whether it's a wild mon or not.
- ; wMonType specifies whether it's an opposing mon or not.
- ; wCurPartySpecies/wCurPartyLevel specify the species and level.
- ; hl points to the wPartyMon struct to fill.
- ...
-
- ; Initialize happiness.
-+ ld a, [wMonType]
-+ and $f
- ld a, BASE_HAPPINESS
-+ jr z, .got_happiness
-+ ld a, $ff ; max happiness for enemy trainers
-+.got_happiness
- ld [de], a
- inc de
-
+ LoadEnemyMon:
+ ; Initialize enemy monster parameters
+ ; To do this we pull the species from wTempEnemyMonSpecies
+
+ ...
+
+ .Happiness:
+ ; Set happiness
++ ld a, [wBattleMode]
++ dec a
++ ld a, $ff
++ jr nz, .load_happiness ; If it's a Trainer battle, give enemy mon max happiness.
+ ld a, BASE_HAPPINESS
++.load_happiness
+ ld [wEnemyMonHappiness], a
...
```