misc battle cleanup (#943)

* peach NPC flags and missing ANIM_LIST_END

* ANIMS

* auto smash

* misc battle cleanup

* misc battle doc 2

* more battle

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-02-15 03:18:27 -05:00 committed by GitHub
parent a37f30dc94
commit 4fce6037a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
221 changed files with 2765 additions and 2915 deletions

View File

@ -1578,7 +1578,7 @@ typedef struct ActorPart {
/* 0x77 */ char unk_77[1];
/* 0x78 */ u32* defenseTable;
/* 0x7C */ s32 eventFlags;
/* 0x80 */ s32 partFlags3;
/* 0x80 */ s32 elementalImmunities; // bits from Elements, i.e., ELEMENT_FIRE | ELEMENT_QUAKE
/* 0x84 */ s32 spriteInstanceID;
/* 0x88 */ u32 currentAnimation;
/* 0x8C */ s32 animNotifyValue;
@ -1860,7 +1860,7 @@ typedef struct Actor {
/* 0x196 */ s8 unk_196;
/* 0x197 */ s8 unk_197;
/* 0x198 */ Vec2b unk_198;
/* 0x19A */ s8 unk_19A;
/* 0x19A */ s8 verticalRenderOffset; // visual only, does not affect target position
/* 0x19B */ char unk_19B[1];
/* 0x19C */ s32 actorTypeData1[6]; /* 4 = jump sound, 5 = attack sound */ // TODO: struct
/* 0x1B4 */ s16 actorTypeData1b[2];

View File

@ -908,6 +908,10 @@ enum SoundIDs {
SOUND_231 = 0x00000231,
SOUND_233 = 0x00000233,
SOUND_234 = 0x00000234,
SOUND_235 = 0x00000235,
SOUND_236 = 0x00000236,
SOUND_237 = 0x00000237,
SOUND_238 = 0x00000238,
SOUND_23D = 0x0000023D,
SOUND_241 = 0x00000241,
SOUND_245 = 0x00000245,
@ -2585,11 +2589,11 @@ enum SpeechFlags {
SPEECH_FACE_EACH_OTHER = 0,
};
enum HitResults {
HIT_RESULT_TRIGGERED_EXPLODE = -1,
typedef enum HitResult {
HIT_RESULT_BACKFIRE = -1,
HIT_RESULT_HIT = 0,
HIT_RESULT_1 = 1,
HIT_RESULT_QUAKE_IMMUNE = 2,
HIT_RESULT_1 = 1, // KILL?
HIT_RESULT_NO_DAMAGE = 2,
HIT_RESULT_3 = 3,
HIT_RESULT_LANDED_ON_SPIKE = 4,
HIT_RESULT_LUCKY = 5,
@ -2597,7 +2601,7 @@ enum HitResults {
HIT_RESULT_HIT_STATIC = 7,
HIT_RESULT_IMMUNE = 8,
HIT_RESULT_10 = 10,
};
} HitResult;
enum ActionRatings {
ACTION_RATING_NICE = 0, ///< sets nice hits = 1
@ -2703,7 +2707,7 @@ enum Elements {
ELEMENT_ICE = 0x00000004,
ELEMENT_MYSTERY = 0x00000005,
ELEMENT_MAGIC = 0x00000007,
ELEMENT_HAMMER = 0x00000008,
ELEMENT_SMASH = 0x00000008,
ELEMENT_JUMP = 0x00000009,
ELEMENT_COSMIC = 0x0000000A,
ELEMENT_BLAST = 0x0000000B,
@ -2726,7 +2730,7 @@ enum Events {
EVENT_PEACH_BEAM = 0x00000014,
EVENT_POWER_BOUNCE_HIT = 0x00000015,
EVENT_BLOW_AWAY = 0x00000016,
EVENT_SCRIPTED_IMMUNE = 0x00000017,
EVENT_ZERO_DAMAGE = 0x00000017,
EVENT_18 = 0x00000018,
EVENT_IMMUNE = 0x00000019,
EVENT_BLOCK = 0x0000001A,
@ -3312,7 +3316,7 @@ enum DamageTypes {
DAMAGE_TYPE_WATER = 0x00000004,
DAMAGE_TYPE_ICE = 0x00000008,
DAMAGE_TYPE_MAGIC = 0x00000010,
DAMAGE_TYPE_ELECTRIC = 0x00000020,
DAMAGE_TYPE_SHOCK = 0x00000020,
DAMAGE_TYPE_SMASH = 0x00000040,
DAMAGE_TYPE_JUMP = 0x00000080,
DAMAGE_TYPE_COSMIC = 0x00000100,
@ -3355,14 +3359,16 @@ enum PartnerIDs {
PARTNER_TWINK = 0x0000000B,
};
enum AttackEventFlags {
ATTACK_EVENT_FLAG_1 = 0x1,
ATTACK_EVENT_FLAG_2 = 0x2,
ATTACK_EVENT_FLAG_4 = 0x4,
ATTACK_EVENT_FLAG_8 = 0x8,
ATTACK_EVENT_FLAG_10 = 0x10,
ATTACK_EVENT_FLAG_80 = 0x80,
ATTACK_EVENT_FLAG_200 = 0x200,
enum EventSupressFlags {
SUPPRESS_EVENT_SPIKY_TOP = 0x1,
SUPPRESS_EVENT_EXPLODE_CONTACT = 0x2,
SUPPRESS_EVENT_SPIKY_FRONT = 0x4,
SUPPRESS_EVENT_SHOCK_CONTACT = 0x8,
SUPPRESS_EVENT_BURN_CONTACT = 0x10,
SUPPRESS_EVENT_FLAG_80 = 0x80, // supresses events associated with ACTOR_EVENT_FLAG_200000 used by pokeys and spinies
SUPPRESS_EVENT_FLAG_200 = 0x200, // unused?
SUPPRESS_EVENT_ALL = 0xFFFF,
SUPPRESS_EVENT_FLAG_10000 = 0x10000, // usage is a bug?
};
enum PartnerActions {
@ -3661,7 +3667,7 @@ enum ActorFlags {
ACTOR_FLAG_100 = 0x00000100,
ACTOR_FLAG_FLYING = 0x00000200, ///< Quake Hammer can't hit.
ACTOR_FLAG_400 = 0x00000400,
ACTOR_FLAG_HP_OFFSET_BELOW = 0x00000800, ///< HP bar offset below actor (e.g. Swooper when upside-down). Is this just UPSIDE_DOWN?
ACTOR_FLAG_HP_OFFSET_BELOW = 0x00000800, ///< HP bar offset below actor (e.g. Swooper when upside-down). Is this just UPSIDE_DOWN? FLIPPED? TOPPLED?
ACTOR_FLAG_1000 = 0x00001000,
ACTOR_FLAG_2000 = 0x00002000,
ACTOR_FLAG_TARGET_ONLY = 0x00004000, ///< Battle ends even if undefeated. No turn.
@ -3698,7 +3704,7 @@ enum ActorPartFlags {
ACTOR_PART_FLAG_400 = 0x00000400,
ACTOR_PART_FLAG_800 = 0x00000800,
ACTOR_PART_FLAG_1000 = 0x00001000,
ACTOR_PART_FLAG_2000 = 0x00002000, ///< Plays extra hurt SFX?
ACTOR_PART_FLAG_2000 = 0x00002000, ///< electrified Plays extra hurt SFX?
ACTOR_PART_FLAG_4000 = 0x00004000,
ACTOR_PART_FLAG_8000 = 0x00008000,
ACTOR_PART_FLAG_10000 = 0x00010000,
@ -3730,13 +3736,13 @@ enum ActorEventFlags {
ACTOR_EVENT_FLAG_40 = 0x00000040,
ACTOR_EVENT_FLAG_ELECTRIFIED = 0x00000080, ///< Player takes shock damage upon contact.
ACTOR_EVENT_FLAG_100 = 0x00000100,
ACTOR_EVENT_FLAG_EXPLOSIVE = 0x00000200, ///< Blast and fire attacks trigger an explosion.
ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION = 0x00000200, ///< Blast and fire attacks trigger an explosion.
ACTOR_EVENT_FLAG_400 = 0x00000400,
ACTOR_EVENT_FLAG_800 = 0x00000800,
ACTOR_EVENT_FLAG_FLIPABLE = 0x00001000, ///< Actor can be flipped; triggered by jump and quake attacks.
ACTOR_EVENT_FLAG_2000 = 0x00002000,
ACTOR_EVENT_FLAG_GROUNDABLE = 0x00004000, ///< Actor can be knocked down from flight; triggered by jump attacks.
ACTOR_EVENT_FLAG_8000 = 0x00008000,
ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT = 0x00008000,
ACTOR_EVENT_FLAG_SPIKY_FRONT = 0x00010000, ///< Player takes spike damage from hammer attacks.
ACTOR_EVENT_FLAG_20000 = 0x00020000,
ACTOR_EVENT_FLAG_ENCHANTED = 0x00040000, ///< Actor glows and listens for the Star Beam event.
@ -5014,7 +5020,7 @@ enum EnemyFlags {
ENEMY_FLAG_4000 = 0x00004000,
ENEMY_FLAG_8000 = 0x00008000,
ENEMY_FLAG_10000 = 0x00010000,
ENEMY_FLAG_20000 = 0x00020000,
ENEMY_FLAG_USE_PLAYER_SPRITE = 0x00020000, ///< Used for Peach NPCs
ENEMY_FLAG_40000 = 0x00040000,
ENEMY_FLAG_80000 = 0x00080000,
ENEMY_FLAG_100000 = 0x00100000,
@ -5731,41 +5737,6 @@ enum NpcDropFlags {
NPC_DROP_FLAG_80 = 0x80,
};
enum ElementImmunityFlags {
ELEMENT_IMMUNITY_FLAG_1 = 0x00000001,
ELEMENT_IMMUNITY_FLAG_2 = 0x00000002,
ELEMENT_IMMUNITY_FLAG_4 = 0x00000004,
ELEMENT_IMMUNITY_FLAG_8 = 0x00000008,
ELEMENT_IMMUNITY_FLAG_10 = 0x00000010,
ELEMENT_IMMUNITY_FLAG_20 = 0x00000020,
ELEMENT_IMMUNITY_FLAG_40 = 0x00000040,
ELEMENT_IMMUNITY_FLAG_80 = 0x00000080,
ELEMENT_IMMUNITY_FLAG_100 = 0x00000100,
ELEMENT_IMMUNITY_FLAG_200 = 0x00000200,
ELEMENT_IMMUNITY_FLAG_400 = 0x00000400,
ELEMENT_IMMUNITY_FLAG_800 = 0x00000800,
ELEMENT_IMMUNITY_FLAG_1000 = 0x00001000,
ELEMENT_IMMUNITY_FLAG_2000 = 0x00002000,
ELEMENT_IMMUNITY_FLAG_4000 = 0x00004000,
ELEMENT_IMMUNITY_FLAG_8000 = 0x00008000,
ELEMENT_IMMUNITY_FLAG_10000 = 0x00010000,
ELEMENT_IMMUNITY_FLAG_20000 = 0x00020000,
ELEMENT_IMMUNITY_FLAG_40000 = 0x00040000,
ELEMENT_IMMUNITY_FLAG_80000 = 0x00080000,
ELEMENT_IMMUNITY_FLAG_100000 = 0x00100000,
ELEMENT_IMMUNITY_FLAG_200000 = 0x00200000,
ELEMENT_IMMUNITY_FLAG_400000 = 0x00400000,
ELEMENT_IMMUNITY_FLAG_800000 = 0x00800000,
ELEMENT_IMMUNITY_FLAG_1000000 = 0x01000000,
ELEMENT_IMMUNITY_FLAG_2000000 = 0x02000000,
ELEMENT_IMMUNITY_FLAG_4000000 = 0x04000000,
ELEMENT_IMMUNITY_FLAG_8000000 = 0x08000000,
ELEMENT_IMMUNITY_FLAG_10000000 = 0x10000000,
ELEMENT_IMMUNITY_FLAG_20000000 = 0x20000000,
ELEMENT_IMMUNITY_FLAG_40000000 = 0x40000000,
ELEMENT_IMMUNITY_FLAG_80000000 = 0x80000000,
};
enum FoldStateFlags {
FOLD_STATE_FLAG_ENABLED = 0x00000001,
FOLD_STATE_FLAG_G_CULL_BACK = 0x00000002,
@ -5876,8 +5847,8 @@ enum WindowId {
WINDOW_ID_5 = 5,
WINDOW_ID_6 = 6,
WINDOW_ID_7 = 7,
WINDOW_ID_8 = 8,
WINDOW_ID_9 = 9,
WINDOW_ID_8 = 8, // battle main?
WINDOW_ID_BATTLE_POPUP = 9,
WINDOW_ID_ITEM_INFO_NAME = 10,
WINDOW_ID_ITEM_INFO_DESC = 11,
WINDOW_ID_12 = 12,
@ -6273,6 +6244,8 @@ enum MsgChars {
MSG_CHAR_SINGLE_QUOTE_CLOSE = 0xA5,
// 0xA6 to 0xEF are unused
MSG_CHAR_UNK_C3 = 0xC3,
// special character codes used when reading from the source buffer
MSG_CHAR_READ_ENDL = 0xF0,
MSG_CHAR_READ_WAIT = 0xF1,

View File

@ -451,7 +451,7 @@ void set_animation_rate(s32 actorID, s32 partIndex, f32 rate);
void set_model_flags(u16, s32, s32);
void init_enter_world_shared(void);
s16 update_enter_map_screen_overlay(s16* progress);
s32 update_exit_map_screen_overlay(s16* progress);
s16 update_exit_map_screen_overlay(s16* progress);
void set_screen_overlay_params_front(u8, f32);
void set_screen_overlay_params_back(u8, f32);
void set_screen_overlay_alpha(s32, f32);
@ -961,11 +961,10 @@ void open_status_menu_short(void);
void func_8024EFE0(f32 x, f32 y, f32 z, s32, s32, s32);
void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a);
s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion);
s32 calc_partner_test_enemy(void);
void disable_actor_blur(Actor*);
void reset_actor_blur(Actor*);
void enable_actor_blur(Actor*);
void func_80251474(Actor*);
void apply_shock_effect(Actor*);
void func_8025C8A0(s32, ActorPart*, s32 yaw, s32 arg3);
void func_8025CD28(s32, ActorPart*, s32 yaw, s32 arg3);
void _add_part_decoration(ActorPart*);

View File

@ -137,7 +137,8 @@
#define SPRITE_ID(name, pal_anim) ((name) << 16 | (pal_anim))
#define BATTLE_ENTITY_ID_MASK 0x800
#define BATTLE_NPC_ID_BIT 0x800
#define BATTLE_ENTITY_ID_BIT 0x800
#define UNPACK_BTL_AREA(battleID) (((battleID) >> 8) & 0xFF)
#define UNPACK_BTL_INDEX(battleID) ((battleID) & 0xFF)
@ -213,6 +214,12 @@
.models = { names } \
}
#define STATUS_CHANCE_IGNORE_RES 0xFE
#define STATUS_CHANCE_NEVER 0xFF
#define DMG_STATUS_CHANCE(typeFlag, duration, chance) (STATUS_FLAG_80000000 | typeFlag | (duration << 8) | chance)
#define DMG_STATUS_ALWAYS(typeFlag, duration) (STATUS_FLAG_80000000 | STATUS_FLAG_RIGHT_ON | typeFlag | (duration << 8))
#define DMG_STATUS_IGNORE_RES(typeFlag, duration) (typeFlag | (duration << 8) | STATUS_CHANCE_IGNORE_RES)
#ifdef OLD_GCC
#define VLA 0
#else

View File

@ -283,7 +283,7 @@ typedef struct NpcData {
/* 0x1E2 */ s8 unk__1E2;
/* 0x1E3 */ u8 aiDetectFlags;
/* 0x1E4 */ u32 aiFlags;
/* 0x1E8 */ s32* extraAnimations;
/* 0x1E8 */ AnimID* extraAnimations;
/* 0x1EC */ s32 tattle;
} NpcData; // size = 0x1F0
@ -434,13 +434,13 @@ void init_npc_list(void);
/// Presumably did something once upon a time but got commented out.
void npc_iter_no_op(void);
s32 _create_npc(NpcBlueprint* blueprint, AnimID* animList, s32 skipLoadingAnims);
s32 create_npc_impl(NpcBlueprint* blueprint, AnimID* animList, s32 skipLoadingAnims);
s32 _create_npc_basic(NpcBlueprint* blueprint);
s32 create_basic_npc(NpcBlueprint* blueprint);
s32 _create_npc_standard(NpcBlueprint* blueprint, AnimID* animList);
s32 create_standard_npc(NpcBlueprint* blueprint, AnimID* animList);
s32 _create_npc_partner(NpcBlueprint* blueprint);
s32 create_peach_npc(NpcBlueprint* blueprint);
void free_npc_by_index(s32 listIndex);

View File

@ -27,7 +27,7 @@ ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall);
ApiStatus ForceCloseMessageBox(Evt* script, s32 isInitialCall);
ApiStatus SetMessageBoxDuration(Evt* script, s32 isInitialCall);
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall);
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall);
ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall);
ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall);
ApiStatus ActorSpeak(Evt* script, s32 isInitialCall);
ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall);

View File

@ -112,7 +112,7 @@ void state_step_change_map(void) {
update_effects();
update_cameras();
if ((update_exit_map_screen_overlay(&gMapTransitionAlpha) << 0x10) != 0) {
if (update_exit_map_screen_overlay(&gMapTransitionAlpha) != 0) {
gMapTransitionState++;
}
break;

View File

@ -3333,11 +3333,11 @@ void btl_update_message_popup(void* data) {
case 1:
if (gBattleStatus.flags1 & BS_FLAGS1_10000) {
gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW_TRANSPARENT);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT);
popup->duration = 0;
popup->unk_16 = 2;
} else if (!(gBattleStatus.flags1 & BS_FLAGS1_4000) && (temp_a0 != 2)) {
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW_TRANSPARENT);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT);
switch (popup->messageIndex) {
case BTL_MSG_31:
hud_element_set_script(D_8029F642, &HES_MashAButton);
@ -3574,7 +3574,7 @@ void btl_update_message_popup(void* data) {
break;
}
if (shouldDisposeWindow) {
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
bPopupMessage = NULL;
free_popup(popup);
}
@ -3904,8 +3904,8 @@ void btl_show_message_popup(void* data) {
width = msgWidth;
numLines = get_msg_lines(messageID) - 1;
height = bMsgHeights[numLines];
set_window_properties(WINDOW_ID_9, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
}
break;
case BTL_MSG_49:
@ -3921,8 +3921,8 @@ void btl_show_message_popup(void* data) {
posX = 160 - (msgWidth / 2);
width = msgWidth;
height = 40;
set_window_properties(WINDOW_ID_9, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
}
break;
case BTL_MSG_04:
@ -3946,8 +3946,8 @@ void btl_show_message_popup(void* data) {
width = msgWidth;
numLines = get_msg_lines(messageID) - 1;
height = bMsgHeights[numLines];
set_window_properties(WINDOW_ID_9, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
}
break;
case BTL_MSG_51:
@ -3962,8 +3962,8 @@ void btl_show_message_popup(void* data) {
width = msgWidth;
numLines = get_msg_lines(messageID) - 1;
height = bMsgHeights[numLines];
set_window_properties(WINDOW_ID_9, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
}
break;
case BTL_MSG_2E:
@ -4006,11 +4006,11 @@ void btl_show_message_popup(void* data) {
D_8029F650 = D_802835D8[numLines];
posY = D_8029F64E + D_8029F650;
set_window_properties(WINDOW_ID_9, posX, posY, width, height, 0, func_80250818, popup, -1);
set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, 0, func_80250818, popup, -1);
if (popup->messageIndex == BTL_MSG_3B) {
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW_DARKENED);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_DARKENED);
}
}
break;
@ -4070,14 +4070,14 @@ ApiStatus func_80251454(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_80251474(Actor* actor) {
void apply_shock_effect(Actor* actor) {
ActorPart* part = actor->partsTable;
while (part != NULL) {
if (!(part->flags & ACTOR_PART_FLAG_INVISIBLE) &&
part->idleAnimations != NULL &&
!(part->flags & ACTOR_PART_FLAG_40000000))
{
if (!(part->flags & ACTOR_PART_FLAG_INVISIBLE)
&& part->idleAnimations != NULL
&& !(part->flags & ACTOR_PART_FLAG_40000000)
) {
f32 x = part->currentPos.x;
f32 y = part->currentPos.y + (actor->size.y / 10);
f32 z = part->currentPos.z;

View File

@ -3,7 +3,7 @@
#include "script_api/battle.h"
#include "effects.h"
s32 calc_item_check_hit(void) {
HitResult calc_item_check_hit(void) {
BattleStatus* battleStatus = &gBattleStatus;
ActorState* state = &battleStatus->playerActor->state;
s32 actorID = battleStatus->currentTargetID;
@ -12,45 +12,53 @@ s32 calc_item_check_hit(void) {
Actor* actor;
ActorPart* actorPart;
currentTargetPart = currentTargetPartS8 = battleStatus->currentTargetPart;
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
currentTargetPart = currentTargetPartS8 = battleStatus->currentTargetPart;
battleStatus->currentTargetPart2 = currentTargetPartS8;
actor = get_actor(actorID);
if (actor != NULL) {
if (actor == NULL) {
return HIT_RESULT_HIT;
}
actorPart = get_actor_part(actor, currentTargetPart);
ASSERT(actorPart != NULL);
if (!(actorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) {
if (actorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
return HIT_RESULT_MISS;
}
if (actor->transparentStatus == STATUS_TRANSPARENT) {
return HIT_RESULT_MISS;
}
if (actor->stoneStatus == STATUS_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_IMMUNE;
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (actorPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)) {
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)
&& (actorPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP))
{
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_LANDED_ON_SPIKE;
}
} else {
return HIT_RESULT_MISS;
}
}
return HIT_RESULT_HIT;
}
s32 calc_item_damage_enemy(void) {
HitResult calc_item_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
s32 currentTargetID = battleStatus->currentTargetID;
Actor* partner = battleStatus->partnerActor;
s32 currentTargetPartID = battleStatus->currentTargetPart;
s32 sp18;
s32 partImmuneToElement;
s32 sp1C = FALSE;
s32 actorClass;
s32 isFireDamage = FALSE;
s32 isElectricDamage = FALSE;
s32 isWaterDamage = FALSE;
s32 isShockDamage = FALSE;
s32 isIceDamage = FALSE;
Actor* target;
ActorPart* targetPart;
@ -61,7 +69,7 @@ s32 calc_item_damage_enemy(void) {
ActorState* state;
s32 dispatchEvent;
s32 wasStatusInflicted;
s32 ret;
s32 hitResult;
battleStatus->wasStatusInflicted = FALSE;
battleStatus->lastAttackDamage = 0;
@ -72,7 +80,7 @@ s32 calc_item_damage_enemy(void) {
wasStatusInflicted = FALSE;
if (target == NULL) {
return 0;
return HIT_RESULT_HIT;
}
targetPart = get_actor_part(target, currentTargetPartID);
@ -80,7 +88,6 @@ s32 calc_item_damage_enemy(void) {
PANIC();
}
target->lastDamageTaken = 0;
actorClass = currentTargetID & ACTOR_CLASS_MASK;
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
@ -93,12 +100,13 @@ s32 calc_item_damage_enemy(void) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
func_80251474(target);
isElectricDamage = TRUE;
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isShockDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWaterDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
@ -106,10 +114,12 @@ s32 calc_item_damage_enemy(void) {
}
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) {
if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) ||
((target->transparentStatus == STATUS_TRANSPARENT) || ((targetPart->eventFlags & ACTOR_EVENT_FLAG_800) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))))
{
return 6;
if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)
|| (target->transparentStatus == STATUS_TRANSPARENT)
|| (targetPart->eventFlags & ACTOR_EVENT_FLAG_800)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)
) {
return HIT_RESULT_MISS;
}
}
@ -117,18 +127,16 @@ s32 calc_item_damage_enemy(void) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return 1;
} else {
return 0;
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (targetPart->partFlags3 & battleStatus->currentAttackElement) {
sp18 = TRUE;
if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
partImmuneToElement = TRUE;
} else {
sp18 = FALSE;
partImmuneToElement = FALSE;
}
if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_ENCHANTED | ACTOR_EVENT_FLAG_80000)) {
@ -153,13 +161,14 @@ s32 calc_item_damage_enemy(void) {
if (attackDamage <= 0) {
target->hpChangeCounter = 0;
ret = 2;
hitResult = HIT_RESULT_NO_DAMAGE;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
battleStatus->lastAttackDamage = 0;
} else {
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
dispatchEvent = EVENT_ZERO_DAMAGE;
battleStatus->lastAttackDamage = 0;
}
} else {
@ -167,8 +176,12 @@ s32 calc_item_damage_enemy(void) {
target->hpChangeCounter -= attackDamage;
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_HIT_COMBO;
ret = 0;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000) && !sp18 && !(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
hitResult = HIT_RESULT_HIT;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !partImmuneToElement
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
) {
target->currentHP -= attackDamage;
if (target->currentHP <= 0) {
target->currentHP = 0;
@ -184,19 +197,19 @@ s32 calc_item_damage_enemy(void) {
dispatch_event_actor(target, dispatchEvent);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return 2;
return HIT_RESULT_NO_DAMAGE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_2000) {
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_DEATH;
ret = 0;
hitResult = HIT_RESULT_HIT;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP <= 0 && dispatchEvent == EVENT_IMMUNE) {
@ -220,7 +233,7 @@ s32 calc_item_damage_enemy(void) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_80000) {
dispatchEvent = EVENT_1D;
}
ret = 0;
hitResult = HIT_RESULT_HIT;
}
}
@ -244,7 +257,7 @@ s32 calc_item_damage_enemy(void) {
remove_status_transparent(target->hudElementDataIndex);
}
wasStatusInflicted = TRUE;
ret = 0;
hitResult = HIT_RESULT_HIT;
}
}
}
@ -354,7 +367,7 @@ s32 calc_item_damage_enemy(void) {
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
@ -378,7 +391,7 @@ s32 calc_item_damage_enemy(void) {
!(target->flags & ACTOR_FLAG_400))
{
dispatchEvent = EVENT_SCARE_AWAY;
ret = 0;
hitResult = HIT_RESULT_HIT;
sp1C = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_ACTORS_VISIBLE;
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
@ -386,7 +399,7 @@ s32 calc_item_damage_enemy(void) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
dispatchEvent = EVENT_IMMUNE;
ret = 2;
hitResult = HIT_RESULT_NO_DAMAGE;
}
}
@ -426,7 +439,7 @@ s32 calc_item_damage_enemy(void) {
if (!sp1C && !wasStatusInflicted) {
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
} else if (!sp18) {
} else if (!partImmuneToElement) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_SMASH | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS)) {
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
@ -438,11 +451,11 @@ s32 calc_item_damage_enemy(void) {
}
}
if (battleStatus->lastAttackDamage > 0 && !sp18) {
if (battleStatus->lastAttackDamage > 0 && !partImmuneToElement) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isElectricDamage) {
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
@ -513,24 +526,24 @@ s32 calc_item_damage_enemy(void) {
func_80266ADC(target);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
if (ret == 0) {
ret = 1;
if (hitResult == HIT_RESULT_HIT) {
hitResult = HIT_RESULT_1;
}
if (ret == 2) {
ret = 3;
if (hitResult == HIT_RESULT_NO_DAMAGE) {
hitResult = HIT_RESULT_3;
}
}
return ret;
return hitResult;
}
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 itemDamageOut = *args++;
s32 hitResultVarOut = *args++;
s32 flags;
Actor* actor;
s32 itemDamage;
HitResult hitResult;
battleStatus->currentAttackElement = *args++;
battleStatus->currentAttackEventSuppression = 0;
@ -574,18 +587,18 @@ ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
itemDamage = calc_item_damage_enemy();
if (itemDamage < 0) {
hitResult = calc_item_damage_enemy();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, itemDamageOut, itemDamage);
evt_set_variable(script, hitResultVarOut, hitResult);
if (!does_script_exist_by_ref(script)) {
return ApiStatus_FINISH;
}
@ -593,12 +606,12 @@ ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 itemDamageOut = *args++;
s32 hitResultVarOut = *args++;
Actor* actor;
s32 itemDamage;
HitResult hitResult;
s32 flags;
battleStatus->currentAttackElement = *args++;
@ -644,18 +657,18 @@ ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
itemDamage = calc_item_damage_enemy();
if (itemDamage < 0) {
hitResult = calc_item_damage_enemy();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, itemDamageOut, itemDamage);
evt_set_variable(script, hitResultVarOut, hitResult);
if (!does_script_exist_by_ref(script)) {
return ApiStatus_FINISH;
}
@ -663,13 +676,13 @@ ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_80252B3C(Evt* script, s32 isInitialCall) {
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 itemDamageOut = *args++;
s32 hitResultVarOut = *args++;
s32 flags;
Actor* actor;
s32 itemDamage;
HitResult hitResult;
battleStatus->currentAttackElement = *args++;
battleStatus->currentAttackEventSuppression = 0;
@ -713,18 +726,18 @@ ApiStatus func_80252B3C(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
itemDamage = calc_item_damage_enemy();
if (itemDamage < 0) {
hitResult = calc_item_damage_enemy();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, itemDamageOut, itemDamage);
evt_set_variable(script, hitResultVarOut, hitResult);
if (!does_script_exist_by_ref(script)) {
return ApiStatus_FINISH;
}
@ -735,10 +748,10 @@ ApiStatus func_80252B3C(Evt* script, s32 isInitialCall) {
ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 itemDamageOut = *args++;
s32 hitResultVarOut = *args++;
s32 flags;
Actor* actor;
s32 itemDamage;
HitResult hitResult;
battleStatus->currentAttackElement = *args++;
battleStatus->currentAttackEventSuppression = 0;
@ -782,18 +795,18 @@ ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
itemDamage = calc_item_check_hit();
if (itemDamage < 0) {
hitResult = calc_item_check_hit();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, itemDamageOut, itemDamage);
evt_set_variable(script, hitResultVarOut, hitResult);
return ApiStatus_DONE2;
}

View File

@ -179,12 +179,12 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY);
if (gSpeakingActorPrintCtx->stateFlags & 0x40) {
if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_40) {
decrement_status_menu_disabled();
return ApiStatus_DONE1;
}
if (gSpeakingActorPrintCtx->stateFlags & 0x80) { // "is talking" flag
if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_80) { // "is talking" flag
anim = gSpeakingActorTalkAnim;
} else {
anim = gSpeakingActorIdleAnim;

View File

@ -750,9 +750,9 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
}
actorPosX = actor->currentPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
actorPosY = actor->currentPos.y + actor->headOffset.y + actor->unk_19A;
actorPosY = actor->currentPos.y + actor->headOffset.y + actor->verticalRenderOffset;
} else {
actorPosY = actor->currentPos.y - actor->headOffset.y + actor->unk_19A;
actorPosY = actor->currentPos.y - actor->headOffset.y + actor->verticalRenderOffset;
}
actorPosZ = actor->currentPos.z + actor->headOffset.z;
@ -1360,7 +1360,7 @@ void appendGfx_player_actor(void* arg0) {
playerParts = player->partsTable;
playerPosX = player->currentPos.x + player->headOffset.x;
playerPosY = player->currentPos.y + player->headOffset.y + player->unk_19A;
playerPosY = player->currentPos.y + player->headOffset.y + player->verticalRenderOffset;
playerPosZ = player->currentPos.z + player->headOffset.z;
playerYaw = playerParts->yaw = player->yaw;

View File

@ -1122,8 +1122,8 @@ void btl_state_update_celebration(void) {
width = get_msg_width(MSG_Menus_CantIncrease, 0) + 31;
x = 160 - (width / 2);
y = 80;
set_window_properties(WINDOW_ID_9, x, y, width, 28, 10, draw_content_cant_increase_popup, NULL, -1);
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_properties(WINDOW_ID_BATTLE_POPUP, x, y, width, 28, 10, draw_content_cant_increase_popup, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
CelebrateSubstateTime = 60;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY;
break;
@ -1135,7 +1135,7 @@ void btl_state_update_celebration(void) {
CelebrateSubstateTime--;
break;
}
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE;
break;
case BTL_SUBSTATE_CELEBRATE_SKIPPABLE_END_DELAY:

View File

@ -992,7 +992,7 @@ EvtScript HandleEvent_Player = {
EVT_EXEC_WAIT(D_80298724)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208C)
EVT_SET_CONST(LVar1, ANIM_Mario_10002)

View File

@ -1208,7 +1208,7 @@ void load_player_actor(void) {
player->rotationPivotOffset.x = 0;
player->rotationPivotOffset.y = 0;
player->rotationPivotOffset.z = 0;
player->unk_19A = 0;
player->verticalRenderOffset = 0;
player->yaw = 0.0f;
player->renderMode = RENDER_MODE_ALPHATEST;
player->scale.x = 1.0f;
@ -1309,7 +1309,7 @@ void load_player_actor(void) {
}
part->eventFlags = 0;
part->partFlags3 = 0;
part->elementalImmunities = 0;
part->opacity = 255;
part->size.y = player->size.y;
part->size.x = player->size.x;
@ -1463,7 +1463,7 @@ void load_partner_actor(void) {
partnerActor->scaleModifier.x = 1.0f;
partnerActor->scaleModifier.y = 1.0f;
partnerActor->scaleModifier.z = 1.0f;
partnerActor->unk_19A = 0;
partnerActor->verticalRenderOffset = 0;
partnerActor->size.x = ActorBlueprint->size.x;
partnerActor->size.y = ActorBlueprint->size.y;
partnerActor->healthBarPosition.x = partnerActor->homePos.x;
@ -1537,7 +1537,7 @@ void load_partner_actor(void) {
part->defenseTable = ActorPartBlueprint->defenseTable;
part->idleAnimations = ActorPartBlueprint->idleAnimations;
part->eventFlags = ActorPartBlueprint->eventFlags;
part->partFlags3 = ActorPartBlueprint->elementImmunityFlags;
part->elementalImmunities = ActorPartBlueprint->elementImmunityFlags;
part->opacity = ActorPartBlueprint->opacity;
part->size.y = partnerActor->size.y;
part->size.x = partnerActor->size.x;
@ -1708,7 +1708,7 @@ Actor* create_actor(Formation formation) {
actor->scaleModifier.x = 1.0f;
actor->scaleModifier.y = 1.0f;
actor->scaleModifier.z = 1.0f;
actor->unk_19A = 0;
actor->verticalRenderOffset = 0;
actor->extraCoinBonus = 0;
actor->size.x = formationActor->size.x;
actor->size.y = formationActor->size.y;
@ -1798,7 +1798,7 @@ Actor* create_actor(Formation formation) {
part->defenseTable = actorPartBP->defenseTable;
part->idleAnimations = actorPartBP->idleAnimations;
part->eventFlags = actorPartBP->eventFlags;
part->partFlags3 = actorPartBP->elementImmunityFlags;
part->elementalImmunities = actorPartBP->elementImmunityFlags;
part->opacity = actorPartBP->opacity;
if (part->opacity < 255) {
actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
@ -2185,72 +2185,28 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
s32 minDefense = 255;
if (defenseTable != NULL) {
if (elementFlags & DAMAGE_TYPE_FIRE) {
defense = lookup_defense(defenseTable, ELEMENT_FIRE);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_WATER) {
defense = lookup_defense(defenseTable, ELEMENT_WATER);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_ICE) {
defense = lookup_defense(defenseTable, ELEMENT_ICE);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_MAGIC) {
defense = lookup_defense(defenseTable, ELEMENT_MAGIC);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_SMASH) {
defense = lookup_defense(defenseTable, ELEMENT_HAMMER);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_JUMP) {
defense = lookup_defense(defenseTable, ELEMENT_JUMP);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_COSMIC) {
defense = lookup_defense(defenseTable, ELEMENT_COSMIC);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_BLAST) {
defense = lookup_defense(defenseTable, ELEMENT_BLAST);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_ELECTRIC) {
defense = lookup_defense(defenseTable, ELEMENT_SHOCK);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_QUAKE) {
defense = lookup_defense(defenseTable, ELEMENT_QUAKE);
if (defense < minDefense) {
minDefense = defense;
}
}
if (elementFlags & DAMAGE_TYPE_THROW) {
defense = lookup_defense(defenseTable, ELEMENT_THROW);
if (defense < minDefense) {
minDefense = defense;
}
}
#define CHECK_DEFENSE(element) \
if (elementFlags & DAMAGE_TYPE_##element) { \
defense = lookup_defense(defenseTable, ELEMENT_##element); \
if (defense < minDefense) { \
minDefense = defense; \
} \
} \
CHECK_DEFENSE(FIRE);
CHECK_DEFENSE(WATER);
CHECK_DEFENSE(ICE);
CHECK_DEFENSE(MAGIC);
CHECK_DEFENSE(SMASH);
CHECK_DEFENSE(JUMP);
CHECK_DEFENSE(COSMIC);
CHECK_DEFENSE(BLAST);
CHECK_DEFENSE(SHOCK);
CHECK_DEFENSE(QUAKE);
CHECK_DEFENSE(THROW);
#undef CHECK_DEFENSE
}
// If no element flags were set, fall back to normal defense.
@ -2354,8 +2310,8 @@ void func_802666E4(Actor* actor, f32 x, f32 y, f32 z, s32 damage) {
do {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, x, y, z, 1.0f, 0x18);
} else if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
func_80251474(actor);
} else if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(actor);
} else if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, x, y, z, 1.0f, 24);
} else {
@ -2540,32 +2496,33 @@ void func_80266B14(void) {
// TODO dumb label required to match, clean up
s32 try_inflict_status(Actor* actor, s32 statusTypeKey, s32 statusKey) {
BattleStatus* battleStatus = &gBattleStatus;
s32 phi_s0;
s32 chance;
s32 duration;
if (battleStatus->statusChance == 0xFE) {
if (battleStatus->statusChance == STATUS_CHANCE_IGNORE_RES) {
duration = battleStatus->statusDuration;
return inflict_status_set_duration(actor, statusTypeKey, statusKey,
duration + lookup_status_duration_mod(actor->statusTable, statusKey));
duration += lookup_status_duration_mod(actor->statusTable, statusKey);
return inflict_status_set_duration(actor, statusTypeKey, statusKey, duration);
}
duration = 0;
if (actor->statusTable != NULL) {
if (!(battleStatus->currentAttackStatus & 0x40000000)) {
phi_s0 = lookup_status_chance(actor->statusTable, statusTypeKey);
if (!(battleStatus->currentAttackStatus & STATUS_FLAG_RIGHT_ON)) {
chance = lookup_status_chance(actor->statusTable, statusTypeKey);
} else {
if (lookup_status_chance(actor->statusTable, statusTypeKey) != 0) {
phi_s0 = 100;
chance = 100;
} else {
goto meow;
}
}
if (phi_s0 > 0) {
phi_s0 = (phi_s0 * battleStatus->statusChance) / 100;
if (phi_s0 > 0 && phi_s0 >= rand_int(100)) {
duration = lookup_status_duration_mod(actor->statusTable, statusKey) + 3;
if (chance > 0) {
chance = (chance * battleStatus->statusChance) / 100;
if (chance > 0 && chance >= rand_int(100)) {
duration = 3;
duration += lookup_status_duration_mod(actor->statusTable, statusKey);
}
}
} else {

View File

@ -175,57 +175,70 @@ void dispatch_event_player_continue_turn(s32 eventType) {
}
}
s32 calc_player_test_enemy(void) {
// Determines whether an attack from the player will hit an enemy or
HitResult calc_player_test_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
s32 currentTargetID = battleStatus->currentTargetID;
s32 targetPart = battleStatus->currentTargetPart;
ActorState* state = &player->state;
s32 targetActorID = battleStatus->currentTargetID;
s32 targetPartIdx = battleStatus->currentTargetPart;
Actor* target;
ActorPart* part;
ActorPart* targetPart;
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
target = get_actor(currentTargetID);
target = get_actor(targetActorID);
if (target == NULL) {
return HIT_RESULT_HIT;
}
part = get_actor_part(target, targetPart);
ASSERT(part != NULL);
targetPart = get_actor_part(target, targetPartIdx);
ASSERT(targetPart != NULL);
if (part->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
return HIT_RESULT_MISS;
} else if (target->transparentStatus == STATUS_TRANSPARENT || ((part->eventFlags & ACTOR_EVENT_FLAG_800) &&
!(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)))
}
if (target->transparentStatus == STATUS_TRANSPARENT
|| (targetPart->eventFlags & ACTOR_EVENT_FLAG_800)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))
{
return HIT_RESULT_MISS;
} else if (target->stoneStatus == STATUS_STONE) {
}
if (target->stoneStatus == STATUS_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_IMMUNE;
} else if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) &&
!player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
{
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_LANDED_ON_SPIKE;
} else if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP)) &&
(part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT) &&
(!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_4) &&
!player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)))
}
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT)
&& (!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)))
{
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_TRIGGERED_EXPLODE;
} else if (player->staticStatus != STATUS_STATIC && target->staticStatus == STATUS_STATIC) {
return HIT_RESULT_BACKFIRE;
}
if (player->staticStatus != STATUS_STATIC && target->staticStatus == STATUS_STATIC) {
return HIT_RESULT_HIT_STATIC;
}
return HIT_RESULT_HIT;
}
s32 calc_player_damage_enemy(void) {
HitResult calc_player_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
s32 currentTargetID = battleStatus->currentTargetID;
@ -234,15 +247,15 @@ s32 calc_player_damage_enemy(void) {
Evt* evt;
Actor* target;
ActorPart* targetPart;
s32 retVal;
s32 hitResult;
s32 currentAttackDamage;
s32 targetDefense;
s32 dispatchEvent;
s32 sp1C;
s32 partImmuneToElement;
s32 sp20;
s32 sp24;
s32 isFireDamage;
s32 isElectricDamage;
s32 isShockDamage;
s32 isWaterDamage;
s32 isIceDamage;
s32 tempBinary;
@ -251,10 +264,11 @@ s32 calc_player_damage_enemy(void) {
sp20 = FALSE;
isFireDamage = FALSE;
isElectricDamage = FALSE;
isWaterDamage = FALSE;
isShockDamage = FALSE;
isIceDamage = FALSE;
tempBinary = FALSE;
sp1C = FALSE;
partImmuneToElement = FALSE;
wasStatusInflicted = FALSE;
sp24 = FALSE;
@ -267,7 +281,7 @@ s32 calc_player_damage_enemy(void) {
state = &player->state;
if (target == NULL) {
return 0;
return HIT_RESULT_HIT;
}
targetPart = get_actor_part(target, currentTargetPartID);
@ -277,8 +291,8 @@ s32 calc_player_damage_enemy(void) {
target->lastDamageTaken = 0;
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
retVal = 2;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
hitResult = HIT_RESULT_NO_DAMAGE;
dispatchEvent = EVENT_ZERO_DAMAGE;
} else {
if (player_team_is_ability_active(player, ABILITY_ICE_POWER)) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)) {
@ -286,61 +300,79 @@ s32 calc_player_damage_enemy(void) {
}
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || (target->transparentStatus == STATUS_TRANSPARENT ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))) {
return 6;
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY
|| (target->transparentStatus == STATUS_TRANSPARENT
|| targetPart->eventFlags & ACTOR_EVENT_FLAG_800
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))
) {
return HIT_RESULT_MISS;
}
if (target->stoneStatus == STATUS_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
return (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) ? 1 : 0;
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (targetPart->partFlags3 & battleStatus->currentAttackElement) {
sp1C = TRUE;
if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
partImmuneToElement = TRUE;
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
{
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) || !(targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) ||
player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)) {
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_8000) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
return -1;
return HIT_RESULT_BACKFIRE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY && !(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_10) &&
!(player_team_is_ability_active(player, ABILITY_FIRE_SHIELD)) && !(player_team_is_ability_active(player, ABILITY_ICE_POWER))) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
&& !(player_team_is_ability_active(player, ABILITY_FIRE_SHIELD))
&& !(player_team_is_ability_active(player, ABILITY_ICE_POWER))
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE &&
targetPart->eventFlags & (ACTOR_EVENT_FLAG_400 | ACTOR_EVENT_FLAG_EXPLOSIVE)) {
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_400 | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
return (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) ? 1 : 0;
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH)) &&
targetPart->eventFlags & ACTOR_EVENT_FLAG_200000 &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_80) && !(player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))) {
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_200000
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
}
} else {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
@ -348,9 +380,9 @@ s32 calc_player_damage_enemy(void) {
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
func_80251474(target);
isElectricDamage = TRUE;
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isShockDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
@ -390,15 +422,15 @@ s32 calc_player_damage_enemy(void) {
}
}
if (!is_ability_active(ABILITY_ZAP_TAP)) {
if (player->staticStatus != STATUS_STATIC && (target->staticStatus == STATUS_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) &&
!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_ELECTRIC)) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)) {
if (!is_ability_active(ABILITY_ZAP_TAP)
&& player->staticStatus != STATUS_STATIC
&& (target->staticStatus == STATUS_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
sp20 = TRUE;
}
}
if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_80000 | ACTOR_EVENT_FLAG_ENCHANTED)) {
battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
@ -520,7 +552,7 @@ s32 calc_player_damage_enemy(void) {
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST &&
targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLOSIVE) {
targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) {
targetDefense = 0;
currentAttackDamage = target->currentHP;
}
@ -557,27 +589,34 @@ s32 calc_player_damage_enemy(void) {
if (currentAttackDamage < 1) {
target->hpChangeCounter = 0;
retVal = 2;
hitResult = HIT_RESULT_NO_DAMAGE;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = (target->currentHP <= 0) ? EVENT_DEATH : EVENT_SCRIPTED_IMMUNE;
if (target->currentHP < 1) {
dispatchEvent = EVENT_DEATH;
} else {
dispatchEvent = EVENT_ZERO_DAMAGE;
}
}
battleStatus->lastAttackDamage = 0;
} else {
target->damageCounter += currentAttackDamage;
dispatchEvent = EVENT_HIT_COMBO;
retVal = 0;
hitResult = HIT_RESULT_HIT;
target->hpChangeCounter -= currentAttackDamage;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000) && !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) && !sp1C &&
!(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
&& !partImmuneToElement
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
) {
target->currentHP -= currentAttackDamage;
if (target->currentHP <= 0) {
if (target->currentHP < 1) {
target->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
@ -589,33 +628,45 @@ s32 calc_player_damage_enemy(void) {
}
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
if (is_ability_active(ABILITY_ZAP_TAP) || player->staticStatus == STATUS_STATIC || (target->staticStatus != STATUS_STATIC &&
!(targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) || battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT ||
battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8 || battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_SCRIPTED_IMMUNE : EVENT_IMMUNE;
if (!is_ability_active(ABILITY_ZAP_TAP)
&& player->staticStatus != STATUS_STATIC
&& (target->staticStatus == STATUS_STATIC || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
} else {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
return (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) ? 1 : 0;
} else {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return -1;
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR &&
rand_int(99) < (target->actorBlueprint->escapeChance * battleStatus->statusChance) / 100 &&
!(target->debuff == STATUS_FEAR ||
target->debuff == STATUS_DIZZY ||
target->debuff == STATUS_PARALYZE ||
target->debuff == STATUS_SLEEP ||
target->debuff == STATUS_FROZEN ||
target->debuff == STATUS_STOP) && !(target->flags & ACTOR_FLAG_400)) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR
&& rand_int(99) < (target->actorBlueprint->escapeChance * battleStatus->statusChance) / 100
&& !(target->debuff == STATUS_FEAR
|| target->debuff == STATUS_DIZZY
|| target->debuff == STATUS_PARALYZE
|| target->debuff == STATUS_SLEEP
|| target->debuff == STATUS_FROZEN
|| target->debuff == STATUS_STOP)
&& !(target->flags & ACTOR_FLAG_400)
) {
dispatch_event_actor(target, EVENT_SCARE_AWAY);
return (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) ? 1 : 0;
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
}
}
@ -625,11 +676,11 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP <= 0) {
if (target->currentHP < 1) {
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
@ -643,8 +694,11 @@ s32 calc_player_damage_enemy(void) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
PlayerData* playerData = &gPlayerData;
if (target->actorBlueprint->spinSmashReq != 255 && playerData->hammerLevel + 1 >= target->actorBlueprint->spinSmashReq &&
battleStatus->lastAttackDamage > 0 && gBattleStatus.flags1 & BS_FLAGS1_40) {
if (target->actorBlueprint->spinSmashReq != 255
&& playerData->hammerLevel + 1 >= target->actorBlueprint->spinSmashReq
&& battleStatus->lastAttackDamage > 0
&& gBattleStatus.flags1 & BS_FLAGS1_40
) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
@ -653,7 +707,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
@ -677,7 +731,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
@ -730,7 +784,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
@ -789,7 +843,7 @@ s32 calc_player_damage_enemy(void) {
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_HIT_COMBO;
}
@ -813,7 +867,7 @@ s32 calc_player_damage_enemy(void) {
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
}
} else if (!sp1C) {
} else if (!partImmuneToElement) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
@ -843,7 +897,6 @@ s32 calc_player_damage_enemy(void) {
}
}
if (sp24) {
func_802667F0(1, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
@ -852,13 +905,12 @@ s32 calc_player_damage_enemy(void) {
func_80266970(target);
}
if (battleStatus->lastAttackDamage > 0 || tempBinary) {
if (!sp1C) {
if ((battleStatus->lastAttackDamage > 0 || tempBinary) && !partImmuneToElement) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isElectricDamage) {
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
@ -866,14 +918,13 @@ s32 calc_player_damage_enemy(void) {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
if (battleStatus->lastAttackDamage <= 0 && !tempBinary && !sp20 || targetPart->flags & ACTOR_PART_FLAG_2000) {
if (battleStatus->lastAttackDamage < 1 && !tempBinary && !sp20 || targetPart->flags & ACTOR_PART_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
evt = start_script((EvtScript*) DoSleepHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoSleepHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -881,7 +932,7 @@ s32 calc_player_damage_enemy(void) {
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
evt = start_script((EvtScript*) DoDizzyHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoDizzyHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -889,7 +940,7 @@ s32 calc_player_damage_enemy(void) {
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
evt = start_script((EvtScript*) DoParalyzeHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoParalyzeHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -897,7 +948,7 @@ s32 calc_player_damage_enemy(void) {
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
evt = start_script((EvtScript*) DoPoisonHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoPoisonHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -905,7 +956,7 @@ s32 calc_player_damage_enemy(void) {
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
evt = start_script((EvtScript*) DoStopHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoStopHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -913,7 +964,7 @@ s32 calc_player_damage_enemy(void) {
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
evt = start_script((EvtScript*) DoFreezeHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoFreezeHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -922,7 +973,7 @@ s32 calc_player_damage_enemy(void) {
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
evt = start_script((EvtScript*) DoShrinkHit, EVT_PRIORITY_A, 0);
evt = start_script(&DoShrinkHit, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
@ -937,27 +988,27 @@ s32 calc_player_damage_enemy(void) {
func_80266ADC(target);
if (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) {
if (retVal == 0) {
retVal = 1;
if (hitResult == HIT_RESULT_HIT) {
hitResult = HIT_RESULT_1;
}
if (retVal == 2) {
retVal = 3;
if (hitResult == HIT_RESULT_NO_DAMAGE) {
hitResult = HIT_RESULT_3;
}
}
if (!is_ability_active(ABILITY_ZAP_TAP)) {
if (player->staticStatus != STATUS_STATIC && (target->staticStatus == STATUS_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) &&
!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_ELECTRIC)) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)) {
if (!is_ability_active(ABILITY_ZAP_TAP)
&& (player->staticStatus != STATUS_STATIC)
&& (target->staticStatus == STATUS_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(player);
apply_shock_effect(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return -1;
}
return HIT_RESULT_BACKFIRE;
}
return retVal;
return hitResult;
}
s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) {
@ -973,7 +1024,7 @@ s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) {
battleStatus->currentAttackDamage = damageAmount;
temp = (s16)damageAmount; // usage of temp here required to match
temp = (s16)damageAmount; //TODO usage of temp here required to match
player->hpChangeCounter += temp;
temp = player->hpChangeCounter;
@ -987,7 +1038,7 @@ s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) {
oldPlayerHP = player->currentHP;
dispatchEvent = event;
if (player->currentHP <= 0) {
if (player->currentHP < 1) {
battleStatus->lastAttackDamage += oldPlayerHP;
player->currentHP = 0;
dispatchEvent = EVENT_DEATH;
@ -998,7 +1049,7 @@ s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
@ -1446,10 +1497,10 @@ ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) {
ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 a0 = *args++;
s32 hitResultOutVar = *args++;
s32 flags;
Actor* target;
s32 temp_v0_2;
HitResult hitResult;
battleStatus->currentAttackElement = *args++;
battleStatus->currentAttackEventSuppression = *args++;
@ -1496,16 +1547,16 @@ ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetID = target->targetActorID;
battleStatus->currentTargetPart = target->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
temp_v0_2 = calc_player_damage_enemy();
if (temp_v0_2 < 0) {
hitResult = calc_player_damage_enemy();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, a0, temp_v0_2);
evt_set_variable(script, hitResultOutVar, hitResult);
if (!does_script_exist_by_ref(script)) {
return ApiStatus_FINISH;
@ -1517,10 +1568,10 @@ ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 a0 = *args++;
s32 hitResultOutVar = *args++;
s32 flags;
Actor* target;
s32 temp_v0_2;
HitResult hitResult;
battleStatus->currentAttackElement = *args++;
battleStatus->currentAttackEventSuppression = *args++;
@ -1567,16 +1618,16 @@ ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetID = target->targetActorID;
battleStatus->currentTargetPart = target->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
temp_v0_2 = calc_player_damage_enemy();
if (temp_v0_2 < 0) {
hitResult = calc_player_damage_enemy();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, a0, temp_v0_2);
evt_set_variable(script, hitResultOutVar, hitResult);
if (!does_script_exist_by_ref(script)) {
return ApiStatus_FINISH;
@ -1588,10 +1639,10 @@ ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 a0 = *args++;
s32 hitResultOutVar = *args++;
s32 flags;
Actor* target;
s32 temp_v0_2;
HitResult hitResult;
battleStatus->currentAttackElement = *args++;
battleStatus->currentAttackEventSuppression = *args++;
@ -1638,16 +1689,16 @@ ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetID = target->targetActorID;
battleStatus->currentTargetPart = target->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
temp_v0_2 = calc_player_test_enemy();
if (temp_v0_2 < 0) {
hitResult = calc_player_test_enemy();
if (hitResult < 0) {
return ApiStatus_FINISH;
}
evt_set_variable(script, a0, temp_v0_2);
evt_set_variable(script, hitResultOutVar, hitResult);
return ApiStatus_DONE2;
}

View File

@ -127,7 +127,7 @@ void dispatch_event_actor(Actor* actor, s32 event) {
}
}
s32 calc_enemy_test_target(Actor* actor) {
HitResult calc_enemy_test_target(Actor* actor) {
PlayerData* playerData = &gPlayerData;
BattleStatus* battleStatus = &gBattleStatus;
s32 targetID = battleStatus->currentTargetID;
@ -181,7 +181,7 @@ s32 calc_enemy_test_target(Actor* actor) {
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
if (battleStatus->cloudNineTurnsLeft) {
if (rand_int(100) < (s8) battleStatus->cloudNineDodgeChance) {
if (rand_int(100) < battleStatus->cloudNineDodgeChance) {
hitResult = HIT_RESULT_MISS;
break;
}
@ -231,7 +231,7 @@ s32 calc_enemy_test_target(Actor* actor) {
return HIT_RESULT_HIT;
}
s32 calc_enemy_damage_target(Actor* attacker) {
HitResult calc_enemy_damage_target(Actor* attacker) {
BattleStatus* battleStatus = &gBattleStatus;
ActorState* state = &attacker->state;
s32 targetID = battleStatus->currentTargetID;
@ -240,12 +240,14 @@ s32 calc_enemy_damage_target(Actor* attacker) {
Actor* target;
ActorPart* targetPart;
s32 hitResult;
s32 t = TRUE;
s32 one = TRUE;
s32 statusInflicted = FALSE;
s32 statusInflicted2 = FALSE;
s32 isFire = FALSE;
s32 isWater = FALSE;
s32 isIce = FALSE;
s32 isElectric = FALSE;
s32 isEnchanted = FALSE;
s32 madeElectricContact = FALSE;
s32 isPlayer;
s32 defense;
s32 event;
@ -281,11 +283,16 @@ s32 calc_enemy_damage_target(Actor* attacker) {
break;
}
// handle defender status
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
return HIT_RESULT_MISS;
}
if (target->transparentStatus == STATUS_TRANSPARENT || targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) {
if (target->transparentStatus == STATUS_TRANSPARENT
|| targetPart->eventFlags & ACTOR_EVENT_FLAG_800
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)
) {
return HIT_RESULT_MISS;
}
@ -296,46 +303,53 @@ s32 calc_enemy_damage_target(Actor* attacker) {
dispatch_event_general(target, EVENT_IMMUNE);
return HIT_RESULT_HIT;
}
// handle attack element
if (battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLOSIVE)) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
do {
play_hit_sound(attacker, state->goalPos.x, state->goalPos.y, state->goalPos.z, 3);
} while (0); // TODO ?
} while (0); // TODO required to match
dispatch_event_general(target, EVENT_EXPLODE_TRIGGER);
return HIT_RESULT_TRIGGERED_EXPLODE;
return HIT_RESULT_BACKFIRE;
}
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE) && (target->flags & ACTOR_FLAG_FLYING)) {
play_hit_sound(attacker, state->goalPos.x, state->goalPos.y, state->goalPos.z, 1);
return HIT_RESULT_QUAKE_IMMUNE;
return HIT_RESULT_NO_DAMAGE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18);
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isFire = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
func_80251474(target);
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isElectric = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18);
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWater = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
isIce = TRUE;
}
if (!(attacker->staticStatus == STATUS_STATIC)) {
if ((target->staticStatus == STATUS_STATIC) || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) {
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT))) {
if (!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)) {
if (!has_enchanted_part(attacker)) {
isEnchanted = TRUE;
if (!(attacker->staticStatus == STATUS_STATIC)
&& ((target->staticStatus == STATUS_STATIC) || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& !has_enchanted_part(attacker)) // enchanted attacks ignore electrified defenders
{
madeElectricContact = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
}
}
}
}
}
// begin calulating damage
gBattleStatus.flags1 &= ~BS_FLAGS1_ATK_BLOCKED;
defense = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);
@ -384,7 +398,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (damage > 99) {
damage = 99;
}
if (damage <= 0) {
if (damage < 1) {
defense = 0;
}
@ -453,16 +467,18 @@ s32 calc_enemy_damage_target(Actor* attacker) {
func_80266970(target);
}
// deal damage and determine resulting battle event
event = EVENT_HIT_COMBO;
if (damage <= 0) {
if (damage < 1) {
target->hpChangeCounter = 0;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
hitResult = HIT_RESULT_QUAKE_IMMUNE;
event = EVENT_SCRIPTED_IMMUNE;
hitResult = HIT_RESULT_NO_DAMAGE;
event = EVENT_ZERO_DAMAGE;
} else {
hitResult = HIT_RESULT_QUAKE_IMMUNE;
event = EVENT_SCRIPTED_IMMUNE;
if (target->currentHP <= 0) {
hitResult = HIT_RESULT_NO_DAMAGE;
event = EVENT_ZERO_DAMAGE;
if (target->currentHP < 1) {
event = EVENT_DEATH;
}
}
@ -472,18 +488,18 @@ s32 calc_enemy_damage_target(Actor* attacker) {
target->hpChangeCounter -= damage;
battleStatus->lastAttackDamage = 0;
hitResult = HIT_RESULT_HIT;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)) {
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
) {
if (!(target->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
target->currentHP -= damage;
}
if (target->currentHP <= 0) {
if (target->currentHP < 1) {
target->currentHP = 0;
event = EVENT_DEATH;
}
}
}
battleStatus->lastAttackDamage += damage;
target->lastDamageTaken = battleStatus->lastAttackDamage;
target->hpChangeCounter = 0;
@ -498,10 +514,10 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_HIT;
}
if (event == EVENT_SCRIPTED_IMMUNE) {
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_IMMUNE;
}
if (target->currentHP <= 0 && event == EVENT_IMMUNE) {
if (target->currentHP < 1 && event == EVENT_IMMUNE) {
event = EVENT_DEATH;
}
} else if (event == EVENT_DEATH) {
@ -512,9 +528,10 @@ s32 calc_enemy_damage_target(Actor* attacker) {
func_80266E14(targetPart);
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_JUMP)) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE) {
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_JUMP))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)
) {
if (event == EVENT_HIT) {
event = EVENT_FLIP_TRIGGER;
}
@ -522,24 +539,22 @@ s32 calc_enemy_damage_target(Actor* attacker) {
event = EVENT_FLIP_TRIGGER;
}
}
}
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_JUMP)) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_JUMP))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)
) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_FLIP_TRIGGER;
}
if (event == EVENT_SCRIPTED_IMMUNE) {
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_FLIP_TRIGGER;
}
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_4000)) {
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_4000))
) {
if (event == EVENT_HIT) {
event = EVENT_BURN_HIT;
}
@ -548,7 +563,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
}
isFire = TRUE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED) {
if (event == EVENT_HIT_COMBO) {
@ -557,7 +572,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (event == EVENT_HIT) {
event = EVENT_BLOCK;
}
if (event == EVENT_SCRIPTED_IMMUNE) {
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_18;
}
if (event == EVENT_IMMUNE) {
@ -568,66 +583,71 @@ s32 calc_enemy_damage_target(Actor* attacker) {
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->lastAttackDamage >= 0 && event != EVENT_DEATH && event != EVENT_SPIN_SMASH_DEATH) {
if (event != EVENT_EXPLODE_TRIGGER) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_1000000)) {
if (actorClass != ACTOR_PLAYER || !is_ability_active(ABILITY_HEALTHY_HEALTHY) || !(rand_int(100) < 50)) {
// try inflicting status effect
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->lastAttackDamage >= 0
&& event != EVENT_DEATH
&& event != EVENT_SPIN_SMASH_DEATH
&& event != EVENT_EXPLODE_TRIGGER
&& !(gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED)
&& !(gBattleStatus.flags2 & BS_FLAGS2_1000000)
&& !(actorClass == ACTOR_PLAYER && is_ability_active(ABILITY_HEALTHY_HEALTHY) && (rand_int(100) < 50)))
{
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && try_inflict_status(target, STATUS_SHRINK, STATUS_SHRINK_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && try_inflict_status(target, STATUS_POISON, STATUS_POISON_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STONE && try_inflict_status(target, STATUS_STONE, STATUS_STONE_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && try_inflict_status(target, STATUS_SLEEP, STATUS_SLEEP_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && try_inflict_status(target, STATUS_DIZZY, STATUS_DIZZY_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && try_inflict_status(target, STATUS_STOP, STATUS_STOP_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STATIC && try_inflict_status(target, STATUS_STATIC, STATUS_STATIC_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && try_inflict_status(target, STATUS_PARALYZE, STATUS_PARALYZE_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FEAR && try_inflict_status(target, STATUS_FEAR, STATUS_FEAR_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
// BUG? repeated paralyze and dizzy infliction
// @bug? repeated paralyze and dizzy infliction
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && try_inflict_status(target, STATUS_PARALYZE, STATUS_PARALYZE_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && try_inflict_status(target, STATUS_DIZZY, STATUS_DIZZY_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && target->debuff != STATUS_FROZEN && try_inflict_status(target, STATUS_FROZEN, STATUS_FROZEN_TURN_MOD)) {
statusInflicted = t;
statusInflicted2 = t;
statusInflicted = one;
statusInflicted2 = one;
}
if (statusInflicted) {
if (event == EVENT_SCRIPTED_IMMUNE) {
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_HIT_COMBO;
}
if (event == EVENT_IMMUNE) {
@ -635,11 +655,8 @@ s32 calc_enemy_damage_target(Actor* attacker) {
}
}
}
}
}
}
}
}
// dispatch events and play damage effects
battleStatus->wasStatusInflicted = statusInflicted;
@ -655,11 +672,14 @@ s32 calc_enemy_damage_target(Actor* attacker) {
break;
}
if (actorClass == ACTOR_CLASS_PARTNER) {
if (battleStatus->lastAttackDamage > 0 && gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && !(target->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
if (actorClass == ACTOR_CLASS_PARTNER
&& battleStatus->lastAttackDamage > 0
&& gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& !(target->flags & ACTOR_FLAG_NO_DMG_APPLY))
{
inflict_partner_ko(target, STATUS_DAZE, battleStatus->lastAttackDamage);
}
}
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
@ -714,7 +734,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
play_hit_sound(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, hitSound);
}
if ((battleStatus->lastAttackDamage <= 0 && !statusInflicted2 && !isEnchanted) || targetPart->flags & ACTOR_PART_FLAG_2000) {
if ((battleStatus->lastAttackDamage < 1 && !statusInflicted2 && !madeElectricContact) || targetPart->flags & ACTOR_PART_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
@ -775,20 +795,17 @@ s32 calc_enemy_damage_target(Actor* attacker) {
}
func_80266ADC(target);
if ((
attacker->staticStatus != STATUS_STATIC
&& (target->staticStatus == STATUS_STATIC || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
)
if (attacker->staticStatus != STATUS_STATIC
&& (target->staticStatus == STATUS_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& (attacker->transparentStatus != STATUS_TRANSPARENT)
&& !has_enchanted_part(attacker)
) {
// enum mismatch? shock vs explode :raised_eyebrow:
&& !has_enchanted_part(attacker))
{
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(attacker);
apply_shock_effect(attacker);
dispatch_damage_event_actor_1(attacker, 1, EVENT_SHOCK_HIT);
return HIT_RESULT_TRIGGERED_EXPLODE;
return HIT_RESULT_BACKFIRE;
}
return hitResult;
@ -827,7 +844,7 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
}
@ -2678,46 +2695,46 @@ ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partIndex;
u32* var2;
s32 partIdx;
u32* table;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
var2 = (u32*) evt_get_variable(script, *args++);
get_actor_part(get_actor(actorID), partIndex)->defenseTable = var2;
partIdx = evt_get_variable(script, *args++);
table = (u32*) evt_get_variable(script, *args++);
get_actor_part(get_actor(actorID), partIdx)->defenseTable = table;
return ApiStatus_DONE2;
}
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
u32* var1;
u32* table;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
var1 = (u32*) evt_get_variable(script, *args++);
get_actor(actorID)->statusTable = var1;
table = (u32*) evt_get_variable(script, *args++);
get_actor(actorID)->statusTable = table;
return ApiStatus_DONE2;
}
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partIndex;
s32 partIdx;
u32* var2;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
partIdx = evt_get_variable(script, *args++);
var2 = (u32*) evt_get_variable(script, *args++);
get_actor_part(get_actor(actorID), partIndex)->idleAnimations = var2;
get_actor_part(get_actor(actorID), partIdx)->idleAnimations = var2;
return ApiStatus_DONE2;
}
@ -2747,7 +2764,6 @@ ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
Actor* actor;
s32 outVar;
s32 hitResult;
u8 attackStatus;
s32 battleStatusFlags1Temp;
s32 battleFlagsModifier;
@ -2763,7 +2779,7 @@ ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
battleFlagsModifier = *args++;
if (battleFlagsModifier & 0x10) {
if (battleFlagsModifier & BS_FLAGS1_10) {
gBattleStatus.flags1 |= BS_FLAGS1_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (battleFlagsModifier & BS_FLAGS1_SP_EVT_ACTIVE) {
@ -2790,19 +2806,16 @@ ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
attackStatus = battleStatus->currentAttackStatus;
battleStatus->currentTargetID = actor->targetActorID;
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = attackStatus;
if ((attackStatus & 0xFF) == 0xFF) {
battleStatus->statusChance = battleStatus->currentAttackStatus & 0xFF;
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
hitResult = calc_enemy_damage_target(actor);
hitResult = calc_enemy_damage_target(actor);
if (hitResult < 0) {
return ApiStatus_FINISH;
}
@ -2835,7 +2848,7 @@ ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = battleStatus->currentAttackStatus;
if (battleStatus->statusChance == 0xFF) {
if (battleStatus->statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}

View File

@ -3,7 +3,6 @@
#include "script_api/battle.h"
#include "effects.h"
s32 calc_partner_damage_enemy(void);
s32 dispatch_damage_event_partner_1(s32, s32);
void dispatch_event_partner(s32 lastEventType) {
@ -47,7 +46,7 @@ void dispatch_event_partner_continue_turn(s8 lastEventType) {
}
}
s32 calc_partner_test_enemy(void) {
HitResult calc_partner_test_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
s32 currentTargetID = battleStatus->currentTargetID;
@ -60,107 +59,117 @@ s32 calc_partner_test_enemy(void) {
battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
target = get_actor(currentTargetID);
state = &partner->state;
if (target != NULL) {
if (target == NULL) {
return HIT_RESULT_HIT;
}
part = get_actor_part(target, currentTargetPart);
ASSERT(part != NULL);
if (target->stoneStatus == STATUS_STONE) {
return 8;
return HIT_RESULT_IMMUNE;
}
if ((part->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) || target->transparentStatus == STATUS_TRANSPARENT) {
return 6;
return HIT_RESULT_MISS;
}
// TODO not sure about the flags2
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) &&
(part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) &&
!(target->flags2 & ACTOR_FLAG_HP_OFFSET_BELOW))
{
// check partner jumping on top-spiky enemy (cannot be suppressed)
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)
&& (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !(target->flags2 & ACTOR_FLAG_HP_OFFSET_BELOW)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return 4;
return HIT_RESULT_LANDED_ON_SPIKE;
}
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP)) &&
(part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_4) &&
!player_team_is_ability_active(partner, ABILITY_SPIKE_SHIELD))
{
// check partner contacting front-spiky enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP))
&& (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
&& !player_team_is_ability_active(partner, ABILITY_SPIKE_SHIELD)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH)) &&
(part->eventFlags & ACTOR_EVENT_FLAG_FIREY) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_10))
{
// check partner contacting fiery enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))
&& (part->eventFlags & ACTOR_EVENT_FLAG_FIREY)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
// specifal handling for air lift
if (battleStatus->currentAttackElement & DAMAGE_TYPE_AIR_LIFT) {
// check partner airlifting top-spiky enemy
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)) {
if ((part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) &&
!(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_1))
{
if ((part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_TOP)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) &&
(part->eventFlags & ACTOR_EVENT_FLAG_200000) &&
!(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_80))
{
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& (part->eventFlags & ACTOR_EVENT_FLAG_200000)
&& !(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
}
// check partner airlifting electrified enemy
if (partner->staticStatus != STATUS_STATIC &&
(target->staticStatus == STATUS_STATIC || (part->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) &&
!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8))
!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT))
{
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(partner);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return -1;
return HIT_RESULT_BACKFIRE;
}
// check partner airlifting fiery enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH)) &&
(part->eventFlags & ACTOR_EVENT_FLAG_FIREY) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_10))
!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT))
{
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return -1;
return HIT_RESULT_BACKFIRE;
}
dispatch_event_actor(target, EVENT_BEGIN_AIR_LIFT);
}
}
return 0;
return HIT_RESULT_HIT;
}
s32 calc_partner_damage_enemy(void) {
HitResult calc_partner_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
s32 currentTargetID = battleStatus->currentTargetID;
s32 currentTargetPartID = battleStatus->currentTargetPart;
s32 retVal;
s32 sp2C = FALSE;
s32 partImmuneToElement = FALSE;
s32 isFireDamage = FALSE;
s32 isElectricDamage = FALSE;
s32 isWaterDamage = FALSE;
s32 isShockDamage = FALSE;
s32 isIceDamage = FALSE;
s32 tempBinary = FALSE;
s32 wasStatusInflicted = FALSE;
@ -181,7 +190,7 @@ s32 calc_partner_damage_enemy(void) {
state = &partner->state;
if (target == NULL) {
return 0;
return HIT_RESULT_HIT;
}
targetPart = get_actor_part(target, currentTargetPartID);
@ -192,102 +201,159 @@ s32 calc_partner_damage_enemy(void) {
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
retVal = 2;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || target->transparentStatus == STATUS_TRANSPARENT ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) {
return 6;
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY
|| target->transparentStatus == STATUS_TRANSPARENT
|| (targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))
) {
return HIT_RESULT_MISS;
}
if (target->stoneStatus == STATUS_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
return (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) ? 1 : 0;
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (targetPart->partFlags3 & battleStatus->currentAttackElement) {
sp2C = 1;
if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
partImmuneToElement = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP && targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) {
// check jumping on spiky enemy
if (battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
} else if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && targetPart->eventFlags & ACTOR_EVENT_FLAG_8000) {
return HIT_RESULT_BACKFIRE;
}
// check explode on contact
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT
) {
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_2)) {
if (!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_EXPLODE_CONTACT)) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
return -1;
return HIT_RESULT_BACKFIRE;
}
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) ? 1 : 0;
} else if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH)) &&
targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY && !(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_10)) {
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
// check touching fiery enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return -1;
} else if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP)) &&
targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT && !(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_4)) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
} else if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE &&
targetPart->eventFlags & (ACTOR_EVENT_FLAG_400 | ACTOR_EVENT_FLAG_EXPLOSIVE)) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
return (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) ? 1 : 0;
} else if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && targetPart->eventFlags & ACTOR_EVENT_FLAG_200000 &&
!(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW) && !(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_80)) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
} else if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP &&
!(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW) && !(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_1)) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return -1;
} else if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE &&
targetPart->eventFlags & (ACTOR_EVENT_FLAG_400 | ACTOR_EVENT_FLAG_EXPLOSIVE)) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
return (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) ? 1 : 0;
return HIT_RESULT_BACKFIRE;
}
// check touching spiky-front enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// check explode on ignition
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_400 | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
// unknown alternate spiky #1
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_200000
&& !(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// unknown alternate spiky top
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP
&& !(target->flags & ACTOR_FLAG_HP_OFFSET_BELOW)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_TOP)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// check explode on ignition (duplicate of previous check)
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_400 | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
// check shock contact for airlift
if (battleStatus->currentAttackElement & DAMAGE_TYPE_AIR_LIFT) {
if (partner->staticStatus != STATUS_STATIC && (target->staticStatus == STATUS_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)) {
if (partner->staticStatus != STATUS_STATIC
&& (target->staticStatus == STATUS_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(partner);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return -1;
return HIT_RESULT_BACKFIRE;
}
return 0;
return HIT_RESULT_HIT;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18);
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
func_80251474(target);
isElectricDamage = TRUE;
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isShockDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18);
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWaterDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
@ -295,10 +361,11 @@ s32 calc_partner_damage_enemy(void) {
isIceDamage = TRUE;
}
if (partner->staticStatus != STATUS_STATIC && (target->staticStatus == STATUS_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) &&
!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_ELECTRIC)) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)) {
if (partner->staticStatus != STATUS_STATIC
&& (target->staticStatus == STATUS_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
}
@ -315,13 +382,13 @@ s32 calc_partner_damage_enemy(void) {
damageDealt = battleStatus->currentAttackDamage + partner->attackBoost;
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLOSIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
) {
statusChanceOrDefense = 0;
damageDealt = target->currentHP;
}
}
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) {
statusChanceOrDefense = 0;
@ -368,11 +435,15 @@ s32 calc_partner_damage_enemy(void) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
retVal = 2;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
retVal = 2;
dispatchEvent = (target->currentHP <= 0) ? EVENT_DEATH : EVENT_SCRIPTED_IMMUNE;
if (target->currentHP < 1) {
dispatchEvent = EVENT_DEATH;
} else {
dispatchEvent = EVENT_ZERO_DAMAGE;
}
}
battleStatus->lastAttackDamage = 0;
@ -383,10 +454,10 @@ s32 calc_partner_damage_enemy(void) {
dispatchEvent = EVENT_HIT_COMBO;
retVal = 0;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000) && !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) && !sp2C && !(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
if (!(targetPart->flags & ACTOR_PART_FLAG_2000) && !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) && !partImmuneToElement && !(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
target->currentHP -= damageDealt;
if (target->currentHP <= 0) {
if (target->currentHP < 1) {
target->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
@ -398,20 +469,25 @@ s32 calc_partner_damage_enemy(void) {
}
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
if (partner->staticStatus == STATUS_STATIC || (target->staticStatus != STATUS_STATIC &&
!(targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) || battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT ||
battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_SCRIPTED_IMMUNE : EVENT_IMMUNE;
if (partner->staticStatus == STATUS_STATIC
|| !(target->staticStatus == STATUS_STATIC || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
|| battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT
|| battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT
) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
return (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) ? 1 : 0;
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(partner);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return -1;
return HIT_RESULT_BACKFIRE;
}
}
@ -420,11 +496,11 @@ s32 calc_partner_damage_enemy(void) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP <= 0) {
if (target->currentHP < 1) {
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
@ -457,7 +533,7 @@ s32 calc_partner_damage_enemy(void) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
@ -502,13 +578,15 @@ s32 calc_partner_damage_enemy(void) {
}
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) && battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP &&
targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
@ -517,8 +595,10 @@ s32 calc_partner_damage_enemy(void) {
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST && targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLOSIVE) {
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
) {
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_EXPLODE_TRIGGER;
}
@ -549,9 +629,13 @@ s32 calc_partner_damage_enemy(void) {
}
do { // TODO remove this do while
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->lastAttackDamage >= 0 && dispatchEvent != EVENT_DEATH &&
dispatchEvent != EVENT_SPIN_SMASH_DEATH &&
dispatchEvent != EVENT_EXPLODE_TRIGGER && !(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->lastAttackDamage >= 0
&& dispatchEvent != EVENT_DEATH
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
&& dispatchEvent != EVENT_EXPLODE_TRIGGER
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
) {
#define INFLICT_STATUS(STATUS_TYPE) \
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
try_inflict_status(target, STATUS_##STATUS_TYPE, STATUS_##STATUS_TYPE##_TURN_MOD)) { \
@ -581,12 +665,14 @@ s32 calc_partner_damage_enemy(void) {
if (battleStatus->currentAttackStatus & STATUS_FLAG_400000) {
if (rand_int(99) < statusChanceOrDefense) {
if (!(target->debuff == STATUS_FEAR ||
target->debuff == STATUS_DIZZY ||
target->debuff == STATUS_PARALYZE ||
target->debuff == STATUS_SLEEP ||
target->debuff == STATUS_FROZEN ||
target->debuff == STATUS_STOP) && !(target->flags & ACTOR_FLAG_400)) {
if (!(target->debuff == STATUS_FEAR
|| target->debuff == STATUS_DIZZY
|| target->debuff == STATUS_PARALYZE
|| target->debuff == STATUS_SLEEP
|| target->debuff == STATUS_FROZEN
|| target->debuff == STATUS_STOP)
&& !(target->flags & ACTOR_FLAG_400)
) {
dispatchEvent = EVENT_SCARE_AWAY;
wasStatusInflicted = TRUE;
retVal = 0;
@ -604,7 +690,7 @@ s32 calc_partner_damage_enemy(void) {
}
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_HIT_COMBO;
}
@ -615,7 +701,6 @@ s32 calc_partner_damage_enemy(void) {
}
} while (0);
}
}
statusChanceOrDefense = target->actorBlueprint->spookChance;
statusChanceOrDefense = (battleStatus->statusChance * statusChanceOrDefense) / 100;
@ -651,12 +736,10 @@ s32 calc_partner_damage_enemy(void) {
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
if (battleStatus->lastAttackDamage == 0) {
if (!tempBinary) {
if (!wasStatusInflicted) {
if (!tempBinary && !wasStatusInflicted) {
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
}
} else if (!sp2C) {
} else if (!partImmuneToElement) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
@ -688,7 +771,7 @@ s32 calc_partner_damage_enemy(void) {
}
if (battleStatus->lastAttackDamage > 0) {
if (sp2C == 0) {
if (partImmuneToElement == 0) {
if (partner->actorTypeData1[5] != 0) {
sfx_play_sound_at_position(partner->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
@ -697,7 +780,7 @@ s32 calc_partner_damage_enemy(void) {
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isElectricDamage) {
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
@ -707,7 +790,10 @@ s32 calc_partner_damage_enemy(void) {
}
}
if (battleStatus->lastAttackDamage <= 0 && !tempBinary && !wasStatusInflicted || targetPart->flags & ACTOR_PART_FLAG_2000) {
if (battleStatus->lastAttackDamage < 1
&& !(tempBinary || wasStatusInflicted)
|| targetPart->flags & ACTOR_PART_FLAG_2000
) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
@ -787,9 +873,9 @@ s32 calc_partner_damage_enemy(void) {
if (partner->staticStatus != STATUS_STATIC && (target->staticStatus == STATUS_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) &&
!(battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8)) {
!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_80251474(partner);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return -1;
}
@ -819,7 +905,7 @@ s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) {
oldHP = partner->currentHP;
if (partner->currentHP <= 0) {
if (partner->currentHP < 1) {
event = EVENT_DEATH;
battleStatus->lastAttackDamage += oldHP;
partner->currentHP = 0;
@ -832,7 +918,7 @@ s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_HIT;
}
if (event == EVENT_SCRIPTED_IMMUNE) {
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_IMMUNE;
}
}
@ -1000,7 +1086,7 @@ ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = enemy->targetPartIndex;
battleStatus->statusChance = statusChance;
if (statusChance == 0xFF) {
if (statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
@ -1077,7 +1163,7 @@ ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = statusChance;
if (statusChance == 0xFF) {
if (statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
@ -1153,7 +1239,7 @@ ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = actor->targetPartIndex;
battleStatus->statusChance = statusChance;
if (statusChance == 0xFF) {
if (statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}
@ -1234,7 +1320,7 @@ ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
battleStatus->currentTargetPart = enemy->targetPartIndex;
battleStatus->statusChance = statusChance;
if (statusChance == 0xFF) {
if (statusChance == STATUS_CHANCE_NEVER) {
battleStatus->statusChance = 0;
}

View File

@ -1773,7 +1773,7 @@ EvtScript D_8029B494 = {
EVT_GOTO(1)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_GOTO(1)
EVT_LABEL(10)
EVT_CHILD_THREAD

View File

@ -1181,15 +1181,15 @@ s32 btl_submenu_moves_update(void) {
moveX = 20;
moveY = BattleMenu_Moves_PosY;
set_window_properties(8, moveX, 186, 280, 32, 20, func_802A4494, NULL, -1);
set_window_update(WINDOW_ID_1, 1);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 1);
set_window_update(WINDOW_ID_3, 1);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_4, 1);
set_window_update(WINDOW_ID_5, 1);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW);
}
set_window_update(WINDOW_ID_8, 1);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
do {
cond = FALSE;
@ -1299,15 +1299,15 @@ s32 btl_submenu_moves_update(void) {
hud_element_set_script(BattleMenu_Moves_CursorID, &HES_HandPointer);
BattleMenu_Moves_TextColor = MSG_PAL_0D;
set_window_update(WINDOW_ID_1, 4);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_DARKENED);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 4);
set_window_update(WINDOW_ID_3, 4);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_DARKENED);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_DARKENED);
} else {
set_window_update(WINDOW_ID_4, 4);
set_window_update(WINDOW_ID_5, 4);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_DARKENED);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_DARKENED);
}
set_window_update(WINDOW_ID_8, 2);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
status_menu_stop_blinking_fp();
} else {
@ -1323,15 +1323,15 @@ s32 btl_submenu_moves_update(void) {
}
return 255;
case BTL_SUBMENU_MOVES_STATE_UNK_A:
set_window_update(WINDOW_ID_1, 2);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 2);
set_window_update(WINDOW_ID_3, 2);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE);
} else {
set_window_update(WINDOW_ID_4, 2);
set_window_update(WINDOW_ID_5, 2);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE);
}
set_window_update(WINDOW_ID_8, 2);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
status_menu_stop_blinking_fp();
} else {
@ -1344,28 +1344,28 @@ s32 btl_submenu_moves_update(void) {
battle_menu_moveOptionActive = battle_menu_moveCursorPos;
return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1;
case BTL_SUBMENU_MOVES_STATE_UNK_14:
set_window_update(WINDOW_ID_1, 1);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 1);
set_window_update(WINDOW_ID_3, 1);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_4, 1);
set_window_update(WINDOW_ID_5, 1);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW);
}
set_window_update(WINDOW_ID_8, 1);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1;
battle_menu_moveOptionActive = battle_menu_moveCursorPos;
return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1;
case BTL_SUBMENU_MOVES_STATE_UNK_1E:
set_window_update(WINDOW_ID_1, 9);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_9);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 9);
set_window_update(WINDOW_ID_3, 9);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_9);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_9);
} else {
set_window_update(WINDOW_ID_4, 9);
set_window_update(WINDOW_ID_5, 9);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_9);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_9);
}
set_window_update(WINDOW_ID_8, 2);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_ONE;
break;
case BTL_SUBMENU_MOVES_STATE_UNK_28:
@ -1373,15 +1373,15 @@ s32 btl_submenu_moves_update(void) {
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_29;
return -1;
case BTL_SUBMENU_MOVES_STATE_UNK_29:
set_window_update(WINDOW_ID_1, 2);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 2);
set_window_update(WINDOW_ID_3, 2);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE);
} else {
set_window_update(WINDOW_ID_4, 2);
set_window_update(WINDOW_ID_5, 2);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE);
}
set_window_update(WINDOW_ID_8, 2);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
msgID = MSG_Menus_Battle_CantSelectNow;
if (D_802AD258 == 0) {
@ -1395,7 +1395,7 @@ s32 btl_submenu_moves_update(void) {
msgWidth = get_msg_width(msgID, 0) + 23;
moveX = (SCREEN_WIDTH / 2) - (msgWidth / 2);
set_window_properties(9, moveX, 80, msgWidth, D_802AB340[get_msg_lines(msgID) - 1], 20, func_802A4534, NULL, -1);
set_window_update(WINDOW_ID_9, 1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
D_802AD10B = 60;
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_2A;
return -1;
@ -1407,16 +1407,16 @@ s32 btl_submenu_moves_update(void) {
D_802AD10B--;
return -1;
}
set_window_update(WINDOW_ID_9, 2);
set_window_update(WINDOW_ID_1, 1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, 1);
set_window_update(WINDOW_ID_3, 1);
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_4, 1);
set_window_update(WINDOW_ID_5, 1);
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW);
}
set_window_update(WINDOW_ID_8, 1);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1;
break;
}
@ -1930,8 +1930,8 @@ s32 func_802A4A54(void) {
break;
}
width = get_msg_width(msgID, 0) + 23;
set_window_properties(WINDOW_ID_9, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, func_802A57C8, NULL, -1);
set_window_update(WINDOW_ID_9, 1);
set_window_properties(WINDOW_ID_BATTLE_POPUP, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, func_802A57C8, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
D_802AD612 = 60;
BattleSubmenuStratsState = 42;
return -1;
@ -1943,7 +1943,7 @@ s32 func_802A4A54(void) {
D_802AD612--;
return -1;
}
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);

View File

@ -635,7 +635,7 @@ Npc* peach_make_disguise_npc(s32 peachDisguise) {
bpPtr->onUpdate = NULL;
bpPtr->onRender = NULL;
PeachDisguiseNpcIndex = _create_npc_standard(bpPtr, PeachDisguiseExtraAnims[playerStatus->peachDisguise]);
PeachDisguiseNpcIndex = create_standard_npc(bpPtr, PeachDisguiseExtraAnims[playerStatus->peachDisguise]);
npc = get_npc_by_index(PeachDisguiseNpcIndex);
disable_npc_shadow(npc);

View File

@ -113,7 +113,7 @@ void hide_popup_menu(void) {
set_window_update(WINDOW_ID_14, (s32) basic_hidden_window_update);
break;
}
set_window_update(WINDOW_ID_21, 2);
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE);
} else {
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
@ -127,13 +127,13 @@ void hide_popup_menu(void) {
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, 2);
set_window_update(WINDOW_ID_19, 2);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, 2);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
break;
}
}
@ -235,18 +235,18 @@ void func_800F16CC(void) {
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, 1);
set_window_update(WINDOW_ID_19, 1);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
set_window_update(WINDOW_ID_14, 1);
set_window_update(WINDOW_ID_19, 1);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, 1);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
break;
}
}
@ -849,8 +849,8 @@ s32 popup_menu_update(void) {
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE);
}
width = get_msg_width(MSG_Menus_006B, 0) + 23;
set_window_properties(WINDOW_ID_9, 160 - (width / 2), 0x50, width, 0x28, 0x14, func_800F4CF0, NULL, -1);
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_SHOW);
set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), 0x50, width, 0x28, 0x14, func_800F4CF0, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
D_8010D644 = 0x3C;
D_8010D640 = 0x20;
return 0;
@ -862,7 +862,7 @@ s32 popup_menu_update(void) {
D_8010D644--;
return 0;
}
set_window_update(WINDOW_ID_9, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
if (D_8010D68E) {

View File

@ -1869,7 +1869,7 @@ ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_8026D51C(Evt* script, s32 isInitialCall) {
ApiStatus SetPartImmunityFlags(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
@ -1883,16 +1883,17 @@ ApiStatus func_8026D51C(Evt* script, s32 isInitialCall) {
partIndex = evt_get_variable(script, *args++);
flagBits = *args++;
get_actor_part(get_actor(actorID), partIndex)->partFlags3 = flagBits;
get_actor_part(get_actor(actorID), partIndex)->elementalImmunities = flagBits;
return ApiStatus_DONE2;
}
ApiStatus func_8026D5A4(Evt* script, s32 isInitialCall) {
ApiStatus SetPartImmunityBits(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
Actor* actor;
ActorPart* actorPart;
s32 partIndex;
s32 partIdx;
s32 flagBits;
s32 mode;
@ -1900,16 +1901,17 @@ ApiStatus func_8026D5A4(Evt* script, s32 isInitialCall) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
partIdx = evt_get_variable(script, *args++);
flagBits = *args++;
mode = evt_get_variable(script, *args++);
actorPart = get_actor_part(get_actor(actorID), partIndex);
actor = get_actor(actorID);
actorPart = get_actor_part(actor, partIdx);
if (mode != 0) {
actorPart->partFlags3 |= flagBits;
actorPart->elementalImmunities |= flagBits;
} else {
actorPart->partFlags3 &= ~flagBits;
actorPart->elementalImmunities &= ~flagBits;
}
return ApiStatus_DONE2;
@ -3117,7 +3119,7 @@ ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall) {
actorID = script->owner1.actorID;
}
func_80251474(get_actor(actorID));
apply_shock_effect(get_actor(actorID));
return ApiStatus_DONE2;
}

View File

@ -68,7 +68,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_alpha(id, 0xFF);
hud_element_set_alpha(id, 255);
return ApiStatus_DONE2;
}

View File

@ -253,7 +253,7 @@ EvtScript N(80220DC0) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
@ -461,7 +461,7 @@ EvtScript N(handleEvent_80222140) = {
EVT_CASE_FLAG(DAMAGE_TYPE_BLAST)
EVT_EXEC_WAIT(N(80221DE0))
EVT_CASE_DEFAULT
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 1)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
@ -474,7 +474,7 @@ EvtScript N(handleEvent_80222140) = {
EVT_SET_CONST(LVar2, -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_END_IF
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, 0)
EVT_END_SWITCH
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
@ -591,7 +591,7 @@ EvtScript N(handleEvent_80222140) = {
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
@ -804,7 +804,7 @@ EvtScript N(80223310) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 15)

View File

@ -326,7 +326,7 @@ EvtScript N(8021B678) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_THREAD
@ -598,7 +598,7 @@ EvtScript N(handleEvent_8021C9C4) = {
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
@ -741,7 +741,7 @@ EvtScript N(takeTurn_8021D1DC) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
@ -1000,7 +1000,7 @@ EvtScript N(8021E218) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
EVT_SET(LVar0, 80)
@ -1264,7 +1264,7 @@ EvtScript N(handleEvent_8021F41C) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -1452,7 +1452,7 @@ EvtScript N(takeTurn_8021FE6C) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)

View File

@ -234,7 +234,7 @@ EvtScript N(802189D4) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
EVT_SET(LVar0, 80)
@ -498,7 +498,7 @@ EvtScript N(handleEvent_80219BD8) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -686,7 +686,7 @@ EvtScript N(takeTurn_8021A628) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)

View File

@ -207,7 +207,7 @@ EvtScript N(handleEvent_802260D0) = {
EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80225FD4))
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -336,7 +336,7 @@ EvtScript N(80226558) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_WAIT(30)
EVT_SET(LVar1, 7012353)
EVT_EXEC_WAIT(N(80225F8C))
@ -443,7 +443,7 @@ EvtScript N(80226B88) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)
EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK)
EVT_GOTO(1)

View File

@ -227,7 +227,7 @@ EvtScript N(handleEvent_80224038) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TubbasHeart_Anim03)
EVT_EXEC_WAIT(N(802244DC))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET(LVar1, 7077889)
@ -449,7 +449,7 @@ EvtScript N(80224B3C) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TubbasHeart_Anim01)

View File

@ -249,7 +249,7 @@ EvtScript N(handleEvent_80219338) = {
EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80219238))
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_EXEC_WAIT(N(802192E0))
@ -454,7 +454,7 @@ EvtScript N(80219D88) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleTubba_Anim02)
@ -562,7 +562,7 @@ EvtScript N(8021A36C) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)
EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK)

View File

@ -174,7 +174,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -310,7 +310,7 @@ EvtScript N(attackPainfulSong) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, STATUS_FLAG_1 | 0x00000002 | STATUS_FLAG_4 | STATUS_FLAG_8 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_SLEEP | STATUS_FLAG_80000000, 20, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_CHANCE(STATUS_FLAG_SLEEP, 3, 15), 20, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -167,7 +167,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -303,7 +303,7 @@ EvtScript N(attackPainfulSong) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, STATUS_FLAG_4 | 0x00000010 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_SLEEP | STATUS_FLAG_80000000, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_CHANCE(STATUS_FLAG_SLEEP, 3, 20), 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -210,7 +210,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -181,7 +181,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -312,7 +312,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -313,7 +313,7 @@ s32 N(defenseTable)[] = {
ELEMENT_SHOCK, 99,
ELEMENT_MYSTERY, 0,
ELEMENT_JUMP, 0,
ELEMENT_HAMMER, 0,
ELEMENT_SMASH, 0,
ELEMENT_END,
};
@ -994,7 +994,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(OnBurn))
EVT_EXEC_WAIT(N(OnBurnDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_EXEC_WAIT(N(OnImmune))
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_EXEC_WAIT(N(OnImmune))
@ -1602,7 +1602,7 @@ EvtScript N(attackBodySlam) = {
EVT_END_SWITCH
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 20, EVT_FLOAT(1.0))
EVT_END_THREAD
@ -2197,7 +2197,7 @@ EvtScript N(attackWindBreath) = {
EVT_END_SWITCH
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HuffNPuff_Anim01)
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_HuffNPuff_Anim02)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_HuffNPuff_Anim03)
@ -2338,7 +2338,7 @@ EvtScript N(attackGroundLightning) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 12, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, N(VAR_FLAGS), LVar0)
@ -2573,7 +2573,7 @@ EvtScript N(attackDirectLightning) = {
EVT_WAIT(2)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
@ -3793,7 +3793,7 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarA, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_WAIT(50)
EVT_SET(LVarA, 0)
EVT_CALL(SetGoalToHome, ACTOR_SELF)

View File

@ -15,7 +15,7 @@ extern EvtScript N(handleEvent);
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_HAMMER, 0,
ELEMENT_SMASH, 0,
ELEMENT_THROW, -3,
ELEMENT_END,
};
@ -263,7 +263,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SMASH)
@ -417,7 +417,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 55)
EVT_SET(LVar1, 0)

View File

@ -187,7 +187,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -363,7 +363,7 @@ EvtScript N(attack) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(YieldTurn)

View File

@ -55,7 +55,7 @@ s32 N(defenseTable)[] = {
ELEMENT_SHOCK, 99,
ELEMENT_MYSTERY, 0,
ELEMENT_JUMP, 0,
ELEMENT_HAMMER, 0,
ELEMENT_SMASH, 0,
ELEMENT_END,
};
@ -305,7 +305,7 @@ EvtScript N(handleEvent) = {
EVT_END_IF
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)

View File

@ -397,7 +397,7 @@ EvtScript N(handleEvent_80219050) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar1)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar1)
@ -555,12 +555,12 @@ EvtScript N(takeTurn_80219D88) = {
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 6, EVT_FLOAT(0.1))
EVT_CALL(SetAnimation, ACTOR_SELF, 6, ANIM_Pokey_Mummy_Anim16)
EVT_CALL(JumpPartTo, ACTOR_SELF, 6, LVar0, LVar1, LVar2, 0, 1)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0x00000008 | 0x00000020 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 40), 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, LVar1)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 55)
EVT_SET(LVar1, 0)
@ -680,11 +680,11 @@ EvtScript N(8021A6C8) = {
EVT_END_CHILD_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0x00000004 | 0x00000020 | 0x00000040 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Pokey_Mummy_Anim07)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)

View File

@ -631,7 +631,7 @@ EvtScript N(handleEvent_80222364) = {
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_StoneChomp_Anim01)
@ -806,7 +806,7 @@ EvtScript N(takeTurn_80222ED0) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_StoneChomp_Anim04)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)

View File

@ -630,7 +630,7 @@ EvtScript N(handleEvent_802197C4) = {
EVT_SET_CONST(LVar1, ANIM_ChainChomp_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ChainChomp_Anim01)

View File

@ -338,7 +338,7 @@ EvtScript N(handleEvent_8021BFD0) = {
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -229,7 +229,7 @@ EvtScript N(handleEvent_8021B940) = {
EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -413,7 +413,7 @@ EvtScript N(8021BEBC) = {
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Buzzar_Anim01)
EVT_WAIT(25)
@ -491,14 +491,14 @@ EvtScript N(8021BEBC) = {
EVT_CALL(GetActionResult, LVar1)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0)
EVT_IF_EQ(LVar0, TRUE)
EVT_WAIT(3)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Buzzar_Anim01)
EVT_WAIT(25)
@ -974,7 +974,7 @@ EvtScript N(8021DF2C) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
@ -1090,7 +1090,7 @@ EvtScript N(8021F030) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetAnimation, ACTOR_SELF, 1, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01)

View File

@ -198,7 +198,7 @@ EvtScript N(handleEvent_80218C3C) = {
EVT_CASE_FLAG(DAMAGE_TYPE_BLAST)
EVT_EXEC_WAIT(N(80218944))
EVT_CASE_DEFAULT
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 1)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET_CONST(LVar0, 1)
@ -211,7 +211,7 @@ EvtScript N(handleEvent_80218C3C) = {
EVT_SET_CONST(LVar2, -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_END_IF
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, 0)
EVT_END_SWITCH
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
@ -299,7 +299,7 @@ EvtScript N(handleEvent_80218C3C) = {
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
@ -512,7 +512,7 @@ EvtScript N(80219BA0) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 15)

View File

@ -199,7 +199,7 @@ EvtScript N(handleEvent_8021DCF4) = {
EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -330,11 +330,11 @@ EvtScript N(takeTurn_8021E33C) = {
EVT_IF_FLAG(LVar0, STATUS_FLAG_POISON)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HurtPlant_Anim07)
EVT_WAIT(5)

View File

@ -120,7 +120,7 @@ EvtScript N(handleEvent_8021EB9C) = {
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_ELECTRIC)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock)
EVT_ELSE
@ -178,7 +178,7 @@ EvtScript N(handleEvent_8021EB9C) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Idle)
@ -186,7 +186,7 @@ EvtScript N(handleEvent_8021EB9C) = {
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_ELECTRIC)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock)
EVT_EXEC_WAIT(DoNormalHit)

View File

@ -170,7 +170,7 @@ EvtScript N(handleEvent_80221A74) = {
EVT_SET_CONST(LVar1, ANIM_MBush_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -270,10 +270,10 @@ EvtScript N(takeTurn_80221F78) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, STATUS_FLAG_1 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 2, 25), 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)

View File

@ -402,7 +402,7 @@ EvtScript N(handleEvent_80218E3C) = {
EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
@ -573,7 +573,7 @@ EvtScript N(spearStab) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(20)
EVT_EXEC_WAIT(N(80218D7C))
@ -917,7 +917,7 @@ EvtScript N(spearThrow) = {
EVT_EXEC_WAIT(N(becomeShyGuy))
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
@ -1194,7 +1194,7 @@ EvtScript N(handleEvent_8021C14C) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -1418,7 +1418,7 @@ EvtScript N(8021CD50) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -366,7 +366,7 @@ EvtScript N(handleEvent_802197FC) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim04)
@ -477,7 +477,7 @@ EvtScript N(handleEvent_80219ED4) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
@ -648,7 +648,7 @@ EvtScript N(8021A6D8) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Fuzzipede_Anim04)
EVT_THREAD
@ -822,7 +822,7 @@ EvtScript N(8021B22C) = {
EVT_END_THREAD
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_SET(LocalFlag(0), 0)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED)

View File

@ -128,7 +128,7 @@ ApiStatus N(unknownFunction)(Evt* script, s32 isInitialCall) {
N(unknownCounter) += 9;
N(unknownCounter) = clamp_angle(N(unknownCounter));
actor->unk_19A = sin_rad(DEG_TO_RAD(N(unknownCounter))) * 3.0f;
actor->verticalRenderOffset = sin_rad(DEG_TO_RAD(N(unknownCounter))) * 3.0f;
return ApiStatus_DONE2;
}
@ -154,7 +154,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(speakOnHit))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleKammy_Anim05)
@ -353,7 +353,7 @@ EvtScript N(takeTurn) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_WAIT(19)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_END_CASE_GROUP

View File

@ -620,7 +620,7 @@ EvtScript N(80221CD4) = {
EVT_WAIT(24)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_RETURN

View File

@ -12,7 +12,7 @@ s32 N(idleAnimations_802232D0)[] = {
s32 N(defenseTable_802232DC)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_HAMMER, 0,
ELEMENT_SMASH, 0,
ELEMENT_END,
};

View File

@ -1258,7 +1258,7 @@ EvtScript N(80230794) = {
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5)
EVT_CALL(PlayEffect, 0x5E, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0, 0, 0, 0)
EVT_WAIT(14)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT), 0, 65536, 9, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT), 0, SUPPRESS_EVENT_FLAG_10000, 9, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MakeLerp, 200, 0, 60, 0)
EVT_LABEL(2)

View File

@ -355,7 +355,7 @@ EvtScript N(handleEvent_normal) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0E)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -479,10 +479,10 @@ EvtScript N(attackShellToss) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
@ -579,7 +579,7 @@ EvtScript N(handleEvent_spiky) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0F)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim11)
@ -794,10 +794,10 @@ EvtScript N(attackSpikeBounce) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
@ -944,7 +944,7 @@ EvtScript N(handleEvent_flipped) = {
EVT_END_LOOP
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_SCARE_AWAY)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -1076,7 +1076,7 @@ EvtScript N(handleEvent_spiky_flipped) = {
EVT_END_LOOP
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_SCARE_AWAY)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -298,12 +298,12 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 1)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0B)
EVT_SET_CONST(LVar2, ANIM_DryBones_Anim0C)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 0)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, 0)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0B)
@ -322,7 +322,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_EXEC_WAIT(N(reassemble))
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -529,7 +529,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetPartOffset, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(0.7))

View File

@ -80,7 +80,7 @@ ActorPartBlueprint N(parts)[] = {
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 2,
.elementImmunityFlags = ELEMENT_FIRE,
.unk_1C = 0,
.unk_1D = -8,
},
@ -161,7 +161,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
@ -304,7 +304,7 @@ EvtScript N(attackClawSwipe) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Mock)
@ -389,7 +389,7 @@ EvtScript N(attackHeavyJump) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
@ -464,10 +464,10 @@ EvtScript N(attackFlameBreath) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_3), LVar0)
EVT_MUL(LVar0, 8)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostFireBreath)
EVT_WAIT(15)
@ -558,7 +558,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_CALL(RemovePlayerBuffs, 268435455)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)

View File

@ -252,7 +252,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET(LVar1, ANIM_BattleBowser_Idle)
@ -373,7 +373,7 @@ EvtScript N(attackClawSwipe) = {
EVT_END_THREAD
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
@ -428,10 +428,10 @@ EvtScript N(attackFireBreath) = {
EVT_WAIT(30)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostFireBreath)

View File

@ -324,7 +324,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_80269E80, LVar2)
EVT_SWITCH(LVar2)
@ -1270,17 +1270,17 @@ EvtScript N(attackClawSwipe) = {
EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED)
EVT_SET(LVar0, 12)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_SET(LVar0, 6)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
@ -1394,7 +1394,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 3)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 65536)
EVT_IF_NE(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
@ -1415,7 +1415,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 3)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_WAIT(2)
@ -1425,11 +1425,11 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 4)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 268435455)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
@ -1537,10 +1537,10 @@ EvtScript N(attackFlameBreath) = {
EVT_ELSE
EVT_SET(LVar0, 8)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathLoop)
@ -1622,7 +1622,7 @@ EvtScript N(onBurnHit) = {
EVT_SWITCH(LVar1)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLOSIVE)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)

View File

@ -264,7 +264,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_80269E80, LVar2)
EVT_SWITCH(LVar2)
@ -1123,15 +1123,15 @@ EvtScript N(attackClawSwipe) = {
EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_80000)
EVT_SET(LVar0, 16)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_SET(LVar0, 8)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
@ -1245,7 +1245,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 3)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 65536)
EVT_IF_NE(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
@ -1266,7 +1266,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 3)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_WAIT(2)
@ -1276,11 +1276,11 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 6)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 268435455)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
@ -1395,10 +1395,10 @@ EvtScript N(attackFlameBreath) = {
EVT_ELSE
EVT_SET(LVar0, 10)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathLoop)
@ -1475,7 +1475,7 @@ EvtScript N(onBurnHit) = {
EVT_SWITCH(LVar1)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLOSIVE)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)
@ -1582,14 +1582,14 @@ EvtScript N(attackLightningBlast) = {
EVT_CALL(GetPartEventFlags, ACTOR_SELF, 1, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_80000)
EVT_SET(LVar0, 20)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_SET(LVar0, 10)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_CALL(N(UnfadeBackgroundToBlack))

View File

@ -403,7 +403,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_80269E80, LVar2)
EVT_SWITCH(LVar2)
@ -1356,15 +1356,15 @@ EvtScript N(attackClawSwipe) = {
EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_80000)
EVT_SET(LVar0, 16)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_SET(LVar0, 8)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_4 | STATUS_FLAG_20 | STATUS_FLAG_40 | STATUS_FLAG_100 | STATUS_FLAG_200 | STATUS_FLAG_POISON | STATUS_FLAG_80000000, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_CHANCE(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
@ -1478,7 +1478,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 3)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 65536)
EVT_IF_NE(LVarA, 5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
@ -1499,7 +1499,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 3)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_WAIT(2)
@ -1509,7 +1509,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_ELSE
EVT_SET(LVar1, 6)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 268435455)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)
@ -1628,10 +1628,10 @@ EvtScript N(attackFlameBreath) = {
EVT_ELSE
EVT_SET(LVar0, 10)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathLoop)
@ -1708,7 +1708,7 @@ EvtScript N(onBurnHit) = {
EVT_SWITCH(LVar1)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLOSIVE)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)
@ -1815,14 +1815,14 @@ EvtScript N(attackLightningBlast) = {
EVT_CALL(GetPartEventFlags, ACTOR_SELF, 1, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_80000)
EVT_SET(LVar0, 20)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_SET(LVar0, 10)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_CALL(N(UnfadeBackgroundToBlack))

View File

@ -184,7 +184,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -408,7 +408,7 @@ EvtScript N(acrobaticAttack) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 12, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoShockHit)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -133,7 +133,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -56,7 +56,7 @@ ActorPartBlueprint N(partsTable_80218EE8)[] = {
.idleAnimations = N(idleAnimations_80218FC4),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
.elementImmunityFlags = ELEMENT_IMMUNITY_FLAG_2,
.elementImmunityFlags = ELEMENT_FIRE,
.unk_1C = 0xFD,
.unk_1D = 0xF6,
},
@ -295,7 +295,7 @@ EvtScript N(handleEvent_80219500) = {
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CASE_OR_EQ(EVENT_BURN_TAUNT)
@ -413,7 +413,7 @@ EvtScript N(fireTackle) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 4587524)
@ -536,7 +536,7 @@ EvtScript N(fireballs_Partner) = {
EVT_WAIT(20)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(N(80219464))
EVT_END_CASE_GROUP
@ -625,7 +625,7 @@ EvtScript N(fireballs_Player) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)

View File

@ -285,7 +285,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoShockHit)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_EXEC_WAIT(DoShockHit)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE)
EVT_EXEC_WAIT(N(onHitCombo))
EVT_END_IF
@ -1052,10 +1052,10 @@ EvtScript N(attackPetitSpit) = {
EVT_CALL(SetGoalToTarget, LVar5)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, 65535, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar9)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetPartFlagBits, LVar5, 1, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(SetGoalToTarget, LVar5)

View File

@ -126,7 +126,7 @@ API_CALLABLE(SetAnimatorFlags);
API_CALLABLE(GetAnimatedPositionByTreeIndex);
API_CALLABLE(GetAnimatedRotationByTreeIndex);
API_CALLABLE(GetAnimatedModelRootPosition);
ApiStatus func_8026D5A4(Evt* script, s32 isInitialCall);
ApiStatus SetPartImmunityBits(Evt* script, s32 isInitialCall);
ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall);
extern Formation N(formation_lava_bud_1);
@ -985,7 +985,7 @@ EvtScript N(handleEvent) = {
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE)
EVT_EXEC_WAIT(N(onComboHit))
EVT_EXEC_WAIT(N(playHitAnimation))
@ -1188,11 +1188,11 @@ EvtScript N(attackFlameSpew) = {
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 65535, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaPiranha_Anim03)
EVT_WAIT(19)
@ -1272,7 +1272,7 @@ EvtScript N(attackFireStream) = {
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 65535, 0, 7, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, 7, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_WAIT(20)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 3)
@ -1549,12 +1549,12 @@ EvtScript N(onDeath) = {
EVT_CALL(SetDefenseTable, ACTOR_ENEMY1, 2, EVT_PTR(b_area_kzn2_lava_bud_defenseTable_fiery))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY2, 1, EVT_PTR(b_area_kzn2_lava_bud_defenseTable_fiery))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY2, 2, EVT_PTR(b_area_kzn2_lava_bud_defenseTable_fiery))
EVT_CALL(func_8026D5A4, ACTOR_SELF, 1, 2, 1)
EVT_CALL(func_8026D5A4, ACTOR_SELF, 2, 2, 1)
EVT_CALL(func_8026D5A4, ACTOR_ENEMY1, 1, 2, 1)
EVT_CALL(func_8026D5A4, ACTOR_ENEMY1, 2, 2, 1)
EVT_CALL(func_8026D5A4, ACTOR_ENEMY2, 1, 2, 1)
EVT_CALL(func_8026D5A4, ACTOR_ENEMY2, 2, 2, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_SELF, 1, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_SELF, 2, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_ENEMY1, 1, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_ENEMY1, 2, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_ENEMY2, 1, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_ENEMY2, 2, ELEMENT_FIRE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY1, 2, ACTOR_PART_FLAG_2000, 0)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY2, 2, ACTOR_PART_FLAG_2000, 0)
EVT_SET(LVar0, ACTOR_ENEMY0)

View File

@ -170,7 +170,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -357,10 +357,10 @@ EvtScript N(takeTurn) = {
EVT_WAIT(2)
EVT_SET(LVar8, 6)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, 65535, 0, LVar8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar9)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(MakeLerp, 160, 10, 20, 1)
EVT_LOOP(0)

View File

@ -68,7 +68,7 @@ ActorPartBlueprint N(parts)[] = {
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
.elementImmunityFlags = DAMAGE_TYPE_FIRE, // not sure about enum type
.elementImmunityFlags = ELEMENT_FIRE,
.unk_1C = -2,
.unk_1D = -22,
},

View File

@ -655,7 +655,7 @@ EvtScript N(takeTurn_8021B81C) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
@ -790,7 +790,7 @@ EvtScript N(takeTurn_Chan) = {
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -1530,13 +1530,13 @@ EvtScript N(takeTurn_80221200) = {
EVT_SWITCH(LVar9)
EVT_CASE_EQ(0)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CASE_EQ(1)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CASE_EQ(2)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_SWITCH
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
@ -2890,7 +2890,7 @@ ApiStatus func_80219188_465618(Evt* script, s32 isInitialCall) {
wattEffectData->unk_0C = TRUE;
wattEffectData->unk_10 = 0;
wattEffectData->effect1 = fx_static_status(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
wattEffectData->effect2 = fx_static_status(1, actor->currentPos.x, -1000.0f, actor->currentPos.z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
wattEffectData->effect2 = fx_static_status(1, actor->currentPos.x, NPC_DISPOSE_POS_Y, actor->currentPos.z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
wattEffectData->flags = TRUE;
wattEffectData->debuff = actor->debuff;
}
@ -2901,10 +2901,10 @@ ApiStatus func_80219188_465618(Evt* script, s32 isInitialCall) {
wattEffectData->angle += 15;
wattEffectData->angle = clamp_angle(wattEffectData->angle);
}
actor->unk_19A = sin_rad(DEG_TO_RAD(wattEffectData->angle)) * 3.0f;
actor->verticalRenderOffset = sin_rad(DEG_TO_RAD(wattEffectData->angle)) * 3.0f;
x = actor->currentPos.x + actor->headOffset.x;
y = actor->currentPos.y + actor->headOffset.y + actor->unk_19A + (actor->debuff != STATUS_SHRINK ? 12.0 : 4.800000000000001); // 4.8 doesn't match
y = actor->currentPos.y + actor->headOffset.y + actor->verticalRenderOffset + (actor->debuff != STATUS_SHRINK ? 12.0 : 4.800000000000001); // 4.8 doesn't match
z = actor->currentPos.z + actor->headOffset.z;
if (wattEffectData->unk_0C) {
switch (wattEffectData->unk_10) {
@ -3191,13 +3191,13 @@ EvtScript N(takeTurn_80226004) = {
EVT_SWITCH(LVar9)
EVT_CASE_EQ(0)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE), 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE), SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CASE_EQ(1)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE), 65535, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE), SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CASE_EQ(2)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_IGNORE_DEFENSE), 65535, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE), SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_SWITCH
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)

View File

@ -118,7 +118,7 @@ EvtScript N(handleEvent_80218584) = {
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_ELECTRIC)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock)
EVT_ELSE
@ -176,7 +176,7 @@ EvtScript N(handleEvent_80218584) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Idle)
@ -184,7 +184,7 @@ EvtScript N(handleEvent_80218584) = {
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_ELECTRIC)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock)
EVT_EXEC_WAIT(DoNormalHit)

View File

@ -184,7 +184,7 @@ EvtScript N(handleEvent_8021D60C) = {
EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -354,7 +354,7 @@ EvtScript N(takeTurn_8021DCD4) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SmallPiranha_Anim08)

View File

@ -682,7 +682,7 @@ EvtScript N(shellToss_KentC) = {
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_NOT_FLAG(LVar3, 0x80000)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 32)
EVT_ELSE
EVT_ADD(LVar0, 12)
@ -693,16 +693,16 @@ EvtScript N(shellToss_KentC) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarE)
EVT_IF_NOT_FLAG(LVarE, 0x80000)
EVT_IF_NOT_FLAG(LVarE, STATUS_FLAG_SHRINK)
EVT_CALL(func_80269EAC, 24)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarA, 0)
EVT_IF_NOT_FLAG(LVarE, 0x80000)
EVT_IF_NOT_FLAG(LVarE, STATUS_FLAG_SHRINK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED)
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x100000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE)
EVT_SET(LVarA, 1)
EVT_END_IF
EVT_END_IF
@ -718,7 +718,7 @@ EvtScript N(shellToss_KentC) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(func_80269EAC, 25)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
@ -916,7 +916,7 @@ EvtScript N(tackle_KentC) = {
EVT_IF_NOT_FLAG(LVarF, 0x80000)
EVT_CALL(func_80269EAC, 24)
EVT_END_IF
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 65535, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, SUPPRESS_EVENT_ALL, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -184,7 +184,7 @@ EvtScript N(handleEvent_80221C20) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -408,7 +408,7 @@ EvtScript N(80222824) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 12, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_8021B028) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Blue_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -409,7 +409,7 @@ EvtScript N(8021BC2C) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_80220128) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Green_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -409,7 +409,7 @@ EvtScript N(80220D2C) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -198,7 +198,7 @@ EvtScript N(handleEvent_80224D10) = {
EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim01)
@ -315,7 +315,7 @@ EvtScript N(basicAttack) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -382,10 +382,10 @@ EvtScript N(sleepySpin) = {
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0x00000002 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_200 | STATUS_FLAG_DIZZY | STATUS_FLAG_80000000, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_CHANCE(STATUS_FLAG_DIZZY, 2, 50), 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar0, TRUE)
EVT_THREAD

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_8021E628) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Pink_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -409,7 +409,7 @@ EvtScript N(8021F22C) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -30,7 +30,7 @@ s32 N(defenseTable_8022CB4C)[] = {
ELEMENT_ICE, -2,
ELEMENT_FIRE, 99,
ELEMENT_SHOCK, 0,
ELEMENT_HAMMER, 0,
ELEMENT_SMASH, 0,
ELEMENT_BLAST, -1,
ELEMENT_END,
};
@ -191,7 +191,7 @@ EvtScript N(handleEvent_8022CE60) = {
EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -306,7 +306,7 @@ EvtScript N(takeTurn_8022D344) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)

View File

@ -430,7 +430,7 @@ EvtScript N(handleEvent_8022A398) = {
EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim0A)
EVT_EXEC_WAIT(N(80229A34))
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_CALL(func_8026E914, LVar0, LVar1)
EVT_IF_GE(LVar1, 3)
EVT_EXEC_WAIT(N(80229CB0))
@ -575,7 +575,7 @@ EvtScript N(takeTurn_8022A9D0) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 55)
EVT_SET(LVar1, 0)
@ -699,7 +699,7 @@ EvtScript N(handleEvent_8022B310) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -923,7 +923,7 @@ EvtScript N(8022BF14) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -250,7 +250,7 @@ EvtScript N(handleEvent_80227ABC) = {
EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar1)
EVT_IF_EQ(LVar1, 0)
@ -395,7 +395,7 @@ EvtScript N(slingshotAttack) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(GetPartOffset, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(0.7))
@ -513,7 +513,7 @@ EvtScript N(hammerAttack) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_SET(LocalFlag(0), 0)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_8021CB28) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Yellow_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -409,7 +409,7 @@ EvtScript N(8021D72C) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -226,7 +226,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim0E)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -388,7 +388,7 @@ EvtScript N(attack_throw_bomb) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_GeneralGuy_Anim02)
EVT_WAIT(30)
@ -451,7 +451,7 @@ EvtScript N(attack_lightning_shot) = {
EVT_END_THREAD
EVT_CALL(PlayEffect, EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 40, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(40)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(HIT_RESULT_MISS)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
@ -462,7 +462,7 @@ EvtScript N(attack_lightning_shot) = {
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0, 0, 0, 0)
EVT_WAIT(12)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_IF_NE(LVar0, HIT_RESULT_MISS)
EVT_CALL(GetModelCenter, 39)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
@ -472,7 +472,7 @@ EvtScript N(attack_lightning_shot) = {
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 6, 0)
EVT_WAIT(12)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 6, 0)
EVT_WAIT(20)
@ -527,10 +527,10 @@ EvtScript N(attack_lightning_shot) = {
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0, 0, 0, 0)
EVT_WAIT(12)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_GeneralGuy_Anim02)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
@ -553,7 +553,7 @@ EvtScript N(attack_lightning_shot) = {
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 6, 0)
EVT_WAIT(12)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 7, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(func_80253734, BTL_DARKNESS_MODE_3)

View File

@ -128,7 +128,7 @@ EvtScript N(handleEvent) = {
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(onHit))
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 9, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(func_8026E914, LVar0, LVar1)

View File

@ -255,7 +255,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY0, 1, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(toy_tank_as_close_hatch))
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY0, 1, SOUND_206B)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_CALL(func_8026E914, LVar0, LVar1)
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(toy_tank_as_close_hatch))
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY0, 1, SOUND_206B)

View File

@ -896,7 +896,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)

View File

@ -479,7 +479,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
@ -724,7 +724,7 @@ EvtScript N(attack) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -869,7 +869,7 @@ EvtScript N(shy_guy_on_spin_smash) = {
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_GOTO(1)
EVT_LABEL(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_D)
@ -1016,7 +1016,7 @@ EvtScript N(shy_guy_handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -1240,7 +1240,7 @@ EvtScript N(shy_guy_attack2) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD

View File

@ -813,7 +813,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(onSpinSmashLaunchDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_CALL(GetBattleFlags, LVar2)
@ -1335,7 +1335,7 @@ EvtScript N(takeTurn) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
@ -1357,15 +1357,15 @@ EvtScript N(launch_rock) = {
EVT_CALL(SetPartScale, ACTOR_SELF, 9, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(HIT_RESULT_HIT)
EVT_CASE_EQ(0)
EVT_ADD(LVar3, -4)
EVT_ADD(LVar4, 28)
EVT_SET(LVar2, 9)
EVT_CASE_EQ(HIT_RESULT_1)
EVT_CASE_EQ(1)
EVT_ADD(LVar3, -4)
EVT_ADD(LVar4, 21)
EVT_SET(LVar2, 8)
EVT_CASE_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_EQ(2)
EVT_ADD(LVar3, -4)
EVT_ADD(LVar4, 14)
EVT_SET(LVar2, 7)
@ -1381,7 +1381,7 @@ EvtScript N(launch_rock) = {
EVT_CALL(SetPartScale, ACTOR_SELF, 9, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(HIT_RESULT_HIT)
EVT_CASE_EQ(0)
EVT_ADD(LVar3, -10)
EVT_ADD(LVar4, 72)
EVT_SET(LVar2, 9)
@ -1389,7 +1389,7 @@ EvtScript N(launch_rock) = {
EVT_ADD(LVar3, -10)
EVT_ADD(LVar4, 54)
EVT_SET(LVar2, 8)
EVT_CASE_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_EQ(2)
EVT_ADD(LVar3, -10)
EVT_ADD(LVar4, 36)
EVT_SET(LVar2, 7)
@ -1420,11 +1420,11 @@ EvtScript N(launch_rock) = {
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CASE_EQ(1)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(HIT_RESULT_HIT)
EVT_CASE_EQ(0)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(2.2))
EVT_CASE_EQ(HIT_RESULT_1)
EVT_CASE_EQ(1)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.8))
EVT_CASE_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_EQ(2)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.4))
EVT_CASE_DEFAULT
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.0))

View File

@ -131,7 +131,7 @@ EvtScript N(handleEvent) = {
EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT)
EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_CASE_OR_EQ(EVENT_SHOCK_HIT)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_OR_EQ(EVENT_DEATH)

View File

@ -802,7 +802,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_SET_CONST(LVar0, 1)

View File

@ -422,7 +422,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_8026E914, LVar0, LVar1)
EVT_IF_EQ(LVar1, 2)
@ -601,7 +601,7 @@ EvtScript N(attackHeavyJump) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_37D)
EVT_CALL(ResetActorSounds, ACTOR_SELF, 2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
@ -699,20 +699,20 @@ EvtScript N(attackLightBeam) = {
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarD, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarD, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_END_SWITCH
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarE, DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarE, DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_WAIT(2)
EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarD, DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarD, DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_END_SWITCH
EVT_WAIT(40)

View File

@ -170,7 +170,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -299,7 +299,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, STATUS_FLAG_8 | 0x00000010, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)

View File

@ -289,7 +289,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar2, -1)
EVT_END_IF
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -635,7 +635,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoBurnHit)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_CrystalKing_Anim19)
EVT_EXEC_WAIT(N(OnHit))
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim09)
@ -1016,7 +1016,7 @@ EvtScript N(AttackIcyBreath) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_END_CASE_GROUP
EVT_END_SWITCH
@ -1138,7 +1138,7 @@ EvtScript N(AttackIceBolt) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0x00000002 | STATUS_FLAG_4 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_40 | 0x00000080 | STATUS_FLAG_200 | STATUS_FLAG_FROZEN, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(PlayEffect, EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(2.0), 30, 0, 0, 0, 0, 0, 0, 0)
@ -1724,7 +1724,7 @@ EvtScript N(AttackIcyBreathWithClones) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(20)
EVT_END_CASE_GROUP

View File

@ -187,7 +187,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -361,7 +361,7 @@ EvtScript N(attack_bite) = {
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim07)
@ -436,7 +436,7 @@ EvtScript N(attack_icy_breath) = {
EVT_WAIT(1)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim0C)
EVT_WAIT(5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_ICE, STATUS_FLAG_FROZEN, 1, BS_FLAGS1_10)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_ICE, STATUS_FLAG_FROZEN, 1, BS_FLAGS1_10) //@bug malformed status word
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
@ -462,11 +462,11 @@ EvtScript N(attack_icy_breath) = {
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 65535, 0x00000002 | STATUS_FLAG_4 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_40 | 0x00000080 | STATUS_FLAG_200 | STATUS_FLAG_FROZEN, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, DMG_STATUS_IGNORE_RES(STATUS_FLAG_FROZEN, 2), 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim0D)

View File

@ -204,7 +204,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -304,7 +304,7 @@ EvtScript N(attack_lick) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
@ -409,7 +409,7 @@ EvtScript N(attack_rock) = {
EVT_END_SWITCH
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Gulpit_Anim01)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2)

View File

@ -141,7 +141,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(setAnim))
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)

View File

@ -255,7 +255,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Monstar_Hurt)
EVT_EXEC_WAIT(N(OnDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
@ -450,7 +450,7 @@ EvtScript N(attack) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Monstar_Idle1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CALL(MakeLerp, 200, 0, 60, 0)
@ -621,7 +621,7 @@ EvtScript N(OnBurn) = {
EVT_SWITCH(LVar1)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLOSIVE)
EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)

View File

@ -15,7 +15,7 @@ extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 2,
ELEMENT_HAMMER, 2,
ELEMENT_SMASH, 2,
ELEMENT_JUMP, 2,
ELEMENT_WATER, 2,
ELEMENT_BLAST, 2,
@ -448,7 +448,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
@ -650,10 +650,10 @@ EvtScript N(attackShellToss) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
@ -752,10 +752,10 @@ EvtScript N(attackDizzyTornado) = {
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 65535, STATUS_FLAG_4 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_200 | STATUS_FLAG_DIZZY | STATUS_FLAG_80000000, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_ALL, DMG_STATUS_CHANCE(STATUS_FLAG_DIZZY, 2, 60), 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_THREAD
EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar0, 1)

View File

@ -24,7 +24,7 @@ extern s32 N(idleAnimations3)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 2,
ELEMENT_HAMMER, 2,
ELEMENT_SMASH, 2,
ELEMENT_JUMP, 2,
ELEMENT_WATER, 2,
ELEMENT_BLAST, 2,
@ -365,7 +365,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_ShellEnter)
@ -531,10 +531,10 @@ EvtScript N(takeTurn) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_ParaTroopa_Dark_ShellDive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 30, 0)
@ -1000,7 +1000,7 @@ EvtScript N(handleEvent_koopa) = {
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)
@ -1202,10 +1202,10 @@ EvtScript N(koopa_attackShellToss) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 65535, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
@ -1304,10 +1304,10 @@ EvtScript N(koopa_attackDizzyTornado) = {
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 65535, STATUS_FLAG_4 | STATUS_FLAG_8 | 0x00000010 | STATUS_FLAG_20 | STATUS_FLAG_200 | STATUS_FLAG_DIZZY | STATUS_FLAG_80000000, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_ALL, DMG_STATUS_CHANCE(STATUS_FLAG_DIZZY, 2, 60), 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_THREAD
EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar0, 1)

View File

@ -230,7 +230,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -418,7 +418,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)

Some files were not shown because too many files have changed in this diff Show More