diff options
| author | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 16:51:04 +0200 |
|---|---|---|
| committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:05:50 +0200 |
| commit | 2fe782b11a039b52fd236da28fb2f1ae10cae7db (patch) | |
| tree | 580cc7bf8b0ebd617fd0ba0440618d38c355aa83 /engine/battle/e.asm | |
| parent | Rename battle files and split move effects Part 3 (diff) | |
| download | pokeyellow-2fe782b11a039b52fd236da28fb2f1ae10cae7db.tar.gz pokeyellow-2fe782b11a039b52fd236da28fb2f1ae10cae7db.tar.xz pokeyellow-2fe782b11a039b52fd236da28fb2f1ae10cae7db.zip | |
Rename battle files and split move effects Part 4
e.asm, e_2. asm, and 14.asm
Diffstat (limited to '')
| -rw-r--r--[-rwxr-xr-x] | engine/battle/trainer_party_ai_misc.asm (renamed from engine/battle/e.asm) | 306 |
1 files changed, 0 insertions, 306 deletions
diff --git a/engine/battle/e.asm b/engine/battle/trainer_party_ai_misc.asm index 1144abe8..8cbb9329 100755..100644 --- a/engine/battle/e.asm +++ b/engine/battle/trainer_party_ai_misc.asm @@ -1,117 +1,3 @@ -; does nothing since no stats are ever selected (barring glitches) -DoubleSelectedStats: ; 39680 (e:5680) - ld a, [H_WHOSETURN] - and a - ld a, [wPlayerStatsToDouble] - ld hl, wBattleMonAttack + 1 - jr z, .notEnemyTurn - ld a, [wEnemyStatsToDouble] - ld hl, wEnemyMonAttack + 1 -.notEnemyTurn - ld c, 4 - ld b, a -.loop - srl b - call c, .doubleStat - inc hl - inc hl - dec c - ret z - jr .loop - -.doubleStat - ld a, [hl] - add a - ld [hld], a - ld a, [hl] - rl a - ld [hli], a - ret - -; does nothing since no stats are ever selected (barring glitches) -HalveSelectedStats: ; 396a7 (e:56a7) - ld a, [H_WHOSETURN] - and a - ld a, [wPlayerStatsToHalve] - ld hl, wBattleMonAttack - jr z, .notEnemyTurn - ld a, [wEnemyStatsToHalve] - ld hl, wEnemyMonAttack -.notEnemyTurn - ld c, 4 - ld b, a -.loop - srl b - call c, .halveStat - inc hl - inc hl - dec c - ret z - jr .loop - -.halveStat - ld a, [hl] - srl a - ld [hli], a - rr [hl] - or [hl] - jr nz, .nonzeroStat - ld [hl], 1 -.nonzeroStat - dec hl - ret - -_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) -; Load the enemy trainer's pic and scrolls it into -; the screen from the right. - xor a - ld [wEnemyMonSpecies2], a - ld b, $1 - call GoPAL_SET - callab _LoadTrainerPic - hlCoord 19, 0 - ld c, $0 -.scrollLoop - inc c - ld a, c - cp 7 - ret z - ld d, $0 - push bc - push hl -.drawTrainerPicLoop - call DrawTrainerPicColumn - inc hl - ld a, 7 - add d - ld d, a - dec c - jr nz, .drawTrainerPicLoop - ld c, 4 - call DelayFrames - pop hl - pop bc - dec hl - jr .scrollLoop - -; write one 7-tile column of the trainer pic to the tilemap -DrawTrainerPicColumn: ; 39707 (e:5707) - push hl - push de - push bc - ld e, 7 -.loop - ld [hl], d - ld bc, SCREEN_WIDTH - add hl, bc - inc d - dec e - jr nz, .loop - pop bc - pop de - pop hl - ret - ; creates a set of moves that may be used and returns its address in hl ; unused slots are filled with 0, all used slots may be chosen with equal probability AIEnemyTrainerChooseMoves: ; 39719 (e:5719) @@ -1375,195 +1261,3 @@ AIPrintItemUse_: ; 3a835 (e:6835) AIBattleUseItemText: ; 3a844 (e:6844) TX_FAR _AIBattleUseItemText db "@" - -DrawAllPokeballs: ; 3a849 (e:6849) - call LoadPartyPokeballGfx - call SetupOwnPartyPokeballs - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - dec a - ret z ; return if wild pokémon - jp SetupEnemyPartyPokeballs - -DrawEnemyPokeballs: ; 0x3a857 - call LoadPartyPokeballGfx - jp SetupEnemyPartyPokeballs - -LoadPartyPokeballGfx: ; 3a85d (e:685d) - ld de, PokeballTileGraphics ; $697e - ld hl, vSprites + $310 - ld bc, (BANK(PokeballTileGraphics) << 8) + $04 - jp CopyVideoData - -SetupOwnPartyPokeballs: ; 3a869 (e:6869) - call PlacePlayerHUDTiles - ld hl, wPartyMon1 - ld de, wPartyCount ; wPartyCount - call SetupPokeballs - ld a, $60 - ld hl, W_BASECOORDX ; wd081 - ld [hli], a - ld [hl], a - ld a, $8 - ld [wTrainerEngageDistance], a - ld hl, wOAMBuffer - jp WritePokeballOAMData - -SetupEnemyPartyPokeballs: ; 3a887 (e:6887) - call PlaceEnemyHUDTiles - ld hl, wEnemyMons - ld de, wEnemyPartyCount ; wEnemyPartyCount - call SetupPokeballs - ld hl, W_BASECOORDX ; wd081 - ld a, $48 - ld [hli], a - ld [hl], $20 - ld a, $f8 - ld [wTrainerEngageDistance], a - ld hl, wOAMBuffer + PARTY_LENGTH * 4 - jp WritePokeballOAMData - -SetupPokeballs: ; 0x3a8a6 - ld a, [de] - push af - ld de, wBuffer - ld c, PARTY_LENGTH - ld a, $34 ; empty pokeball -.emptyloop - ld [de], a - inc de - dec c - jr nz, .emptyloop - pop af - ld de, wBuffer -.monloop - push af - call PickPokeball - inc de - pop af - dec a - jr nz, .monloop - ret - -PickPokeball: ; 3a8c2 (e:68c2) - inc hl - ld a, [hli] - and a - jr nz, .alive - ld a, [hl] - and a - ld b, $33 ; crossed ball (fainted) - jr z, .done_fainted -.alive - inc hl - inc hl - ld a, [hl] ; status - and a - ld b, $32 ; black ball (status) - jr nz, .done - dec b ; regular ball - jr .done -.done_fainted - inc hl - inc hl -.done - ld a, b - ld [de], a - ld bc, $0028 ; rest of mon struct - add hl, bc - ret - -WritePokeballOAMData: ; 3a8e1 (e:68e1) - ld de, wBuffer - ld c, PARTY_LENGTH -.loop - ld a, [W_BASECOORDY] ; wd082 - ld [hli], a - ld a, [W_BASECOORDX] ; wd081 - ld [hli], a - ld a, [de] - ld [hli], a - xor a - ld [hli], a - ld a, [W_BASECOORDX] ; wd081 - ld b, a - ld a, [wTrainerEngageDistance] - add b - ld [W_BASECOORDX], a ; wd081 - inc de - dec c - jr nz, .loop - ret - -PlacePlayerHUDTiles: ; 3a902 (e:6902) - ld hl, PlayerBattleHUDGraphicsTiles ; $6916 - ld de, wTrainerFacingDirection - ld bc, $3 - call CopyData - hlCoord 18, 10 - ld de, rIE ; $ffff - jr PlaceHUDTiles - -PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916) -; The tile numbers for specific parts of the battle display for the player's pokemon - db $73 ; unused ($73 is hardcoded into the routine that uses these bytes) - db $77 ; lower-right corner tile of the HUD - db $6F ; lower-left triangle tile of the HUD - -PlaceEnemyHUDTiles: ; 3a919 (e:6919) - ld hl, EnemyBattleHUDGraphicsTiles ; $692d - ld de, wTrainerFacingDirection - ld bc, $3 - call CopyData - hlCoord 1, 2 - ld de, $1 - jr PlaceHUDTiles - -EnemyBattleHUDGraphicsTiles: ; 3a92d (e:692d) -; The tile numbers for specific parts of the battle display for the enemy - db $73 ; unused ($73 is hardcoded in the routine that uses these bytes) - db $74 ; lower-left corner tile of the HUD - db $78 ; lower-right triangle tile of the HUD - -PlaceHUDTiles: ; 3a930 (e:6930) - ld [hl], $73 - ld bc, $14 - add hl, bc - ld a, [wTrainerScreenY] - ld [hl], a - ld a, $8 -.asm_3a93c - add hl, de - ld [hl], $76 - dec a - jr nz, .asm_3a93c - add hl, de - ld a, [wTrainerScreenX] - ld [hl], a - ret - -SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948) - call LoadPartyPokeballGfx - ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1) - ld de, wPartyCount ; wPartyCount - call SetupPokeballs - ld hl, W_BASECOORDX ; wd081 - ld a, $50 - ld [hli], a - ld [hl], $40 - ld a, $8 - ld [wTrainerEngageDistance], a - ld hl, wOAMBuffer - call WritePokeballOAMData - ld hl, wEnemyMons ; wEnemyMon1Species - ld de, wEnemyPartyCount ; wEnemyPartyCount - call SetupPokeballs - ld hl, W_BASECOORDX ; wd081 - ld a, $50 - ld [hli], a - ld [hl], $68 - ld hl, wOAMBuffer + $18 - jp WritePokeballOAMData - -; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon) -PokeballTileGraphics:: ; 3a97e (e:697e) - INCBIN "gfx/pokeball.2bpp" |
