Registrarse

[pokeruby] Implementando habilidades nuevas

chomp

Usuario de oro
Shiftry obtuvo una nueva habilidad en la Gen 9 llamada Wind Raider. Bloquea ataques de tipo Viento y aumenta su ataque físico en un nivel al ser golpeado por este ataque. He simplificado bastante la parte del bloqueo.

En btl_attrs.s, coloque la tabla de movimiento del viento directamente debajo de la tabla de movimiento del sonido.


gWindMovesTable::
.2byte MOVE_HEAT_WAVE
.2byte MOVE_BLIZZARD
.2byte MOVE_HURRICANE
.2byte MOVE_GUST
.2byte MOVE_FAIRY_WING
.2byte MOVE_AEROBLAST
.2byte MOVE_AIR_CUTTER
.2byte MOVE_ICY_WIND
.2byte MOVE_TWISTER
.2byte MOVE_WHIRLWIND
.2byte MOVE_PETAL_BLIZZARD
.2byte 0xFFFF


ahora en battle_util.c en el caso ABILITYEFFECT_MOVES_BLOCK

case ABILITYEFFECT_MOVES_BLOCK: // 2
if (gLastUsedAbility == ABILITY_SOUNDPROOF)
{
for (i = 0; gSoundMovesTable != 0xFFFF; i++)
{
if (gSoundMovesTable == move)
break;
}
if (gSoundMovesTable != 0xFFFF)
{
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
gHitMarker |= HITMARKER_NO_PPDEDUCT;
gBattlescriptCurrInstr = BattleScript_SoundproofProtected;
effect = 1;
}
}
break;

subistitua por
case ABILITYEFFECT_MOVES_BLOCK: // 2
if (gLastUsedAbility == ABILITY_SOUNDPROOF)
{
for (i = 0; gSoundMovesTable != 0xFFFF; i++)
{
if (gSoundMovesTable == move)
break;
}
if (gSoundMovesTable != 0xFFFF)
{
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
gHitMarker |= HITMARKER_NO_PPDEDUCT;
gBattlescriptCurrInstr = BattleScript_SoundproofProtected;
effect = 1;
}
}
else if (gLastUsedAbility == ABILITY_WIND_RIDER)
{
for (i = 0; gWindMovesTable != 0xFFFF; i++)
{
if (gWindMovesTable == move)
break;
}
if (gWindMovesTable != 0xFFFF)
{
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
gHitMarker |= HITMARKER_NO_PPDEDUCT;
gBattlescriptCurrInstr = BattleScript_SoundproofProtected;
effect = 1;
}
}
break;



Ah, sí, coloque la constante en la parte superior del archivo (estoy usando la ROM base de Pret) "extern const u16 gWindMovesTable[];"
 
Arriba