summaryrefslogtreecommitdiff
path: root/battle
diff options
context:
space:
mode:
authorsurskitty <surskitty@gmail.com>2017-12-13 19:55:03 -0500
committersurskitty <surskitty@gmail.com>2017-12-13 19:55:03 -0500
commit4b36a9d2e1d6b6ac823fbb14e8f0ba750b0eecc2 (patch)
treefcbbd0247503a200c4c1d8df690a676b49a09efd /battle
parente3ee39f3344107f666099448401d28b04c983cd6 (diff)
parenta6656a986bf9dde51561cab090648e0117b173ad (diff)
Merge branch 'master' of github.com:pret/pokecrystal
Diffstat (limited to 'battle')
-rw-r--r--battle/ai/items.asm6
-rw-r--r--battle/ai/scoring.asm3
-rw-r--r--battle/anim_commands.asm1
-rw-r--r--battle/core.asm6
-rw-r--r--battle/effect_commands.asm2
5 files changed, 13 insertions, 5 deletions
diff --git a/battle/ai/items.asm b/battle/ai/items.asm
index 5a292763e..5346bf8f2 100644
--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -749,7 +749,7 @@ TextJump_EnemyWithdrew: ; 384d0
Function384d5: ; This appears to be unused
call AIUsedItemSound
call AI_HealStatus
- ld a, X_SPEED
+ ld a, FULL_HEAL_RED ; X_SPEED
jp PrintText_UsedItemOn_AND_AIUpdateHUD
; 384e0
@@ -761,6 +761,10 @@ AI_HealStatus: ; 384e0
xor a
ld [hl], a
ld [EnemyMonStatus], a
+ ; Bug: this should reset SUBSTATUS_NIGHTMARE too
+ ; Uncomment the lines below to fix
+ ; ld hl, EnemySubStatus1
+ ; res SUBSTATUS_NIGHTMARE, [hl]
ld hl, EnemySubStatus5
res SUBSTATUS_TOXIC, [hl]
ret
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm
index 400cd0cb4..4e462656c 100644
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -1876,7 +1876,8 @@ AI_Smart_MeanLook: ; 38dfb
pop hl
jp z, AIDiscourageMove
-; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird).
+; 80% chance to greatly encourage this move if the enemy is badly poisoned (buggy).
+; Should check PlayerSubStatus5 instead.
ld a, [EnemySubStatus5]
bit SUBSTATUS_TOXIC, a
jr nz, .asm_38e26
diff --git a/battle/anim_commands.asm b/battle/anim_commands.asm
index fa0ae0a71..530f30d2b 100644
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -352,6 +352,7 @@ RunBattleAnimCommand: ; cc25f
BattleAnimCommands:: ; cc2a4 (33:42a4)
+; entries correspond to macros/move_anim.asm enumeration
dw BattleAnimCmd_Obj
dw BattleAnimCmd_1GFX
dw BattleAnimCmd_2GFX
diff --git a/battle/core.asm b/battle/core.asm
index 8c4ab73e4..bc8a37725 100644
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -5998,7 +5998,7 @@ CheckPlayerHasUsableMoves: ; 3e786
swap a
and $f
ld b, a
- ld d, $5
+ ld d, NUM_MOVES + 1
xor a
.loop
dec d
@@ -6011,7 +6011,9 @@ CheckPlayerHasUsableMoves: ; 3e786
jr .loop
.done
- and a ; This is probably a bug, and will result in a move with PP Up confusing the game.
+ ; Bug: this will result in a move with PP Up confusing the game.
+ ; Replace with "and $3f" to fix.
+ and a
ret nz
.force_struggle
diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm
index fdb078645..bcebbb6ca 100644
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -9810,7 +9810,7 @@ GetItemHeldEffect: ; 37dd0
dec a
ld c, a
ld b, 0
- ld a, Item2Attributes - Item1Attributes
+ ld a, ITEMATTR_STRUCT_LENGTH
call AddNTimes
ld a, BANK(ItemAttributes)
call GetFarHalfword