mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
ActivateFlashFire
This commit is contained in:
parent
dcb463cd54
commit
679e10b0a9
|
|
@ -11,7 +11,7 @@
|
|||
.public ExclusiveItemEffectIsActive__0230A9B8
|
||||
.public FixedPoint32To64
|
||||
.public FixedPoint64IsZero
|
||||
.public FlashFireShouldActivate
|
||||
.public GetFlashFireStatus
|
||||
.public GetApparentWeather
|
||||
.public GetTypeMatchup
|
||||
.public GhostImmunityIsActive
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
.public FixedPoint64CmpLt
|
||||
.public FixedPoint64ToInt
|
||||
.public FixedRoomIsSubstituteRoom
|
||||
.public FlashFireShouldActivate
|
||||
.public GetFlashFireStatus
|
||||
.public GendersEqualNotGenderless
|
||||
.public GendersNotEqualNotGenderless
|
||||
.public GenerateStandardItem
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
.public FACADE_DAMAGE_MULTIPLIER
|
||||
.public FLAME_WHEEL_BURN_CHANCE
|
||||
.public FLAMETHROWER_BURN_CHANCE
|
||||
.public FlashFireShouldActivate
|
||||
.public GetFlashFireStatus
|
||||
.public FOCUS_PUNCH_DAMAGE_MULTIPLIER
|
||||
.public FormatMoveStringMore
|
||||
.public GetApparentWeather
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ _0230B14C:
|
|||
bne _0230B198
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl FlashFireShouldActivate
|
||||
bl GetFlashFireStatus
|
||||
cmp r0, #0
|
||||
beq _0230B198
|
||||
ldr r1, _0230B798 ; =DUNGEON_PTR
|
||||
|
|
|
|||
|
|
@ -1132,7 +1132,7 @@ _0230CB78:
|
|||
bne _0230CC78
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl FlashFireShouldActivate
|
||||
bl GetFlashFireStatus
|
||||
movs r4, r0
|
||||
beq _0230CC78
|
||||
ldrb r0, [r7, #0x15c + CALC_DAMAGE_OFFSET]
|
||||
|
|
|
|||
|
|
@ -3,33 +3,6 @@
|
|||
|
||||
.text
|
||||
|
||||
arm_func_start ActivateFlashFire
|
||||
ActivateFlashFire: ; 0x02313CE4
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
mov r5, r1
|
||||
mov r0, r5
|
||||
bl EntityIsValid__023118B4
|
||||
cmp r0, #0
|
||||
ldmeqia sp!, {r3, r4, r5, pc}
|
||||
mov r0, #0
|
||||
ldr r4, [r5, #0xb4]
|
||||
mov r1, r5
|
||||
mov r2, r0
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldrsh r0, [r4, #0x30]
|
||||
add r1, r0, #1
|
||||
cmp r1, #2
|
||||
movge r1, #2
|
||||
cmp r0, r1
|
||||
beq _02313D34
|
||||
mov r0, r5
|
||||
strh r1, [r4, #0x30]
|
||||
bl ov29_022E4338
|
||||
_02313D34:
|
||||
mov r0, r5
|
||||
bl UpdateStatusIconFlags
|
||||
ldmia sp!, {r3, r4, r5, pc}
|
||||
arm_func_end ActivateFlashFire
|
||||
|
||||
arm_func_start ApplyOffensiveStatMultiplier
|
||||
ApplyOffensiveStatMultiplier: ; 0x02313D40
|
||||
|
|
|
|||
|
|
@ -1710,7 +1710,7 @@ DoMoveWillOWisp: ; 0x02326B24
|
|||
sub sp, sp, #4
|
||||
mov r6, r0
|
||||
mov r5, r1
|
||||
bl FlashFireShouldActivate
|
||||
bl GetFlashFireStatus
|
||||
movs r4, r0
|
||||
beq _02326B94
|
||||
ldr r3, [r5, #0xb4]
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ void BoostOffensiveStat(struct entity *user, struct entity *target, struct StatI
|
|||
void BoostDefensiveStat(struct entity *user, struct entity *target, struct StatIndex stat, s32 nStagesRaw);
|
||||
// Checks whether Flash Fire should activate, assuming the defender is being hit by a Fire-type move.
|
||||
// This checks that the defender is valid and Flash Fire is active, and that Normalize isn't active on the attacker.
|
||||
enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender);
|
||||
enum flash_fire_status GetFlashFireStatus(struct entity *attacker, struct entity *defender);
|
||||
void ActivateFlashFire(struct entity *pokemon, struct entity *target);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02313814_H
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include "dungeon_logic_3.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_util_static.h"
|
||||
#include "move_orb_effects.h"
|
||||
#include "overlay_29_02313814.h"
|
||||
#include "overlay_29_02308FBC.h"
|
||||
#include "overlay_29_0230A994.h"
|
||||
#include "overlay_29_0230AB58.h"
|
||||
|
|
@ -28,7 +28,7 @@ s32 WeightWeakTypePicker(struct entity *user, struct entity *target, enum type_i
|
|||
if (move_type == TYPE_NORMAL || move_type == TYPE_FIGHTING)
|
||||
check_exposed = TRUE;
|
||||
|
||||
if (move_type == TYPE_FIRE && FlashFireShouldActivate(user, target) != FLASH_FIRE_STATUS_NONE)
|
||||
if (move_type == TYPE_FIRE && GetFlashFireStatus(user, target) != FLASH_FIRE_STATUS_NONE)
|
||||
return 0;
|
||||
|
||||
#ifdef JAPAN
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
#include "move_orb_effects.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_util_static.h"
|
||||
#include "overlay_29_023118B4.h"
|
||||
#include "overlay_29_02311BF8.h"
|
||||
|
||||
enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender)
|
||||
{
|
||||
if (!EntityIsValid__023118B4(defender))
|
||||
return FLASH_FIRE_STATUS_NONE;
|
||||
|
||||
if (AbilityIsActiveVeneer(attacker, ABILITY_NORMALIZE))
|
||||
return FLASH_FIRE_STATUS_NONE;
|
||||
|
||||
#ifdef JAPAN
|
||||
if (!DefenderAbilityIsActive__02311B94(attacker, defender, ABILITY_FLASH_FIRE))
|
||||
#else
|
||||
if (!DefenderAbilityIsActive__02311B94(attacker, defender, ABILITY_FLASH_FIRE, TRUE))
|
||||
#endif
|
||||
return FLASH_FIRE_STATUS_NONE;
|
||||
|
||||
if (GetEntInfo(defender)->stat_modifiers.flash_fire_boost >= 2)
|
||||
return FLASH_FIRE_STATUS_MAXED;
|
||||
|
||||
return FLASH_FIRE_STATUS_NOT_MAXED;
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ extern void ov29_022E4F1C(struct entity *user, struct StatIndex);
|
|||
extern void ov29_022E4D28(struct entity *user, struct StatIndex);
|
||||
extern void LogMessageByIdWithPopupCheckUserTarget(struct entity *user, struct entity *target, u32 message_id);
|
||||
extern void UpdateStatusIconFlags(struct entity *);
|
||||
extern void ov29_022E4338(struct entity *);
|
||||
|
||||
#ifdef JAPAN
|
||||
#define JPN_MSG_OFFSET -0x2C0
|
||||
|
|
@ -254,7 +255,7 @@ void BoostDefensiveStat(struct entity *user, struct entity *target, struct StatI
|
|||
UpdateStatusIconFlags(target);
|
||||
}
|
||||
|
||||
enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender)
|
||||
enum flash_fire_status GetFlashFireStatus(struct entity *attacker, struct entity *defender)
|
||||
{
|
||||
if (!EntityIsValid__023118B4(defender))
|
||||
return FLASH_FIRE_STATUS_NONE;
|
||||
|
|
@ -274,3 +275,22 @@ enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct e
|
|||
|
||||
return FLASH_FIRE_STATUS_NOT_MAXED;
|
||||
}
|
||||
|
||||
void ActivateFlashFire(struct entity *pokemon, struct entity *target)
|
||||
{
|
||||
s32 flashFireBoost;
|
||||
|
||||
if (EntityIsValid__023118B4(target)) {
|
||||
struct monster * entityInfo = GetEntInfo(target);
|
||||
SubstitutePlaceholderStringTags(0,target,0);
|
||||
flashFireBoost = entityInfo->stat_modifiers.flash_fire_boost;
|
||||
if (++flashFireBoost >= 2) {
|
||||
flashFireBoost = 2;
|
||||
}
|
||||
if (entityInfo->stat_modifiers.flash_fire_boost != flashFireBoost) {
|
||||
entityInfo->stat_modifiers.flash_fire_boost = flashFireBoost;
|
||||
ov29_022E4338(target);
|
||||
}
|
||||
UpdateStatusIconFlags(target);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user