mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Burn Up And Purify
This commit is contained in:
parent
01b6b63e99
commit
34f5d9e2ae
@ -1688,6 +1688,11 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro losetype battler:req, type:req
|
||||||
|
various \battler, VARIOUS_LOSE_TYPE
|
||||||
|
.byte \type
|
||||||
|
.endm
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
||||||
|
@ -357,6 +357,55 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
|||||||
.4byte BattleScript_EffectBugBite
|
.4byte BattleScript_EffectBugBite
|
||||||
.4byte BattleScript_EffectStrengthSap
|
.4byte BattleScript_EffectStrengthSap
|
||||||
.4byte BattleScript_EffectMindBlown
|
.4byte BattleScript_EffectMindBlown
|
||||||
|
.4byte BattleScript_EffectPurify
|
||||||
|
.4byte BattleScript_EffectBurnUp
|
||||||
|
|
||||||
|
BattleScript_EffectBurnUp:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
jumpiftype BS_ATTACKER, TYPE_FIRE, BattleScript_BurnUpWorks
|
||||||
|
goto BattleScript_ButItFailed
|
||||||
|
BattleScript_BurnUpWorks:
|
||||||
|
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
|
||||||
|
critcalc
|
||||||
|
damagecalc
|
||||||
|
adjustdamage
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
effectivenesssound
|
||||||
|
hitanimation BS_TARGET
|
||||||
|
waitstate
|
||||||
|
healthbarupdate BS_TARGET
|
||||||
|
datahpupdate BS_TARGET
|
||||||
|
critmessage
|
||||||
|
waitmessage 0x40
|
||||||
|
resultmessage
|
||||||
|
waitmessage 0x40
|
||||||
|
losetype BS_ATTACKER, TYPE_FIRE
|
||||||
|
printstring STRINGID_ATTACKERLOSTFIRETYPE
|
||||||
|
waitmessage 0x40
|
||||||
|
tryfaintmon BS_TARGET, FALSE, NULL
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
|
BattleScript_EffectPurify:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||||
|
typecalc
|
||||||
|
jumpifmovehadnoeffect BattleScript_NotAffected
|
||||||
|
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_PurifyWorks
|
||||||
|
goto BattleScript_ButItFailed
|
||||||
|
BattleScript_PurifyWorks:
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
curestatus BS_TARGET
|
||||||
|
updatestatusicon BS_TARGET
|
||||||
|
printstring STRINGID_ATTACKERCUREDTARGETSTATUS
|
||||||
|
waitmessage 0x40
|
||||||
|
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
|
||||||
|
goto BattleScript_RestoreHp
|
||||||
|
|
||||||
BattleScript_EffectStrengthSap:
|
BattleScript_EffectStrengthSap:
|
||||||
setstatchanger STAT_ATK, 1, TRUE
|
setstatchanger STAT_ATK, 1, TRUE
|
||||||
@ -2552,6 +2601,7 @@ BattleScript_EffectRestoreHp::
|
|||||||
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
|
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
|
||||||
attackanimation
|
attackanimation
|
||||||
waitanimation
|
waitanimation
|
||||||
|
BattleScript_RestoreHp:
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
|
@ -345,5 +345,7 @@
|
|||||||
#define EFFECT_BUG_BITE 339
|
#define EFFECT_BUG_BITE 339
|
||||||
#define EFFECT_STRENGTH_SAP 340
|
#define EFFECT_STRENGTH_SAP 340
|
||||||
#define EFFECT_MIND_BLOWN 341
|
#define EFFECT_MIND_BLOWN 341
|
||||||
|
#define EFFECT_PURIFY 342
|
||||||
|
#define EFFECT_BURN_UP 343
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
@ -148,6 +148,7 @@
|
|||||||
#define VARIOUS_HANDLE_FORM_CHANGE 85
|
#define VARIOUS_HANDLE_FORM_CHANGE 85
|
||||||
#define VARIOUS_GET_STAT_VALUE 86
|
#define VARIOUS_GET_STAT_VALUE 86
|
||||||
#define VARIOUS_JUMP_IF_FULL_HP 87
|
#define VARIOUS_JUMP_IF_FULL_HP 87
|
||||||
|
#define VARIOUS_LOSE_TYPE 88
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
@ -540,7 +540,9 @@
|
|||||||
#define STRINGID_INCINERATEBURN 536
|
#define STRINGID_INCINERATEBURN 536
|
||||||
#define STRINGID_BUGBITE 537
|
#define STRINGID_BUGBITE 537
|
||||||
#define STRINGID_ILLUSIONWOREOFF 538
|
#define STRINGID_ILLUSIONWOREOFF 538
|
||||||
|
#define STRINGID_ATTACKERCUREDTARGETSTATUS 539
|
||||||
|
#define STRINGID_ATTACKERLOSTFIRETYPE 540
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 539
|
#define BATTLESTRINGS_COUNT 541
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -661,9 +661,13 @@ static const u8 sText_AirBalloonPop[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_LAST_IT
|
|||||||
static const u8 sText_IncinerateBurn[] = _("{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nwas burnt up!");
|
static const u8 sText_IncinerateBurn[] = _("{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nwas burnt up!");
|
||||||
static const u8 sText_BugBite[] = _("{B_ATK_NAME_WITH_PREFIX} stole and ate\n{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}!");
|
static const u8 sText_BugBite[] = _("{B_ATK_NAME_WITH_PREFIX} stole and ate\n{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}!");
|
||||||
static const u8 sText_IllusionWoreOff[] = _("{B_DEF_NAME_WITH_PREFIX}'s Illusion wore off!");
|
static const u8 sText_IllusionWoreOff[] = _("{B_DEF_NAME_WITH_PREFIX}'s Illusion wore off!");
|
||||||
|
static const u8 sText_AttackerCuredTargetStatus[] = _("{B_ATK_NAME_WITH_PREFIX} cured\n{B_DEF_NAME_WITH_PREFIX}'s problem!");
|
||||||
|
static const u8 sText_AttackerLostFireType[] = _("{B_ATK_NAME_WITH_PREFIX} burned itself out!");
|
||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
|
[STRINGID_ATTACKERLOSTFIRETYPE - 12] = sText_AttackerLostFireType,
|
||||||
|
[STRINGID_ATTACKERCUREDTARGETSTATUS - 12] = sText_AttackerCuredTargetStatus,
|
||||||
[STRINGID_ILLUSIONWOREOFF - 12] = sText_IllusionWoreOff,
|
[STRINGID_ILLUSIONWOREOFF - 12] = sText_IllusionWoreOff,
|
||||||
[STRINGID_BUGBITE - 12] = sText_BugBite,
|
[STRINGID_BUGBITE - 12] = sText_BugBite,
|
||||||
[STRINGID_INCINERATEBURN - 12] = sText_IncinerateBurn,
|
[STRINGID_INCINERATEBURN - 12] = sText_IncinerateBurn,
|
||||||
|
@ -7575,6 +7575,14 @@ static void Cmd_various(void)
|
|||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 7;
|
gBattlescriptCurrInstr += 7;
|
||||||
return;
|
return;
|
||||||
|
case VARIOUS_LOSE_TYPE:
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
if (*(u8*)(&gBattleMons[gActiveBattler].type1 + i) == gBattlescriptCurrInstr[3])
|
||||||
|
*(u8*)(&gBattleMons[gActiveBattler].type1 + i) = TYPE_MYSTERY;
|
||||||
|
}
|
||||||
|
gBattlescriptCurrInstr += 4;
|
||||||
|
return;
|
||||||
case VARIOUS_PSYCHO_SHIFT:
|
case VARIOUS_PSYCHO_SHIFT:
|
||||||
i = TRUE;
|
i = TRUE;
|
||||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS)
|
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS)
|
||||||
|
@ -2379,7 +2379,8 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
case CANCELLER_THAW: // move thawing
|
case CANCELLER_THAW: // move thawing
|
||||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
|
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
|
||||||
{
|
{
|
||||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT)
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT
|
||||||
|
|| (gBattleMoves[gCurrentMove].effect == EFFECT_BURN_UP && IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE)))
|
||||||
{
|
{
|
||||||
gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
|
gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
|
@ -9054,7 +9054,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||||||
|
|
||||||
[MOVE_BURN_UP] =
|
[MOVE_BURN_UP] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_PLACEHOLDER,
|
.effect = EFFECT_BURN_UP,
|
||||||
.power = 130,
|
.power = 130,
|
||||||
.type = TYPE_FIRE,
|
.type = TYPE_FIRE,
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
@ -9096,7 +9096,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||||||
|
|
||||||
[MOVE_PURIFY] =
|
[MOVE_PURIFY] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_PLACEHOLDER,
|
.effect = EFFECT_PURIFY,
|
||||||
.power = 0,
|
.power = 0,
|
||||||
.type = TYPE_POISON,
|
.type = TYPE_POISON,
|
||||||
.accuracy = 0,
|
.accuracy = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user