shithub: pokered

Download patch

ref: e6499cd505754008f219a2f038245062d6291181
parent: 61aaa15205d7a36a3f00cc16f893aa62a3a5bee9
author: xCrystal <rgr.crystal@gmail.com>
date: Tue Jan 20 15:34:56 EST 2015

some constants in stat up/down effects

--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -7503,10 +7503,10 @@
 	ld de, W_ENEMYMOVEEFFECT
 .statModifierUpEffect
 	ld a, [de]
-	sub $a
+	sub ATTACK_UP1_EFFECT 
 	cp $8
 	jr c, .incrementStatMod
-	sub $28 ; map +2 effects to equivalent +1 effect
+	sub ATTACK_UP2_EFFECT - ATTACK_UP1_EFFECT ; map +2 effects to equivalent +1 effect
 .incrementStatMod
 	ld c, a
 	ld b, $0
@@ -7517,7 +7517,7 @@
 	cp b ; can't raise stat past +6 ($d or 13)
 	jp c, Func_3f522
 	ld a, [de]
-	cp $12 ; is it a +2 effect?
+	cp ATTACK_UP1_EFFECT + $8 ; is it a +2 effect?
 	jr c, .ok
 	inc b ; if so, increment stat mod again
 	ld a, $d
@@ -7721,10 +7721,10 @@
 	bit 6, a ; fly/dig
 	jp nz, MoveMissed
 	ld a, [de]
-	sub $12
+	sub ATTACK_DOWN1_EFFECT 
 	cp $8
 	jr c, .decrementStatMod
-	sub $28 ; map +2 effects to corresponding +1 effect
+	sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map +2 effects to corresponding +1 effect
 .decrementStatMod
 	ld c, a
 	ld b, $0