this function is driving me insane
This commit is contained in:
parent
e2f5e73445
commit
7669a94f0d
1 changed files with 15 additions and 13 deletions
|
@ -1466,10 +1466,9 @@ s32 sub_818FEB4(s32 *arr, bool8 arg1)
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
s32 sub_818FFC0(s32 move, s32 species, s32 arg2)
|
s32 sub_818FFC0(s32 move, s32 species, s32 arg2)
|
||||||
{
|
{
|
||||||
u8 type1, type2, ability, moveType;
|
s32 type1, type2, ability, moveType;
|
||||||
s32 i = 0;
|
s32 i = 0;
|
||||||
s32 typePower = 20;
|
s32 typePower = 20;
|
||||||
|
|
||||||
|
@ -1488,24 +1487,27 @@ s32 sub_818FFC0(s32 move, s32 species, s32 arg2)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
|
while (gTypeEffectiveness[i + 0] != TYPE_ENDTABLE)
|
||||||
{
|
{
|
||||||
if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
|
if (gTypeEffectiveness[i + 0] == TYPE_FORESIGHT)
|
||||||
{
|
{
|
||||||
i += 3;
|
i += 3;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
else if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
|
else
|
||||||
|
{
|
||||||
|
u8 val = gTypeEffectiveness[i + 0];
|
||||||
|
if (val == moveType)
|
||||||
{
|
{
|
||||||
// BUG: * 2 is not necessary and makes the condition always false if the ability is wonder guard.
|
// BUG: * 2 is not necessary and makes the condition always false if the ability is wonder guard.
|
||||||
if (TYPE_EFFECT_DEF_TYPE(i) == type1 && (ability != ABILITY_WONDER_GUARD || TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE * 2))
|
if (gTypeEffectiveness[i + 1] == type1 && (ability != ABILITY_WONDER_GUARD || gTypeEffectiveness[i + 2] == TYPE_MUL_SUPER_EFFECTIVE * 2))
|
||||||
typePower = (TYPE_EFFECT_MULTIPLIER(i) * typePower) / 10;
|
typePower = (gTypeEffectiveness[i + 2] * typePower) / 10;
|
||||||
if (TYPE_EFFECT_DEF_TYPE(i) == type2 && type1 != type2 && (ability != ABILITY_WONDER_GUARD || TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE * 2))
|
if (gTypeEffectiveness[i + 1] == type2 && type1 != type2 && (ability != ABILITY_WONDER_GUARD || gTypeEffectiveness[i + 2] == TYPE_MUL_SUPER_EFFECTIVE * 2))
|
||||||
typePower = (TYPE_EFFECT_MULTIPLIER(i) * typePower) / 10;
|
typePower = (gTypeEffectiveness[i + 2] * typePower) / 10;
|
||||||
}
|
}
|
||||||
i += 3;
|
i += 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (arg2)
|
switch (arg2)
|
||||||
{
|
{
|
||||||
|
@ -1580,4 +1582,4 @@ s32 sub_818FFC0(s32 move, s32 species, s32 arg2)
|
||||||
}
|
}
|
||||||
|
|
||||||
return typePower;
|
return typePower;
|
||||||
}*/
|
}
|
||||||
|
|
Loading…
Reference in a new issue