You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Use "battle_anims" and "sprite_anims" for clarity, not just "anims"
This commit is contained in:
3
engine/battle/battlestart_copytilemapatonce.asm
Normal file
3
engine/battle/battlestart_copytilemapatonce.asm
Normal file
@@ -0,0 +1,3 @@
|
||||
BattleStart_CopyTilemapAtOnce: ; 8cf4f
|
||||
call CGBOnly_CopyTilemapAtOnce
|
||||
ret
|
47
engine/battle/checkbattlescene.asm
Normal file
47
engine/battle/checkbattlescene.asm
Normal file
@@ -0,0 +1,47 @@
|
||||
CheckBattleScene: ; 4ea44
|
||||
; Return carry if battle scene is turned off.
|
||||
|
||||
ld a, 0
|
||||
ld hl, wLinkMode
|
||||
call GetFarWRAMByte
|
||||
cp LINK_MOBILE
|
||||
jr z, .mobile
|
||||
|
||||
ld a, [Options]
|
||||
bit BATTLE_SCENE, a
|
||||
jr nz, .off
|
||||
|
||||
and a
|
||||
ret
|
||||
|
||||
.mobile
|
||||
ld a, [wcd2f]
|
||||
and a
|
||||
jr nz, .from_wram
|
||||
|
||||
ld a, $4
|
||||
call GetSRAMBank
|
||||
ld a, [$a60c]
|
||||
ld c, a
|
||||
call CloseSRAM
|
||||
|
||||
ld a, c
|
||||
bit 0, c
|
||||
jr z, .off
|
||||
|
||||
and a
|
||||
ret
|
||||
|
||||
.from_wram
|
||||
ld a, $5
|
||||
ld hl, w5_dc00
|
||||
call GetFarWRAMByte
|
||||
bit 0, a
|
||||
jr z, .off
|
||||
|
||||
and a
|
||||
ret
|
||||
|
||||
.off
|
||||
scf
|
||||
ret
|
80
engine/battle/consumehelditem.asm
Normal file
80
engine/battle/consumehelditem.asm
Normal file
@@ -0,0 +1,80 @@
|
||||
ConsumeHeldItem: ; 27192
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
ld hl, OTPartyMon1Item
|
||||
ld de, EnemyMonItem
|
||||
ld a, [CurOTMon]
|
||||
jr z, .theirturn
|
||||
ld hl, PartyMon1Item
|
||||
ld de, BattleMonItem
|
||||
ld a, [CurBattleMon]
|
||||
|
||||
.theirturn
|
||||
push hl
|
||||
push af
|
||||
ld a, [de]
|
||||
ld b, a
|
||||
farcall GetItemHeldEffect
|
||||
ld hl, .ConsumableEffects
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr z, .ok
|
||||
inc a
|
||||
jr nz, .loop
|
||||
pop af
|
||||
pop hl
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
.ok
|
||||
xor a
|
||||
ld [de], a
|
||||
pop af
|
||||
pop hl
|
||||
call GetPartyLocation
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr nz, .ourturn
|
||||
ld a, [wBattleMode]
|
||||
dec a
|
||||
jr z, .done
|
||||
|
||||
.ourturn
|
||||
ld [hl], $0
|
||||
|
||||
.done
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
.ConsumableEffects: ; 271de
|
||||
; Consumable items?
|
||||
db HELD_BERRY
|
||||
db HELD_2
|
||||
db HELD_5
|
||||
db HELD_HEAL_POISON
|
||||
db HELD_HEAL_FREEZE
|
||||
db HELD_HEAL_BURN
|
||||
db HELD_HEAL_SLEEP
|
||||
db HELD_HEAL_PARALYZE
|
||||
db HELD_HEAL_STATUS
|
||||
db HELD_30
|
||||
db HELD_ATTACK_UP
|
||||
db HELD_DEFENSE_UP
|
||||
db HELD_SPEED_UP
|
||||
db HELD_SP_ATTACK_UP
|
||||
db HELD_SP_DEFENSE_UP
|
||||
db HELD_ACCURACY_UP
|
||||
db HELD_EVASION_UP
|
||||
db HELD_38
|
||||
db HELD_71
|
||||
db HELD_ESCAPE
|
||||
db HELD_CRITICAL_UP
|
||||
db -1
|
19
engine/battle/returntobattle_useball.asm
Normal file
19
engine/battle/returntobattle_useball.asm
Normal file
@@ -0,0 +1,19 @@
|
||||
_ReturnToBattle_UseBall: ; 2715c
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
ld a, [BattleType]
|
||||
cp BATTLETYPE_TUTORIAL
|
||||
jr z, .gettutorialbackpic
|
||||
farcall GetBattleMonBackpic
|
||||
jr .continue
|
||||
|
||||
.gettutorialbackpic
|
||||
farcall GetTrainerBackpic
|
||||
.continue
|
||||
farcall GetEnemyMonFrontpic
|
||||
farcall _LoadBattleFontsHPBar
|
||||
call GetMemSGBLayout
|
||||
call CloseWindow
|
||||
call LoadStandardMenuDataHeader
|
||||
call WaitBGMap
|
||||
jp SetPalettes
|
9
engine/battle/updatebattlehuds.asm
Normal file
9
engine/battle/updatebattlehuds.asm
Normal file
@@ -0,0 +1,9 @@
|
||||
_UpdateBattleHUDs:
|
||||
farcall DrawPlayerHUD
|
||||
ld hl, PlayerHPPal
|
||||
call SetHPPal
|
||||
farcall DrawEnemyHUD
|
||||
ld hl, EnemyHPPal
|
||||
call SetHPPal
|
||||
farcall FinishBattleAnim
|
||||
ret
|
Reference in New Issue
Block a user