mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-20 12:38:33 +01:00
PRAISE CAM FOR HE IS CHAMP
This commit is contained in:
parent
558133bba0
commit
f2052e5d8f
@ -107,8 +107,8 @@ void sub_817C95C(u16 stringId)
|
|||||||
struct Pokemon *atkMon, *defMon;
|
struct Pokemon *atkMon, *defMon;
|
||||||
u8 moveSlot;
|
u8 moveSlot;
|
||||||
u32 atkFlank, defFlank, effFlank;
|
u32 atkFlank, defFlank, effFlank;
|
||||||
|
u8 *perishCount;
|
||||||
register void *var1 asm("r1"), *var2 asm("r2");
|
u16 *statStringId, *finishedMoveId;
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) && stringId != STRINGID_ITDOESNTAFFECT && stringId != STRINGID_NOTVERYEFFECTIVE)
|
if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) && stringId != STRINGID_ITDOESNTAFFECT && stringId != STRINGID_NOTVERYEFFECTIVE)
|
||||||
return;
|
return;
|
||||||
@ -138,6 +138,10 @@ void sub_817C95C(u16 stringId)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
perishCount = (u8 *)(gBattleTextBuff1 + 4);
|
||||||
|
statStringId = (u16 *)(gBattleTextBuff2 + 2);
|
||||||
|
finishedMoveId = (u16 *)(gBattleTextBuff1 + 2);
|
||||||
|
|
||||||
atkFlank = GetBattlerPosition(gBattlerAttacker) / 2;
|
atkFlank = GetBattlerPosition(gBattlerAttacker) / 2;
|
||||||
defFlank = GetBattlerPosition(gBattlerTarget) / 2;
|
defFlank = GetBattlerPosition(gBattlerTarget) / 2;
|
||||||
effFlank = GetBattlerPosition(gEffectBattler) / 2;
|
effFlank = GetBattlerPosition(gEffectBattler) / 2;
|
||||||
@ -171,8 +175,7 @@ void sub_817C95C(u16 stringId)
|
|||||||
structPtr->side[atkSide].field_4_1 = 1;
|
structPtr->side[atkSide].field_4_1 = 1;
|
||||||
break;
|
break;
|
||||||
case STRINGID_PKMNPERISHCOUNTFELL:
|
case STRINGID_PKMNPERISHCOUNTFELL:
|
||||||
var1 = gBattleTextBuff1 + 4;
|
if (*perishCount == 0)
|
||||||
if (*(u8*)(var1) == 0)
|
|
||||||
structPtr->side[atkSide].field_3_0 = 10;
|
structPtr->side[atkSide].field_3_0 = 10;
|
||||||
break;
|
break;
|
||||||
case STRINGID_PKMNWISHCAMETRUE:
|
case STRINGID_PKMNWISHCAMETRUE:
|
||||||
@ -228,8 +231,7 @@ void sub_817C95C(u16 stringId)
|
|||||||
case STRINGID_PKMNSSTATCHANGED:
|
case STRINGID_PKMNSSTATCHANGED:
|
||||||
if (gBattleTextBuff1[2] != 0)
|
if (gBattleTextBuff1[2] != 0)
|
||||||
{
|
{
|
||||||
var1 = gBattleTextBuff2 + 2;
|
if (*statStringId == STRINGID_STATSHARPLY)
|
||||||
if (*(u16*)(var1) == STRINGID_STATSHARPLY)
|
|
||||||
sub_817E684(0x17, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
sub_817E684(0x17, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||||
else
|
else
|
||||||
sub_817E684(0x16, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
sub_817E684(0x16, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||||
@ -240,8 +242,7 @@ void sub_817C95C(u16 stringId)
|
|||||||
{
|
{
|
||||||
if (gBattlerAttacker == gBattlerTarget)
|
if (gBattlerAttacker == gBattlerTarget)
|
||||||
{
|
{
|
||||||
var1 = gBattleTextBuff2 + 2;
|
if (*statStringId == STRINGID_STATSHARPLY)
|
||||||
if (*(u16*)(var1) == STRINGID_STATSHARPLY)
|
|
||||||
sub_817E684(0x17, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
sub_817E684(0x17, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||||
else
|
else
|
||||||
sub_817E684(0x16, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
sub_817E684(0x16, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||||
@ -259,8 +260,7 @@ void sub_817C95C(u16 stringId)
|
|||||||
case STRINGID_PKMNSSTATCHANGED4:
|
case STRINGID_PKMNSSTATCHANGED4:
|
||||||
if (gBattleTextBuff1[2] != 0)
|
if (gBattleTextBuff1[2] != 0)
|
||||||
{
|
{
|
||||||
var1 = gBattleTextBuff2 + 2;
|
if (*statStringId == STRINGID_STATHARSHLY)
|
||||||
if (*(u16*)(var1) == STRINGID_STATHARSHLY)
|
|
||||||
sub_817E684(0x1A, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
sub_817E684(0x1A, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||||
else
|
else
|
||||||
sub_817E684(0x19, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
sub_817E684(0x19, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||||
@ -457,20 +457,17 @@ void sub_817C95C(u16 stringId)
|
|||||||
structPtr->side[atkSide].field_0_0c = moveSlot;
|
structPtr->side[atkSide].field_0_0c = moveSlot;
|
||||||
break;
|
break;
|
||||||
case STRINGID_PKMNSXWOREOFF:
|
case STRINGID_PKMNSXWOREOFF:
|
||||||
var1 = gBattleTextBuff1 + 2;
|
if (*finishedMoveId == MOVE_REFLECT)
|
||||||
if (*(u16*)(var1) == MOVE_REFLECT)
|
|
||||||
{
|
{
|
||||||
structPtr->side[atkSide].field_8_0_b = 0;
|
structPtr->side[atkSide].field_8_0_b = 0;
|
||||||
structPtr->side[atkSide].field_0_0b = 0;
|
structPtr->side[atkSide].field_0_0b = 0;
|
||||||
}
|
}
|
||||||
var2 = gBattleTextBuff1 + 2;
|
if (*finishedMoveId == MOVE_LIGHT_SCREEN)
|
||||||
if (*(u16*)(var2) == MOVE_LIGHT_SCREEN)
|
|
||||||
{
|
{
|
||||||
structPtr->side[atkSide].field_8_0_c = 0;
|
structPtr->side[atkSide].field_8_0_c = 0;
|
||||||
structPtr->side[atkSide].field_0_0c = 0;
|
structPtr->side[atkSide].field_0_0c = 0;
|
||||||
}
|
}
|
||||||
var1 = gBattleTextBuff1 + 2;
|
if (*finishedMoveId == MOVE_MIST)
|
||||||
if (*(u16*)(var1) == MOVE_MIST)
|
|
||||||
{
|
{
|
||||||
structPtr->side[atkSide].field_8_0_e = 0;
|
structPtr->side[atkSide].field_8_0_e = 0;
|
||||||
structPtr->side[atkSide].field_0_0e = 0;
|
structPtr->side[atkSide].field_0_0e = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user