Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
dmg_item.c File Reference

Go to the source code of this file.

Macros

#define INFLICT_STATUS(STATUS_TYPE)
 

Functions

HitResult calc_item_check_hit (void)
 
HitResult calc_item_damage_enemy (void)
 

Macro Definition Documentation

◆ INFLICT_STATUS

#define INFLICT_STATUS ( STATUS_TYPE)
Value:
if ((battleStatus->curAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
try_inflict_status(target, STATUS_KEY_##STATUS_TYPE, STATUS_TURN_MOD_##STATUS_TYPE)) { \
wasStatusInflicted = TRUE; \
} \
s32 try_inflict_status(Actor *, s32, s32)
Definition 190B20.c:2532

Function Documentation

◆ calc_item_check_hit()

HitResult calc_item_check_hit ( void )

Definition at line 5 of file dmg_item.c.

5 {
6 BattleStatus* battleStatus = &gBattleStatus;
7 ActorState* state = &battleStatus->playerActor->state;
8 s32 actorID = battleStatus->curTargetID;
9 s8 currentTargetPartS8;
10 u32 currentTargetPart;
11 Actor* actor;
12 ActorPart* actorPart;
13
14 battleStatus->curTargetID2 = battleStatus->curTargetID;
15 currentTargetPart = currentTargetPartS8 = battleStatus->curTargetPart;
16 battleStatus->curTargetPart2 = currentTargetPartS8;
17
18 actor = get_actor(actorID);
19 if (actor == NULL) {
20 return HIT_RESULT_HIT;
21 }
22
23 actorPart = get_actor_part(actor, currentTargetPart);
24 ASSERT(actorPart != NULL);
25
26 if (actorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
27 return HIT_RESULT_MISS;
28 }
29
31 return HIT_RESULT_MISS;
32 }
33
34 if (actor->stoneStatus == STATUS_KEY_STONE) {
36 return HIT_RESULT_IMMUNE;
37 }
38
39 if ((battleStatus->curAttackElement & DAMAGE_TYPE_JUMP)
40 && (actorPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP))
41 {
44 }
45
46 return HIT_RESULT_HIT;
47}
s8 transparentStatus
ActorState state
#define sfx_play_sound_at_position
#define ASSERT(condition)
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
Definition enums.h:3374
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
Definition enums.h:3373
@ STATUS_KEY_TRANSPARENT
Definition enums.h:2210
@ STATUS_KEY_STONE
Definition enums.h:2208
@ HIT_RESULT_LANDED_ON_SPIKE
Definition enums.h:1954
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_IMMUNE
Definition enums.h:1958
@ HIT_RESULT_MISS
Definition enums.h:1956
@ SOUND_IMMUNE
Definition enums.h:745
@ SOUND_HIT_NORMAL
Definition enums.h:724
@ SOUND_SPACE_DEFAULT
Definition enums.h:1737
@ DAMAGE_TYPE_JUMP
Definition enums.h:2858
ActorPart * get_actor_part(Actor *actor, s32 partID)
Definition 190B20.c:1191
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
struct Actor * playerActor
BattleStatus gBattleStatus
Definition battle.c:11

◆ calc_item_damage_enemy()

HitResult calc_item_damage_enemy ( void )

Definition at line 49 of file dmg_item.c.

49 {
50 BattleStatus* battleStatus = &gBattleStatus;
51 Actor* player = battleStatus->playerActor;
52 s32 currentTargetID = battleStatus->curTargetID;
53 Actor* partner = battleStatus->partnerActor;
54 s32 currentTargetPartID = battleStatus->curTargetPart;
55 s32 partImmuneToElement;
56 s32 wasSpecialHit = FALSE;
57 s32 actorClass;
58 s32 isFireDamage = FALSE;
59 s32 isWaterDamage = FALSE;
60 s32 isShockDamage = FALSE;
61 s32 isIceDamage = FALSE;
62 Actor* target;
63 ActorPart* targetPart;
64 Evt* script;
65 s32 attackDamage;
66 s32 temp;
67 s32 targetDefense;
68 ActorState* state;
69 s32 dispatchEvent;
70 s32 wasStatusInflicted;
71 s32 hitResult;
72
73 battleStatus->wasStatusInflicted = FALSE;
74 battleStatus->lastAttackDamage = 0;
75 battleStatus->attackerActorID = player->actorID;
76 battleStatus->curTargetID2 = battleStatus->curTargetID;
77 battleStatus->curTargetPart2 = battleStatus->curTargetPart;
78 target = get_actor(currentTargetID);
79 wasStatusInflicted = FALSE;
80
81 if (target == NULL) {
82 return HIT_RESULT_HIT;
83 }
84
85 targetPart = get_actor_part(target, currentTargetPartID);
86 if (targetPart == NULL) {
87 PANIC();
88 }
89
90 target->lastDamageTaken = 0;
91 actorClass = currentTargetID & ACTOR_CLASS_MASK;
93 state = &player->state;
94 } else {
95 state = &partner->state;
96 }
97
98 if (battleStatus->curAttackElement & DAMAGE_TYPE_FIRE) {
99 fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
100 isFireDamage = TRUE;
101 }
102 if (battleStatus->curAttackElement & DAMAGE_TYPE_SHOCK) {
103 apply_shock_effect(target);
104 isShockDamage = TRUE;
105 }
106 if (battleStatus->curAttackElement & DAMAGE_TYPE_WATER) {
107 fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
108 isWaterDamage = TRUE;
109 }
110 if (battleStatus->curAttackElement & DAMAGE_TYPE_ICE) {
111 fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
112 isIceDamage = TRUE;
113 }
114
115 if (!(battleStatus->curAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) {
116 if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)
118 || (targetPart->eventFlags & ACTOR_EVENT_FLAG_BURIED && !(battleStatus->curAttackElement & DAMAGE_TYPE_QUAKE))
119 ) {
120 return HIT_RESULT_MISS;
121 }
122 }
123
124 if (target->stoneStatus == STATUS_KEY_STONE) {
126 show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
127 show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
129 return HIT_RESULT_NICE;
130 }
131 return HIT_RESULT_HIT;
132 }
133
134 if (targetPart->elementalImmunities & battleStatus->curAttackElement) {
135 partImmuneToElement = TRUE;
136 } else {
137 partImmuneToElement = FALSE;
138 }
139
141 battleStatus->curAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
142 }
143
144 temp = get_defense(target, targetPart->defenseTable, battleStatus->curAttackElement);
145 if (!(battleStatus->curAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
146 temp += target->defenseBoost;
147 }
148
149 attackDamage = battleStatus->curAttackDamage;
150 if (attackDamage > 99) {
151 attackDamage = 99;
152 }
153 if (attackDamage <= 0) {
154 temp = 0;
155 }
156
157 attackDamage -= temp;
158 target->hpChangeCounter = 0;
159
160 if (attackDamage <= 0) {
161 target->hpChangeCounter = 0;
162 hitResult = HIT_RESULT_NO_DAMAGE;
163
164 if (!(battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
165 dispatchEvent = EVENT_ZERO_DAMAGE;
167 battleStatus->lastAttackDamage = 0;
168 } else {
169 dispatchEvent = EVENT_ZERO_DAMAGE;
170 battleStatus->lastAttackDamage = 0;
171 }
172 } else {
173 target->damageCounter += attackDamage;
174 target->hpChangeCounter -= attackDamage;
175 battleStatus->lastAttackDamage = 0;
176 dispatchEvent = EVENT_HIT_COMBO;
177 hitResult = HIT_RESULT_HIT;
178
179 if (!(targetPart->flags & ACTOR_PART_FLAG_DAMAGE_IMMUNE)
180 && !partImmuneToElement
181 && !(targetPart->targetFlags & ACTOR_PART_TARGET_NO_DAMAGE)
182 ) {
183 target->curHP -= attackDamage;
184 if (target->curHP <= 0) {
185 target->curHP = 0;
186 dispatchEvent = EVENT_DEATH;
187 }
188 }
189 battleStatus->lastAttackDamage += attackDamage;
190 target->lastDamageTaken = battleStatus->lastAttackDamage;
191 target->hpChangeCounter = 0;
192 }
193
194 if (targetPart->flags & ACTOR_PART_FLAG_DAMAGE_IMMUNE) {
195 dispatch_event_actor(target, dispatchEvent);
196 show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
199 }
200
201 if (battleStatus->curAttackElement & DAMAGE_TYPE_DEATH) {
202 battleStatus->lastAttackDamage = 0;
203 dispatchEvent = EVENT_DEATH;
204 hitResult = HIT_RESULT_HIT;
205 }
206
208 if (dispatchEvent == EVENT_HIT_COMBO) {
209 dispatchEvent = EVENT_HIT;
210 }
211 if (dispatchEvent == EVENT_ZERO_DAMAGE) {
212 dispatchEvent = EVENT_IMMUNE;
213 }
214 if (target->curHP <= 0 && dispatchEvent == EVENT_IMMUNE) {
215 dispatchEvent = EVENT_DEATH;
216 }
217 } else if (dispatchEvent == EVENT_DEATH) {
218 dispatchEvent = EVENT_HIT_COMBO;
219 }
220
222 if (battleStatus->curAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
223 dispatchEvent = EVENT_IMMUNE;
224 if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
225 dispatchEvent = EVENT_STAR_BEAM;
226 wasStatusInflicted = TRUE;
227 }
229 dispatchEvent = EVENT_STAR_BEAM;
230 wasStatusInflicted = TRUE;
231 }
233 dispatchEvent = EVENT_INVUNERABLE_TAUNT;
234 }
235 hitResult = HIT_RESULT_HIT;
236 }
237 }
238
239 if (battleStatus->curAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
241 if ((target->attackBoost > 0 || target->defenseBoost > 0) ||
242 ((target->staticStatus == 0 && target->transparentStatus != 0) || target->staticStatus != 0))
243 {
244 target->attackBoost = 0;
245 target->defenseBoost = 0;
246 target->isGlowing = FALSE;
247 dispatchEvent = EVENT_HIT;
248 if (target->staticStatus != 0) {
249 target->staticStatus = 0;
250 target->staticDuration = 0;
252 }
253 if (target->transparentStatus != 0) {
254 target->transparentStatus = 0;
255 target->transparentDuration = 0;
257 }
258 wasStatusInflicted = TRUE;
259 hitResult = HIT_RESULT_HIT;
260 }
261 }
262 }
263
265 if (battleStatus->curAttackElement & DAMAGE_TYPE_PEACH_BEAM) {
266 dispatchEvent = EVENT_IMMUNE;
267 if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
268 dispatchEvent = EVENT_PEACH_BEAM;
269 wasStatusInflicted = TRUE;
270 }
272 dispatchEvent = EVENT_PEACH_BEAM;
273 wasStatusInflicted = TRUE;
274 }
275 }
276 }
277
279 if (battleStatus->curAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
280 if (dispatchEvent == EVENT_HIT) {
281 dispatchEvent = EVENT_SPIN_SMASH_HIT;
282 }
283 if (dispatchEvent == EVENT_DEATH) {
284 dispatchEvent = EVENT_SPIN_SMASH_DEATH;
285 }
286 }
287 }
288
290 && (battleStatus->curAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW))
291 && (targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE)
292 ) {
293 if (dispatchEvent == EVENT_HIT) {
294 dispatchEvent = EVENT_FALL_TRIGGER;
295 }
296 if (dispatchEvent == EVENT_IMMUNE) {
297 dispatchEvent = EVENT_FALL_TRIGGER;
298 }
299 }
300
302 && (battleStatus->curAttackElement & DAMAGE_TYPE_POW)
304 ) {
305 if (dispatchEvent == EVENT_HIT) {
306 dispatchEvent = EVENT_FALL_TRIGGER;
307 }
308 if (dispatchEvent == EVENT_IMMUNE) {
309 dispatchEvent = EVENT_FALL_TRIGGER;
310 }
311 }
312
315 && (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)
316 ) {
317 if (dispatchEvent == EVENT_HIT) {
318 dispatchEvent = EVENT_FLIP_TRIGGER;
319 }
320 if (dispatchEvent == EVENT_IMMUNE) {
321 dispatchEvent = EVENT_FLIP_TRIGGER;
322 }
323 }
324
326 if (battleStatus->curAttackElement & DAMAGE_TYPE_FIRE) {
327 if (dispatchEvent == EVENT_HIT) {
328 dispatchEvent = EVENT_BURN_HIT;
329 }
330 if (dispatchEvent == EVENT_DEATH) {
331 dispatchEvent = EVENT_BURN_DEATH;
332 }
333 isFireDamage = TRUE;
334 }
335 }
336
338 && battleStatus->lastAttackDamage >= 0
339 && dispatchEvent != EVENT_DEATH
340 && dispatchEvent != EVENT_SPIN_SMASH_DEATH
341 && dispatchEvent != EVENT_EXPLODE_TRIGGER
342 ) {
343 // Using this macro because it's nicer to look at, and it also is necessary to wrap the first 5 of these in a
344 // do-while-0 OR to wrap each one individually. It's more likely that it's a macro instead, and much cleaner
345 #define INFLICT_STATUS(STATUS_TYPE) \
346 if ((battleStatus->curAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
347 try_inflict_status(target, STATUS_KEY_##STATUS_TYPE, STATUS_TURN_MOD_##STATUS_TYPE)) { \
348 wasStatusInflicted = TRUE; \
349 } \
350
351 INFLICT_STATUS(SHRINK);
352 INFLICT_STATUS(POISON);
353 INFLICT_STATUS(STONE);
354 INFLICT_STATUS(SLEEP);
355 INFLICT_STATUS(STOP);
356 INFLICT_STATUS(STATIC);
357 INFLICT_STATUS(FEAR);
358 INFLICT_STATUS(PARALYZE);
359 INFLICT_STATUS(DIZZY);
360
361 #undef INFLICT_STATUS
362
363 if (wasStatusInflicted) {
364 if (dispatchEvent == EVENT_ZERO_DAMAGE) {
365 dispatchEvent = EVENT_HIT_COMBO;
366 }
367 if (dispatchEvent == EVENT_IMMUNE) {
368 dispatchEvent = EVENT_HIT;
369 }
370 }
371 }
372
373 temp = target->actorBlueprint->spookChance;
374 temp = (battleStatus->statusChance * temp) / 100;
375
377 if (rand_int(99) < temp
378 && (target->debuff != STATUS_KEY_FEAR
379 && target->debuff != STATUS_KEY_DIZZY
380 && target->debuff != STATUS_KEY_PARALYZE
381 && target->debuff != STATUS_KEY_SLEEP
382 && target->debuff != STATUS_KEY_FROZEN
383 && target->debuff != STATUS_KEY_STOP)
384 && !(target->flags & ACTOR_FLAG_FLIPPED))
385 {
386 dispatchEvent = EVENT_SCARE_AWAY;
387 hitResult = HIT_RESULT_HIT;
388 wasSpecialHit = TRUE;
391 wasStatusInflicted = TRUE;
393 } else {
394 dispatchEvent = EVENT_IMMUNE;
395 hitResult = HIT_RESULT_NO_DAMAGE;
396 }
397 }
398
399 battleStatus->wasStatusInflicted = wasStatusInflicted;
400
401 if ((wasSpecialHit && (gBattleStatus.flags1 & (BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT)))
403 ) {
404 if (battleStatus->lastAttackDamage > 0) {
406 }
407
408 if (battleStatus->lastAttackDamage > 0 || (battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) && wasSpecialHit) {
410 show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
411 } else {
412 show_action_rating(ACTION_RATING_SUPER, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
413 }
414 }
415 }
416
418 func_80266970(target);
419 }
420
421 dispatch_event_actor(target, dispatchEvent);
422
423 if (actorClass == ACTOR_PARTNER) {
424 if ((battleStatus->lastAttackDamage > 0) && (gBattleStatus.flags1 & BS_FLAGS1_TRIGGER_EVENTS)) {
425 inflict_status(target, STATUS_KEY_DAZE, battleStatus->lastAttackDamage);
426 }
427 }
428
429 if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
430 if (battleStatus->lastAttackDamage == 0) {
431 if (!wasSpecialHit && !wasStatusInflicted) {
432 show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
433 }
434 } else if (!partImmuneToElement) {
436 show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
437 } else {
438 show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
439 }
440 if (!(targetPart->targetFlags & ACTOR_PART_TARGET_NO_DAMAGE)) {
441 show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
442 }
443 }
444 }
445
446 if (battleStatus->lastAttackDamage > 0 && !partImmuneToElement) {
447 set_actor_flash_mode(target, 1);
448 if (isFireDamage) {
450 } else if (isShockDamage) {
452 } else if (isIceDamage) {
454 } else {
456 }
457 }
458
459 if ((battleStatus->lastAttackDamage <= 0 && !wasStatusInflicted) || (targetPart->flags & ACTOR_FLAG_DAMAGE_IMMUNE)) {
461 }
462
463 if ((battleStatus->curAttackStatus & STATUS_FLAG_SLEEP) && wasStatusInflicted) {
465 script->varTable[0] = state->goalPos.x;
466 script->varTable[1] = state->goalPos.y;
467 script->varTable[2] = state->goalPos.z;
469 }
470 if ((battleStatus->curAttackStatus & STATUS_FLAG_DIZZY) && wasStatusInflicted) {
472 script->varTable[0] = state->goalPos.x;
473 script->varTable[1] = state->goalPos.y;
474 script->varTable[2] = state->goalPos.z;
476 }
477 if ((battleStatus->curAttackStatus & STATUS_FLAG_PARALYZE) && wasStatusInflicted) {
479 script->varTable[0] = state->goalPos.x;
480 script->varTable[1] = state->goalPos.y;
481 script->varTable[2] = state->goalPos.z;
483 }
484 if ((battleStatus->curAttackStatus & STATUS_FLAG_POISON) && wasStatusInflicted) {
486 script->varTable[0] = state->goalPos.x;
487 script->varTable[1] = state->goalPos.y;
488 script->varTable[2] = state->goalPos.z;
490 }
491 if ((battleStatus->curAttackStatus & STATUS_FLAG_STOP) && wasStatusInflicted) {
493 script->varTable[0] = state->goalPos.x;
494 script->varTable[1] = state->goalPos.y;
495 script->varTable[2] = state->goalPos.z;
497 }
498 if ((battleStatus->curAttackStatus & STATUS_FLAG_FROZEN) && wasStatusInflicted) {
500 script->varTable[0] = state->goalPos.x;
501 script->varTable[1] = state->goalPos.y;
502 script->varTable[2] = state->goalPos.z;
503 script->varTablePtr[3] = target;
505 }
506 if ((battleStatus->curAttackStatus & STATUS_FLAG_SHRINK) && wasStatusInflicted) {
508 script->varTable[0] = state->goalPos.x;
509 script->varTable[1] = state->goalPos.y;
510 script->varTable[2] = state->goalPos.z;
511 script->varTablePtr[3] = target;
513 }
514 if ((battleStatus->curAttackElement & DAMAGE_TYPE_SMASH) && (target->actorType == ACTOR_TYPE_GOOMNUT_TREE)) {
516 }
517
518 show_actor_health_bar(target);
519
521 if (hitResult == HIT_RESULT_HIT) {
522 hitResult = HIT_RESULT_NICE;
523 }
524 if (hitResult == HIT_RESULT_NO_DAMAGE) {
525 hitResult = HIT_RESULT_NICE_NO_DAMAGE;
526 }
527 }
528
529 return hitResult;
530}
s16 lastDamageTaken
struct ActorBlueprint * actorBlueprint
s32 elementalImmunities
s16 damageCounter
s16 hudElementDataIndex
s16 hpChangeCounter
s8 staticDuration
s8 transparentDuration
#define INFLICT_STATUS(STATUS_TYPE)
#define rand_int
@ ACTION_RATING_SUPER
sets nice hits = 2
Definition enums.h:1982
@ ACTION_RATING_NICE
sets nice hits = 1
Definition enums.h:1979
@ ACTOR_CLASS_MASK
Definition enums.h:2080
@ BS_FLAGS1_NO_RATING
Definition enums.h:3577
@ BS_FLAGS1_PARTNER_ACTING
Definition enums.h:3588
@ BS_FLAGS1_SUPER_HIT
Definition enums.h:3579
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3576
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ BS_FLAGS1_SHOW_PLAYER_DECORATIONS
Definition enums.h:3568
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3571
@ BS_FLAGS1_ACTORS_VISIBLE
Definition enums.h:3565
@ ACTOR_EVENT_FLAG_RIDING_BROOMSTICK
Actor is on Magikoopa Broomstick, effect seems to be redundant.
Definition enums.h:3390
@ ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED
Actor glows and listens for Star Beam and Peach Beam events.
Definition enums.h:3386
@ ACTOR_EVENT_FLAG_GROUNDABLE
Actor can be knocked down from flight; triggered by jump attacks.
Definition enums.h:3382
@ ACTOR_EVENT_FLAG_ATTACK_CHARGED
Actor has charged an attack that can be removed with Star Beam.
Definition enums.h:3389
@ ACTOR_EVENT_FLAG_BURIED
Actor can only by hit by quake-element attacks.
Definition enums.h:3379
@ ACTOR_EVENT_FLAG_FLIPABLE
Actor can be flipped; triggered by jump and quake attacks.
Definition enums.h:3380
@ ACTOR_EVENT_FLAG_ENCHANTED
Actor glows and listens for the Star Beam event.
Definition enums.h:3385
@ ACTOR_PART_TARGET_NO_DAMAGE
Definition enums.h:1877
@ STATUS_KEY_PARALYZE
Definition enums.h:2201
@ STATUS_KEY_FROZEN
Definition enums.h:2203
@ STATUS_KEY_FEAR
Definition enums.h:2199
@ STATUS_KEY_SLEEP
Definition enums.h:2202
@ STATUS_KEY_STOP
Definition enums.h:2204
@ STATUS_KEY_DIZZY
Definition enums.h:2200
@ STATUS_KEY_DAZE
Definition enums.h:2209
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1953
@ HIT_RESULT_NICE
Definition enums.h:1951
@ STATUS_FLAG_STOP
Definition enums.h:2821
@ STATUS_FLAG_FROZEN
Definition enums.h:2814
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_PARALYZE
Definition enums.h:2816
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_POISON
Definition enums.h:2817
@ SOUND_DAMAGE_STARS
Definition enums.h:950
@ SOUND_INFLICT_STATUS
Definition enums.h:1355
@ SOUND_SMACK_TREE
Definition enums.h:787
@ SOUND_HIT_SHOCK
Definition enums.h:1195
@ SOUND_HIT_ICE
Definition enums.h:726
@ SOUND_HIT_FIRE
Definition enums.h:725
@ SOUND_INFLICT_SLEEP
Definition enums.h:1354
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_FLAG_DAMAGE_IMMUNE
Definition enums.h:3333
@ ACTOR_FLAG_NO_DMG_POPUP
Hide damage popup.
Definition enums.h:3341
@ ACTOR_FLAG_FLIPPED
Actor has been flipped over.
Definition enums.h:3330
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_INVUNERABLE_TAUNT
Definition enums.h:2150
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_STAR_BEAM
Definition enums.h:2140
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_FALL_TRIGGER
Definition enums.h:2134
@ EVENT_PEACH_BEAM
Definition enums.h:2141
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_EXPLODE_TRIGGER
Definition enums.h:2155
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_FLIP_TRIGGER
Definition enums.h:2135
@ ACTOR_PART_FLAG_DAMAGE_IMMUNE
electrified Plays extra hurt SFX?
Definition enums.h:3358
@ DAMAGE_TYPE_SPIN_SMASH
Definition enums.h:2876
@ DAMAGE_TYPE_POW
Definition enums.h:2861
@ DAMAGE_TYPE_ICE
Definition enums.h:2854
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ DAMAGE_TYPE_SMASH
Definition enums.h:2857
@ DAMAGE_TYPE_PEACH_BEAM
Definition enums.h:2873
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2877
@ DAMAGE_TYPE_REMOVE_BUFFS
Definition enums.h:2872
@ DAMAGE_TYPE_SHOCK
Definition enums.h:2856
@ DAMAGE_TYPE_FIRE
Definition enums.h:2852
@ DAMAGE_TYPE_DEATH
Definition enums.h:2864
@ DAMAGE_TYPE_QUAKE
Definition enums.h:2862
@ DAMAGE_TYPE_FEAR
Definition enums.h:2863
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
@ DAMAGE_TYPE_WATER
Definition enums.h:2853
@ EVT_PRIORITY_A
Definition evt.h:153
void show_primary_damage_popup(f32 x, f32 y, f32 z, s32 attack, s32 a)
Definition 190B20.c:2269
void show_immune_bonk(f32 x, f32 y, f32 z, s32, s32, s32)
void dispatch_event_actor(Actor *, s32)
Definition 1A5830.c:103
void show_actor_health_bar(Actor *)
Definition 190B20.c:2505
void remove_status_static(s32)
void remove_status_transparent(s32)
void set_actor_flash_mode(Actor *actor, s32 arg1)
Definition 190B20.c:2696
void show_damage_fx(Actor *actor, f32 x, f32 y, f32 z, s32 damage)
Definition 190B20.c:2334
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
s32 inflict_status(Actor *, s32, s32)
Definition 190B20.c:2084
s32 get_defense(Actor *actor, s32 *defenseTable, s32 elementFlags)
Definition 190B20.c:2219
void func_80266970(Actor *)
Definition 190B20.c:2439
void show_next_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32)
Definition 190B20.c:2295
void apply_shock_effect(Actor *)
void show_action_rating(s32, Actor *, f32, f32, f32)
Definition 190B20.c:2360
EvtScript EVS_PlayStopHitFX
Definition dmg_player.c:109
EvtScript EVS_PlayFreezeHitFX
Definition dmg_player.c:115
EvtScript EVS_PlayShrinkHitFX
Definition dmg_player.c:125
EvtScript EVS_PlayParalyzeHitFX
Definition dmg_player.c:97
EvtScript EVS_PlayPoisonHitFX
Definition dmg_player.c:103
EvtScript EVS_PlaySleepHitFX
Definition dmg_player.c:85
EvtScript EVS_PlayDizzyHitFX
Definition dmg_player.c:91
#define PANIC()
Definition macros.h:55
struct Actor * partnerActor