mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
commit
056c240366
@ -326,7 +326,7 @@ AIScoring_Smart: ; 386be
|
||||
dbw EFFECT_BIND, AIScoring_Bind
|
||||
dbw EFFECT_UNUSED_2B, AIScoring_Unused2B
|
||||
dbw EFFECT_CONFUSE, AIScoring_Confuse
|
||||
dbw EFFECT_SP_DEFENSE_UP_2, AIScoring_SpDefenseUp2
|
||||
dbw EFFECT_SP_DEF_UP_2, AIScoring_SpDefenseUp2
|
||||
dbw EFFECT_REFLECT, AIScoring_Reflect
|
||||
dbw EFFECT_PARALYZE, AIScoring_Paralyze
|
||||
dbw EFFECT_SPEED_DOWN_HIT, AIScoring_SpeedDownHit
|
||||
|
@ -475,7 +475,7 @@ Function3c314: ; 3c314
|
||||
ld a, [$d0ec]
|
||||
and a
|
||||
jp nz, .asm_3c3f1
|
||||
call Function3c5b4
|
||||
call CompareMovePriority
|
||||
jr z, .asm_3c36d
|
||||
jp c, .asm_3c3f1
|
||||
jp Function3c3f3
|
||||
@ -848,7 +848,10 @@ AlwaysFleeMons: ; 3c5b1
|
||||
; 3c5b4
|
||||
|
||||
|
||||
Function3c5b4: ; 3c5b4
|
||||
CompareMovePriority: ; 3c5b4
|
||||
; Compare the priority of the player and enemy's moves.
|
||||
; Return carry if the player goes first, or z if they match.
|
||||
|
||||
ld a, [CurPlayerMove]
|
||||
call GetMovePriority
|
||||
ld b, a
|
||||
@ -861,50 +864,57 @@ Function3c5b4: ; 3c5b4
|
||||
; 3c5c5
|
||||
|
||||
GetMovePriority: ; 3c5c5
|
||||
; Return the priority (0-3) of move a.
|
||||
|
||||
ld b, a
|
||||
|
||||
; Vital throw goes last.
|
||||
cp VITAL_THROW
|
||||
ld a, 0
|
||||
ret z
|
||||
call Function3c5ec
|
||||
ld hl, .data_3c5df
|
||||
|
||||
call GetMoveEffect
|
||||
ld hl, MoveEffectPriorities
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr z, .asm_3c5dd
|
||||
jr z, .done
|
||||
inc hl
|
||||
cp $ff
|
||||
cp -1
|
||||
jr nz, .loop
|
||||
|
||||
ld a, 1
|
||||
ret
|
||||
|
||||
.asm_3c5dd
|
||||
.done
|
||||
ld a, [hl]
|
||||
ret
|
||||
; 3c5df
|
||||
|
||||
.data_3c5df
|
||||
MoveEffectPriorities: ; 3c5df
|
||||
db EFFECT_PROTECT, 3
|
||||
db EFFECT_ENDURE, 3
|
||||
db EFFECT_PRIORITY_HIT, 2
|
||||
db EFFECT_WHIRLWIND, 0
|
||||
db EFFECT_COUNTER, 0
|
||||
db EFFECT_MIRROR_COAT, 0
|
||||
db $ff
|
||||
db -1
|
||||
; 3c5ec
|
||||
|
||||
|
||||
Function3c5ec: ; 3c5ec
|
||||
GetMoveEffect: ; 3c5ec
|
||||
ld a, b
|
||||
dec a
|
||||
ld hl, $5afc
|
||||
ld bc, $0007
|
||||
ld hl, Moves + MOVE_EFFECT
|
||||
ld bc, Move2 - Move1
|
||||
call AddNTimes
|
||||
ld a, $10
|
||||
ld a, BANK(Moves)
|
||||
call GetFarByte
|
||||
ld b, a
|
||||
ret
|
||||
; 3c5fe
|
||||
|
||||
|
||||
Function3c5fe: ; 3c5fe
|
||||
call Function309d
|
||||
call Function3c543
|
||||
@ -3399,11 +3409,11 @@ Function3d5d7: ; 3d5d7
|
||||
push de
|
||||
push bc
|
||||
dec a
|
||||
ld hl, $5afb
|
||||
ld bc, $0007
|
||||
ld hl, Moves + MOVE_ANIM
|
||||
ld bc, Move2 - Move1
|
||||
call AddNTimes
|
||||
ld de, EnemyMoveAnimation
|
||||
ld a, $10
|
||||
ld a, BANK(Moves)
|
||||
call FarCopyBytes
|
||||
call SetEnemyTurn
|
||||
callab Function0x347c8
|
||||
@ -4282,7 +4292,7 @@ Function3dc5b: ; 3dc5b
|
||||
ld a, $10
|
||||
call GetBattleVar
|
||||
ld b, a
|
||||
call Function3c5ec
|
||||
call GetMoveEffect
|
||||
ld a, b
|
||||
cp $80
|
||||
jr nz, .asm_3dce4
|
||||
|
@ -4469,7 +4469,7 @@ BattleCommand40: ; 35813
|
||||
ret z
|
||||
ld b, a
|
||||
|
||||
callab Function3c5ec
|
||||
callab GetMoveEffect
|
||||
|
||||
ld a, b
|
||||
cp $59
|
||||
@ -5095,7 +5095,7 @@ BattleCommand48: ; 35b33
|
||||
push bc
|
||||
|
||||
ld b, a
|
||||
callab Function3c5ec
|
||||
callab GetMoveEffect
|
||||
ld a, b
|
||||
|
||||
pop bc
|
||||
@ -10181,7 +10181,7 @@ BattleCommand9a: ; 37c95
|
||||
and a
|
||||
ret z
|
||||
ld b, a
|
||||
callab Function3c5ec
|
||||
callab GetMoveEffect
|
||||
ld a, b
|
||||
cp $90
|
||||
ret z
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -141,16 +141,16 @@ EFFECT_MIRROR_MOVE EQU $09
|
||||
EFFECT_ATTACK_UP EQU $0a
|
||||
EFFECT_DEFENSE_UP EQU $0b
|
||||
EFFECT_SPEED_UP EQU $0c
|
||||
EFFECT_SP_ATTACK_UP EQU $0d
|
||||
EFFECT_SP_DEFENSE_UP EQU $0e
|
||||
EFFECT_SP_ATK_UP EQU $0d
|
||||
EFFECT_SP_DEF_UP EQU $0e
|
||||
EFFECT_ACCURACY_UP EQU $0f
|
||||
EFFECT_EVASION_UP EQU $10
|
||||
EFFECT_ALWAYS_HIT EQU $11
|
||||
EFFECT_ATTACK_DOWN EQU $12
|
||||
EFFECT_DEFENSE_DOWN EQU $13
|
||||
EFFECT_SPEED_DOWN EQU $14
|
||||
EFFECT_SP_ATTACK_DOWN EQU $15
|
||||
EFFECT_SP_DEFENSE_DOWN EQU $16
|
||||
EFFECT_SP_ATK_DOWN EQU $15
|
||||
EFFECT_SP_DEF_DOWN EQU $16
|
||||
EFFECT_ACCURACY_DOWN EQU $17
|
||||
EFFECT_EVASION_DOWN EQU $18
|
||||
EFFECT_HAZE EQU $19
|
||||
@ -181,16 +181,16 @@ EFFECT_CONFUSE EQU $31
|
||||
EFFECT_ATTACK_UP_2 EQU $32
|
||||
EFFECT_DEFENSE_UP_2 EQU $33
|
||||
EFFECT_SPEED_UP_2 EQU $34
|
||||
EFFECT_SP_ATTACK_UP_2 EQU $35
|
||||
EFFECT_SP_DEFENSE_UP_2 EQU $36
|
||||
EFFECT_SP_ATK_UP_2 EQU $35
|
||||
EFFECT_SP_DEF_UP_2 EQU $36
|
||||
EFFECT_ACCURACY_UP_2 EQU $37
|
||||
EFFECT_EVASION_UP_2 EQU $38
|
||||
EFFECT_TRANSFORM EQU $39
|
||||
EFFECT_ATTACK_DOWN_2 EQU $3a
|
||||
EFFECT_DEFENSE_DOWN_2 EQU $3b
|
||||
EFFECT_SPEED_DOWN_2 EQU $3c
|
||||
EFFECT_SP_ATTACK_DOWN_2 EQU $3d
|
||||
EFFECT_SP_DEFENSE_DOWN_2 EQU $3e
|
||||
EFFECT_SP_ATK_DOWN_2 EQU $3d
|
||||
EFFECT_SP_DEF_DOWN_2 EQU $3e
|
||||
EFFECT_ACCURACY_DOWN_2 EQU $3f
|
||||
EFFECT_EVASION_DOWN_2 EQU $40
|
||||
EFFECT_REFLECT EQU $41
|
||||
@ -199,8 +199,8 @@ EFFECT_PARALYZE EQU $43
|
||||
EFFECT_ATTACK_DOWN_HIT EQU $44
|
||||
EFFECT_DEFENSE_DOWN_HIT EQU $45
|
||||
EFFECT_SPEED_DOWN_HIT EQU $46
|
||||
EFFECT_SP_ATTACK_DOWN_HIT EQU $47
|
||||
EFFECT_SP_DEFENSE_DOWN_HIT EQU $48
|
||||
EFFECT_SP_ATK_DOWN_HIT EQU $47
|
||||
EFFECT_SP_DEF_DOWN_HIT EQU $48
|
||||
EFFECT_ACCURACY_DOWN_HIT EQU $49
|
||||
EFFECT_EVASION_DOWN_HIT EQU $4a
|
||||
EFFECT_SKY_ATTACK EQU $4b
|
||||
|
13
main.asm
13
main.asm
@ -12183,11 +12183,11 @@ FillPP: ; da6d
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld hl, $5afb
|
||||
ld bc, $0007
|
||||
ld hl, Moves
|
||||
ld bc, Move2 - Move1
|
||||
call AddNTimes
|
||||
ld de, StringBuffer1
|
||||
ld a, $10
|
||||
ld a, BANK(Moves)
|
||||
call FarCopyBytes
|
||||
pop bc
|
||||
pop de
|
||||
@ -19254,10 +19254,10 @@ Function13256: ; 13256
|
||||
call Predef
|
||||
ld a, [CurSpecies]
|
||||
dec a
|
||||
ld hl, $5afd
|
||||
ld bc, $0007
|
||||
ld hl, Moves + MOVE_POWER
|
||||
ld bc, Move2 - Move1
|
||||
call AddNTimes
|
||||
ld a, $10
|
||||
ld a, BANK(Moves)
|
||||
call GetFarByte
|
||||
ld hl, $c5a0
|
||||
cp $2
|
||||
@ -40129,7 +40129,6 @@ Function41af7: ; 41af7
|
||||
; 41afb
|
||||
|
||||
|
||||
Moves: ; 0x41afb
|
||||
INCLUDE "battle/moves/moves.asm"
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user