mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
Eviolite
This commit is contained in:
parent
1fc89941ac
commit
3d1b546e05
@ -3618,7 +3618,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus;
|
||||
gBattleScripting.battler = gActiveBattler = gAbilityBattler = battler;
|
||||
gBattleScripting.battler = gActiveBattler = gBattlerAbility = battler;
|
||||
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
return effect;
|
||||
@ -5775,6 +5775,18 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
|
||||
return ApplyModifier(modifier, atkStat);
|
||||
}
|
||||
|
||||
static bool32 CanEvolve(u32 species)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < EVOS_PER_MON; i++)
|
||||
{
|
||||
if (gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 isCrit)
|
||||
{
|
||||
bool32 usesDefStat;
|
||||
@ -5867,7 +5879,8 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
|
||||
MulModifier(&modifier, UQ_4_12(2.0));
|
||||
break;
|
||||
case HOLD_EFFECT_EVIOLITE:
|
||||
// todo
|
||||
if (CanEvolve(gBattleMons[battlerDef].species))
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
case HOLD_EFFECT_ASSAULT_VEST:
|
||||
if (!usesDefStat)
|
||||
|
Loading…
Reference in New Issue
Block a user