Fix merge conflicts
This commit is contained in:
@@ -385,9 +385,9 @@ CantMove: ; 341f0
|
||||
|
||||
|
||||
Function34216: ; 34216
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call CantMove
|
||||
jp SwitchTurn
|
||||
jp BattleCommand_SwitchTurn
|
||||
; 3421f
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ CheckEnemyTurn: ; 3421f
|
||||
ld hl, HurtItselfText
|
||||
call StdBattleTextBox
|
||||
call Function355dd
|
||||
call BattleCommand62
|
||||
call BattleCommand_DamageCalcWithStats
|
||||
call BattleCommand0a
|
||||
xor a
|
||||
ld [wcfca], a
|
||||
@@ -652,7 +652,7 @@ HitConfusion: ; 343a5
|
||||
ld [CriticalHit], a
|
||||
|
||||
call Function355dd
|
||||
call BattleCommand62
|
||||
call BattleCommand_DamageCalcWithStats
|
||||
call BattleCommand0a
|
||||
|
||||
xor a
|
||||
@@ -1336,8 +1336,8 @@ BattleCommand4f: ; 346cd
|
||||
; 346d2
|
||||
|
||||
|
||||
BattleCommand07: ; 346d2
|
||||
; stab
|
||||
BattleCommand_CalcDamageTypeMultiplier: ; 346d2
|
||||
; STAB = Same Type Attack Bonus
|
||||
ld a, BATTLE_VARS_MOVE_ANIM
|
||||
call GetBattleVar
|
||||
cp STRUGGLE
|
||||
@@ -1354,7 +1354,7 @@ BattleCommand07: ; 346d2
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .go
|
||||
jr z, .go ; Who Attacks and who Defends
|
||||
|
||||
ld hl, EnemyMonType1
|
||||
ld a, [hli]
|
||||
@@ -1512,7 +1512,7 @@ endr
|
||||
jr .TypesLoop
|
||||
|
||||
.end
|
||||
call Function347c8
|
||||
call HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
|
||||
ld a, [wd265]
|
||||
ld b, a
|
||||
ld a, [TypeModifier]
|
||||
@@ -1523,7 +1523,7 @@ endr
|
||||
; 347c8
|
||||
|
||||
|
||||
Function347c8: ; 347c8
|
||||
HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn: ; 347c8
|
||||
ld hl, EnemyMonType1
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
@@ -1601,7 +1601,7 @@ Function347d3: ; 347d3
|
||||
|
||||
|
||||
BattleCommanda3: ; 34833
|
||||
call Function347c8
|
||||
call HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
|
||||
ld a, [wd265]
|
||||
and a
|
||||
ld a, 10 ; 1.0
|
||||
@@ -2874,8 +2874,7 @@ BattleCommand91_92: ; 34feb
|
||||
; 34ffd
|
||||
|
||||
|
||||
SwitchTurn: ; 34ffd
|
||||
BattleCommand93: ; 34ffd
|
||||
BattleCommand_SwitchTurn: ; 34ffd
|
||||
; switchturn
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
@@ -3248,7 +3247,7 @@ BattleCommand11: ; 351c0
|
||||
predef Functionc6e0
|
||||
call RefreshBattleHuds
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
xor a
|
||||
ld [wcfca], a
|
||||
ld [FXAnimIDHi], a
|
||||
@@ -3256,7 +3255,7 @@ BattleCommand11: ; 351c0
|
||||
ld [wc689], a
|
||||
ld a, $c2
|
||||
call Function37e44
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
jr .asm_3524d ; 3522f $1c
|
||||
|
||||
@@ -3307,10 +3306,10 @@ BattleCommand12: ; 35250
|
||||
ret z
|
||||
ld [de], a
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
ld hl, RageBuildingText
|
||||
call StdBattleTextBox
|
||||
jp SwitchTurn
|
||||
jp BattleCommand_SwitchTurn
|
||||
; 3527b
|
||||
|
||||
|
||||
@@ -3934,6 +3933,7 @@ BattleCommanda8: ; 355b5
|
||||
ld a, [wc72d]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
jp PrintButItFailed
|
||||
; 355bd
|
||||
|
||||
@@ -3954,14 +3954,14 @@ Function355bd: ; 355bd
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ret
|
||||
; 355d5
|
||||
|
||||
|
||||
BattleCommanda9: ; 355d5
|
||||
BattleCommand_IfAttackMissedResetDamage: ; 355d5
|
||||
; clearmissdamage
|
||||
ld a, [AttackMissed]
|
||||
and a
|
||||
ret z
|
||||
|
||||
jp ResetDamage
|
||||
; 355dd
|
||||
|
||||
@@ -4004,7 +4004,7 @@ endr
|
||||
; 35612
|
||||
|
||||
|
||||
BattleCommand62: ; 35612
|
||||
BattleCommand_DamageCalcWithStats: ; 35612
|
||||
; damagecalc
|
||||
|
||||
; Return a damage value for move power d, player level e, enemy defense c and player attack b.
|
||||
@@ -4138,12 +4138,12 @@ endr
|
||||
; Update CurDamage (capped at 997).
|
||||
ld hl, CurDamage
|
||||
ld b, [hl]
|
||||
ld a, [$ffb6]
|
||||
ld a, [hQuotient + 2]
|
||||
add b
|
||||
ld [$ffb6], a
|
||||
jr nc, .asm_356a5
|
||||
|
||||
ld a, [$ffb5]
|
||||
ld a, [hQuotient + 1]
|
||||
inc a
|
||||
ld [$ffb5], a
|
||||
and a
|
||||
@@ -4397,22 +4397,22 @@ BattleCommand3f: ; 35726
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
ld a, [hl]
|
||||
jr nz, .asm_357f8
|
||||
jr nz, .notPlayersTurn
|
||||
|
||||
ld hl, wPlayerMoveStruct + MOVE_POWER
|
||||
ld [hl], a
|
||||
push hl
|
||||
call PlayerAttackDamage
|
||||
jr .asm_35800
|
||||
jr .notEnemysTurn
|
||||
|
||||
.asm_357f8
|
||||
.notPlayersTurn
|
||||
ld hl, wEnemyMoveStruct + MOVE_POWER
|
||||
ld [hl], a
|
||||
push hl
|
||||
call EnemyAttackDamage
|
||||
|
||||
.asm_35800
|
||||
call BattleCommand62
|
||||
.notEnemysTurn
|
||||
call BattleCommand_DamageCalcWithStats
|
||||
pop hl
|
||||
ld [hl], 1
|
||||
ret
|
||||
@@ -4754,7 +4754,7 @@ BattleCommand44: ; 359e6
|
||||
cp CURSE_T
|
||||
jr z, .asm_35a50
|
||||
call AnimateCurrentMove
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
.asm_35a13
|
||||
call BattleRandom
|
||||
@@ -4775,7 +4775,7 @@ BattleCommand44: ; 359e6
|
||||
push hl
|
||||
ld a, d
|
||||
ld [hl], a
|
||||
call Function347c8
|
||||
call HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
|
||||
pop hl
|
||||
pop af
|
||||
ld [hl], a
|
||||
@@ -4783,7 +4783,7 @@ BattleCommand44: ; 359e6
|
||||
ld a, [wd265]
|
||||
cp $a
|
||||
jr nc, .asm_35a13
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
ld a, [hl]
|
||||
ld [wd265], a
|
||||
@@ -5457,13 +5457,13 @@ Function35de0: ; 35de0
|
||||
ld hl, SubFadedText
|
||||
call StdBattleTextBox
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call BattleCommanda7
|
||||
ld a, BATTLE_VARS_SUBSTATUS3
|
||||
call GetBattleVar
|
||||
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
|
||||
call z, Function37ec7
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||
call GetBattleVarAddr
|
||||
@@ -6539,15 +6539,15 @@ Function3641a: ; 3641a
|
||||
and a
|
||||
jr z, .Player
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call Function365d7
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
jr .end
|
||||
|
||||
.Player
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call Function365fd
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
.end
|
||||
ld a, 1
|
||||
and a
|
||||
@@ -6828,7 +6828,7 @@ Function365d7: ; 365d7
|
||||
ld hl, BadgeStatBoosts
|
||||
call CallBattleCore
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
ld hl, Function3ec39
|
||||
call CallBattleCore
|
||||
@@ -6836,7 +6836,7 @@ Function365d7: ; 365d7
|
||||
ld hl, Function3ec76
|
||||
call CallBattleCore
|
||||
|
||||
jp SwitchTurn
|
||||
jp BattleCommand_SwitchTurn
|
||||
; 365fd
|
||||
|
||||
|
||||
@@ -6848,7 +6848,7 @@ Function365fd: ; 365fd
|
||||
ld a, $5
|
||||
call Function3661d
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
ld hl, Function3ec39
|
||||
call CallBattleCore
|
||||
@@ -6856,7 +6856,7 @@ Function365fd: ; 365fd
|
||||
ld hl, Function3ec76
|
||||
call CallBattleCore
|
||||
|
||||
jp SwitchTurn
|
||||
jp BattleCommand_SwitchTurn
|
||||
; 3661d
|
||||
|
||||
|
||||
@@ -7056,10 +7056,10 @@ BattleCommand3e: ; 3671a
|
||||
ld [de], a
|
||||
jr nz, .asm_3674c ; 36730 $1a
|
||||
res 1, [hl]
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call Function37962
|
||||
push af
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
pop af
|
||||
jr nz, .asm_3674c ; 3673f $b
|
||||
set 7, [hl]
|
||||
@@ -7202,7 +7202,7 @@ BattleCommand23: ; 3680f
|
||||
ld a, [BattleType]
|
||||
cp BATTLETYPE_SHINY
|
||||
jp z, .asm_36969
|
||||
cp $9
|
||||
cp BATTLETYPE_TRAP
|
||||
jp z, .asm_36969
|
||||
cp BATTLETYPE_CELEBI
|
||||
jp z, .asm_36969
|
||||
@@ -8823,10 +8823,10 @@ BattleCommand2c: ; 3713e
|
||||
call CallBattleCore
|
||||
.asm_371a9
|
||||
call AnimateCurrentMove
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
ld hl, Function3ccef
|
||||
call CallBattleCore
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call UpdateUserInParty
|
||||
call RefreshBattleHuds
|
||||
ld hl, RegainedHealthText
|
||||
@@ -9500,7 +9500,7 @@ BattleCommand61: ; 37874
|
||||
push de
|
||||
.asm_3787d
|
||||
|
||||
call BattleCommand07
|
||||
call BattleCommand_CalcDamageTypeMultiplier
|
||||
|
||||
ld a, [wLinkMode]
|
||||
cp $3
|
||||
@@ -9544,7 +9544,7 @@ BattleCommand61: ; 37874
|
||||
ld a, $3
|
||||
ld [wc689], a
|
||||
call AnimateCurrentMove
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
ld hl, AICheckPlayerMaxHP
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
@@ -9557,18 +9557,18 @@ BattleCommand61: ; 37874
|
||||
|
||||
ld hl, GetQuarterMaxHP
|
||||
call CallBattleCore
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
ld hl, Function3ccef
|
||||
call CallBattleCore
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
ld hl, RegainedHealthText
|
||||
call StdBattleTextBox
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call UpdateOpponentInParty
|
||||
jr .asm_37904 ; 378f1 $11
|
||||
|
||||
.asm_378f3
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call Function37ed5
|
||||
jr nc, .asm_37904 ; 378f9 $9
|
||||
call AnimateFailedMove
|
||||
@@ -9733,7 +9733,7 @@ BattleCommand67: ; 379c9
|
||||
call DelayFrames
|
||||
|
||||
; Transition into switchmon menu
|
||||
call Function1d6e
|
||||
call LoadMenuDataHeader_0x1d75
|
||||
callba Function3d2f7
|
||||
|
||||
callba ForcePickSwitchMonInBattle
|
||||
@@ -9748,7 +9748,7 @@ BattleCommand67: ; 379c9
|
||||
call ClearBox
|
||||
ld b, 1
|
||||
call GetSGBLayout
|
||||
call Function32f9
|
||||
call SetPalettes
|
||||
call BatonPass_LinkPlayerSwitch
|
||||
|
||||
; Mobile link battles handle entrances differently
|
||||
@@ -9789,7 +9789,7 @@ BattleCommand67: ; 379c9
|
||||
call CallBattleCore
|
||||
ld a, 1
|
||||
ld [wd265], a
|
||||
ld hl, Function3ecab
|
||||
ld hl, ApplyStatLevelMultiplierOnAllStats
|
||||
call CallBattleCore
|
||||
|
||||
ld hl, SpikesDamage
|
||||
@@ -9807,7 +9807,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
||||
ld a, 1
|
||||
ld [wd0ec], a
|
||||
|
||||
call Function1d6e
|
||||
call LoadMenuDataHeader_0x1d75
|
||||
ld hl, Function3e8e4
|
||||
call CallBattleCore
|
||||
call WriteBackup
|
||||
@@ -9823,7 +9823,7 @@ BatonPass_LinkEnemySwitch: ; 37a82
|
||||
and a
|
||||
ret z
|
||||
|
||||
call Function1d6e
|
||||
call LoadMenuDataHeader_0x1d75
|
||||
ld hl, Function3e8e4
|
||||
call CallBattleCore
|
||||
|
||||
@@ -10094,11 +10094,11 @@ endr
|
||||
rst FarCall
|
||||
|
||||
call AnimateCurrentMove
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
callab Function3ccef
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
call UpdateUserInParty
|
||||
|
||||
; 'regained health!'
|
||||
@@ -10596,11 +10596,11 @@ Function37e54: ; 37e54
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
|
||||
callab PlayBattleAnim
|
||||
|
||||
call SwitchTurn
|
||||
call BattleCommand_SwitchTurn
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
Reference in New Issue
Block a user