diff options
| author | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:03:05 +0200 |
|---|---|---|
| committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:05:51 +0200 |
| commit | 10211cc461b35140c815e18e95f7070eb0dcc586 (patch) | |
| tree | a3ccfaf788d8b7cb7e743125bfceb3785a1b0d19 /engine/battle/1a.asm | |
| parent | Rename battle files and split move effects Part 4 (diff) | |
| download | pokeyellow-10211cc461b35140c815e18e95f7070eb0dcc586.tar.gz pokeyellow-10211cc461b35140c815e18e95f7070eb0dcc586.tar.xz pokeyellow-10211cc461b35140c815e18e95f7070eb0dcc586.zip | |
Rename battle files and split move effects Part 5
15.asm, 16.asm, 1a.asm, 1c.asm
Diffstat (limited to 'engine/battle/1a.asm')
| -rwxr-xr-x | engine/battle/1a.asm | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/engine/battle/1a.asm b/engine/battle/1a.asm deleted file mode 100755 index ecf5040b..00000000 --- a/engine/battle/1a.asm +++ /dev/null @@ -1,43 +0,0 @@ -DecrementPP: ; 68000 (1a:4000) -; after using a move, decrement pp in battle and (if not transformed?) in party - ld a, [de] - cp a, STRUGGLE - ret z ; if the pokemon is using "struggle", there's nothing to do - ; we don't decrement PP for "struggle" - ld hl, W_PLAYERBATTSTATUS1 - ld a, [hli] ; load the W_PLAYERBATTSTATUS1 pokemon status flags and increment hl to load the - ; W_PLAYERBATTSTATUS2 status flags later - and a, (1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << AttackingMultipleTimes) - ret nz ; if any of these statuses are true, don't decrement PP - bit UsingRage, [hl] - ret nz ; don't decrement PP either if Pokemon is using Rage - ld hl, wBattleMonPP ; PP of first move (in battle) - -; decrement PP in the battle struct - call .DecrementPP - -; decrement PP in the party struct - ld a, [W_PLAYERBATTSTATUS3] - bit Transformed, a - ret nz ; Return if transformed. Pokemon Red stores the "current pokemon's" PP - ; separately from the "Pokemon in your party's" PP. This is - ; duplication -- in all cases *other* than Pokemon with Transform. - ; Normally, this means we have to go on and make the same - ; modification to the "party's pokemon" PP that we made to the - ; "current pokemon's" PP. But, if we're dealing with a Transformed - ; Pokemon, it has separate PP for the move set that it copied from - ; its opponent, which is *not* the same as its real PP as part of your - ; party. So we return, and don't do that part. - - ld hl, wPartyMon1PP ; PP of first move (in party) - ld a, [wPlayerMonNumber] ; which mon in party is active - ld bc, wPartyMon2 - wPartyMon1 - call AddNTimes ; calculate address of the mon to modify -.DecrementPP - ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? - ld c, a - ld b, 0 - add hl ,bc ; calculate the address in memory of the PP we need to decrement - ; based on the move chosen. - dec [hl] ; Decrement PP - ret |
