summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2014-10-21 14:17:55 +0200
committerxCrystal <rgr.crystal@gmail.com>2014-10-21 14:17:55 +0200
commit28097be25ca8054476c6f377ba23d41d79b4c409 (patch)
tree585b11bb70da175275c15a1350f294d81af205f7
parentdf2d027501512bd6311f8d44c21b687e3d1b1f21 (diff)
Add commentary to some AI layers
-rw-r--r--battle/ai/scoring.asm19
1 files changed, 14 insertions, 5 deletions
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm
index 79afdcd68..d495b9808 100644
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -424,7 +424,7 @@ AIScoring_LeechHit: ; 387f7
; Do nothing if effectiveness is neutral
ret z
-; Do nothing if the enemy's health is full
+; Do nothing if enemy's HP is full
call AICheckEnemyMaxHP
ret c
@@ -565,15 +565,15 @@ AIScoring_Explosion: ; 388a6
jr nz, .asm_388c6
.asm_388b7
-; Greatly discourage this move if enemy's health is higher than 50%
+; Greatly discourage this move if enemy's HP is above 50%
call AICheckEnemyHalfHP
jr c, .asm_388c6
-; Do nothing if enemy's health is not higher than 25%
+; Do nothing if enemy's HP is below 25%
call AICheckEnemyQuarterHP
ret nc
-; If enemy's health is in-between 25% and 50%
+; If enemy's HP is between 25% and 50%,
; over 90% chance to greatly discourage this move
call Random
cp 20
@@ -689,13 +689,17 @@ AIScoring_EvasionUp: ; 388d4
AIScoring_AlwaysHit: ; 38947
+; 80% chance to greatly encourage this move if either...
+
+; ...enemy's accuracy level has been lowered three or more stages
ld a, [EnemyAccLevel]
cp $5
jr c, .asm_38954
+; ...or player's evasion level has been rasied three or more stages
ld a, [PlayerEvaLevel]
cp $a
- ret c
+ ret c
.asm_38954
call Function39521
@@ -866,6 +870,8 @@ AIScoring_Haze: ; 389f5
AIScoring_Bide: ; 38a1e
+; 90% chance to discourage this move unless enemy's HP is full
+
call AICheckEnemyMaxHP
ret c
call Random
@@ -911,6 +917,8 @@ AIScoring_Moonlight: ; 38a3a
AIScoring_Toxic:
AIScoring_LeechSeed: ; 38a4e
+; Discourage this move if player's HP is below 50%
+
call AICheckPlayerHalfHP
ret c
inc [hl]
@@ -920,6 +928,7 @@ AIScoring_LeechSeed: ; 38a4e
AIScoring_LightScreen:
AIScoring_Reflect: ; 38a54
+; Over 90% chance to discourage this move unless enemy's HP is full
call AICheckEnemyMaxHP
ret c
call Random