mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
[ai] use expected value to simulate EFFECT_PSYWAVE
This commit is contained in:
parent
0ee13418dc
commit
303e31ae25
@ -737,6 +737,8 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
switch (gBattleMoves[move].effect)
|
||||
{
|
||||
case EFFECT_LEVEL_DAMAGE:
|
||||
case EFFECT_PSYWAVE:
|
||||
//psywave's expected damage is equal to the user's level
|
||||
dmg = gBattleMons[battlerAtk].level;
|
||||
break;
|
||||
case EFFECT_DRAGON_RAGE:
|
||||
@ -745,16 +747,6 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
case EFFECT_SONICBOOM:
|
||||
dmg = 20;
|
||||
break;
|
||||
case EFFECT_PSYWAVE:
|
||||
{
|
||||
u32 randDamage;
|
||||
if (B_PSYWAVE_DMG >= GEN_6)
|
||||
randDamage = (Random() % 101);
|
||||
else
|
||||
randDamage = (Random() % 11) * 10;
|
||||
dmg = gBattleMons[battlerAtk].level * (randDamage + 50) / 100;
|
||||
}
|
||||
break;
|
||||
//case EFFECT_METAL_BURST:
|
||||
//case EFFECT_COUNTER:
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user