Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
battle::actor::paragoomba Namespace Reference

Enumerations

enum  ActorPartIDs { PRT_MAIN = 1 , PRT_FLYING = 2 , PRT_DUMMY_WING_L = 3 , PRT_DUMMY_WING_R = 4 }
 

Variables

s32 DefaultAnims []
 
s32 LeftWingAnims []
 
s32 RightWingAnims []
 
EvtScript EVS_Init
 
EvtScript EVS_Idle
 
EvtScript EVS_TakeTurn
 
EvtScript EVS_HandleEvent
 
EvtScript EVS_KnockDown
 
constexpr s32 hp = 2
 
constexpr s32 dmgAirKick = 1
 
s32 FlyingDefense []
 
s32 FlyingStatusTable []
 
ActorPartBlueprint ActorParts []
 
s32 ShuffleAnims []
 
EvtScript EVS_Paragoomba_GoHome
 

Enumeration Type Documentation

◆ ActorPartIDs

Enumerator
PRT_MAIN 
PRT_FLYING 
PRT_DUMMY_WING_L 
PRT_DUMMY_WING_R 

Definition at line 478 of file goomba_family.inc.cpp.

478 {
479 PRT_MAIN = 1, // body after being downed (must use same name as Goomba part #1)
480 PRT_FLYING = 2, // body while flying
481 PRT_DUMMY_WING_L = 3, // temporary wing while being downed
482 PRT_DUMMY_WING_R = 4, // temporary wing while being downed
483};

Variable Documentation

◆ DefaultAnims

s32 battle::actor::paragoomba::DefaultAnims
Initial value:

Definition at line 570 of file goomba_family.inc.cpp.

◆ LeftWingAnims

s32 battle::actor::paragoomba::LeftWingAnims

◆ RightWingAnims

s32 battle::actor::paragoomba::RightWingAnims

◆ EVS_Init

EvtScript battle::actor::paragoomba::EVS_Init
Initial value:
= {
Call(BindTakeTurn, ACTOR_SELF, Ref(EVS_TakeTurn))
Call(BindIdle, ACTOR_SELF, Ref(EVS_Idle))
Call(BindHandleEvent, ACTOR_SELF, Ref(EVS_HandleEvent))
}
@ ACTOR_SELF
Definition enums.h:2084
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Return
Kills the current EVT thread.
Definition macros.h:217

Definition at line 606 of file goomba_family.inc.cpp.

606 {
607 Call(BindTakeTurn, ACTOR_SELF, Ref(EVS_TakeTurn))
608 Call(BindIdle, ACTOR_SELF, Ref(EVS_Idle))
609 Call(BindHandleEvent, ACTOR_SELF, Ref(EVS_HandleEvent))
610 Return
611 End
612};

◆ EVS_Idle

EvtScript battle::actor::paragoomba::EVS_Idle

Definition at line 614 of file goomba_family.inc.cpp.

614 {
615 Label(10)
616 Call(RandInt, 80, LVar0)
617 Add(LVar0, 80)
618 Loop(LVar0)
619 Label(0)
622 Wait(1)
623 Goto(0)
624 EndIf
625 Wait(1)
626 EndLoop
628 Add(LVar0, 5)
630 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(ShuffleAnims))
633 Loop(20)
634 Label(1)
637 Wait(1)
638 Goto(1)
639 EndIf
640 Wait(1)
641 EndLoop
643 Sub(LVar0, 5)
647 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(DefaultAnims))
648 Loop(40)
649 Label(2)
652 Wait(1)
653 Goto(2)
654 EndIf
655 Wait(1)
656 EndLoop
657 Goto(10)
658 Return
659 End
660};
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ EASING_LINEAR
Definition enums.h:510
ApiStatus RandInt(Evt *script, b32 isInitialCall)
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148

◆ EVS_TakeTurn

EvtScript battle::actor::paragoomba::EVS_TakeTurn

Definition at line 784 of file goomba_family.inc.cpp.

784 {
794 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
801 Set(LVarA, LVar0)
802 Wait(10)
818 Sub(LVar0, 80)
819 Set(LVar1, 20)
824 Thread
825 Loop(4)
827 Wait(4)
828 EndLoop
832 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0))
833 Wait(10)
836 EndIf
837 Wait(10)
838 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0))
844 ExecWait(EVS_Paragoomba_GoHome)
846 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
849 Return
852 Wait(10)
872 Wait(2)
879 Call(AddGoalPos, ACTOR_SELF, 50, 10, 0)
884 Wait(5)
887 ExecWait(EVS_Paragoomba_GoHome)
892 Return
893 End
894};
@ BTL_CAM_XADJ_AVG
Definition enums.h:4899
@ ACTOR_SOUND_FLY
Definition enums.h:2035
@ ACTOR_SOUND_JUMP
Definition enums.h:2036
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3574
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3570
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_LUCKY
Definition enums.h:1955
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ BTL_CAM_ENEMY_DIVE
Definition enums.h:4887
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4884
@ EASING_QUADRATIC_OUT
Definition enums.h:514
@ IDLE_SCRIPT_RESTART
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6406
@ SOUND_PARAGOOMBA_FLY
Definition enums.h:1509
@ SOUND_NONE
Definition enums.h:547
@ SOUND_PARAGOOMBA_PREDIVE
Definition enums.h:1510
@ SOUND_PARAGOOMBA_DIVE
Definition enums.h:1029
@ ACTOR_PLAYER
Definition enums.h:2085
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4904
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define LVarA
Definition macros.h:158
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269

◆ EVS_HandleEvent

EvtScript battle::actor::paragoomba::EVS_HandleEvent

Definition at line 672 of file goomba_family.inc.cpp.

672 {
679 SetConst(LVar0, PRT_FLYING)
686 ExecWait(EVS_KnockDown)
687 EndIf
688 EndIf
691 SetConst(LVar0, PRT_FLYING)
696 SetConst(LVar0, PRT_FLYING)
700 SetConst(LVar0, PRT_FLYING)
703 Return
705 SetConst(LVar0, PRT_FLYING)
708 ExecWait(EVS_KnockDown)
710 SetConst(LVar0, PRT_FLYING)
714 ExecWait(EVS_KnockDown)
716 SetConst(LVar0, PRT_FLYING)
719 SetConst(LVar0, PRT_FLYING)
723 ExecWait(EVS_Paragoomba_GoHome)
725 SetConst(LVar0, PRT_FLYING)
728 SetConst(LVar0, PRT_FLYING)
731 Return
736 SetConst(LVar0, PRT_FLYING)
741 SetConst(LVar0, PRT_FLYING)
744 Wait(10)
745 SetConst(LVar0, PRT_FLYING)
748 Return
750 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
754 ExecWait(EVS_Paragoomba_GoHome)
757 SetConst(LVar0, PRT_FLYING)
762 SetConst(LVar0, PRT_FLYING)
766 Return
768 SetConst(LVar0, PRT_FLYING)
772 SetConst(LVar0, PRT_FLYING)
775 Return
780 Return
781 End
782};
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ ENCOUNTER_TRIGGER_HAMMER
Definition enums.h:271
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3329
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_BEGIN_FIRST_STRIKE
Definition enums.h:2173
@ EVENT_STAR_BEAM
Definition enums.h:2140
@ EVENT_END_FIRST_STRIKE
Definition enums.h:2171
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_FALL_TRIGGER
Definition enums.h:2134
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_15
Definition enums.h:2137
@ EVENT_AIR_LIFT_FAILED
Definition enums.h:2152
@ EVENT_BEGIN_AIR_LIFT
Definition enums.h:2175
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ EVENT_BLOW_AWAY
Definition enums.h:2143
EvtScript EVS_Enemy_Knockback
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370

◆ EVS_KnockDown

EvtScript battle::actor::paragoomba::EVS_KnockDown

Definition at line 898 of file goomba_family.inc.cpp.

898 {
905 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2)
906 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2)
907 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2)
908 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2)
912 Else
914 EndIf
917 Set(LVar1, 0)
922 Thread
923 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3))
930 Add(LVar4, 10)
931 Add(LVar5, 5)
933 EndIf
938 Loop(10)
941 Wait(1)
944 Wait(1)
945 EndLoop
949 Mod(LVar0, 4)
955 Call(SetStatusTable, ACTOR_SELF, Ref(goomba::StatusTable))
957 ExecWait(goomba::EVS_Init)
961 Return
962 End
963};
@ SOUND_FALL_QUICK
Definition enums.h:1090
@ ACTOR_FLAG_TYPE_CHANGED
Indicates actors type has changed, triggers recheck for if HP bar should be shown based on tattle sta...
Definition enums.h:3332
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ ACTOR_PART_FLAG_NO_SHADOW
Definition enums.h:3352
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
Definition enums.h:3361
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
Definition enums.h:3360
@ ACTOR_PART_FLAG_INVISIBLE
Definition enums.h:3350
@ CAM_BATTLE
Definition enums.h:1801
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Mod(VAR, INT_VALUE)
Definition macros.h:380
#define LVar5
Definition macros.h:153
#define PlayEffect(args...)
Definition macros.h:807
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151

◆ hp

constexpr s32 battle::actor::paragoomba::hp = 2
constexpr

Definition at line 486 of file goomba_family.inc.cpp.

◆ dmgAirKick

constexpr s32 battle::actor::paragoomba::dmgAirKick = 1
constexpr

Definition at line 487 of file goomba_family.inc.cpp.

◆ FlyingDefense

s32 battle::actor::paragoomba::FlyingDefense[]
Initial value:
= {
}
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115

Definition at line 489 of file goomba_family.inc.cpp.

489 {
492};

◆ FlyingStatusTable

s32 battle::actor::paragoomba::FlyingStatusTable[]
Initial value:
= {
}
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2227
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2234
@ STATUS_KEY_FROZEN
Definition enums.h:2203
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2228
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2232
@ STATUS_TURN_MOD_POISON
Definition enums.h:2233
@ STATUS_TURN_MOD_STOP
Definition enums.h:2237
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2230
@ STATUS_KEY_SHRINK
Definition enums.h:2206
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2229
@ STATUS_TURN_MOD_FEAR
Definition enums.h:2231
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2235
@ STATUS_KEY_DEFAULT
Definition enums.h:2198

Definition at line 494 of file goomba_family.inc.cpp.

◆ ActorParts

ActorPartBlueprint battle::actor::paragoomba::ActorParts[]

Definition at line 519 of file goomba_family.inc.cpp.

519 {
520 {
522 .index = PRT_MAIN,
523 .posOffset = { 0, 0, 0 },
524 .targetOffset = { 0, 20 },
525 .opacity = 255,
526 .idleAnimations = goomba::DefaultAnims,
527 .defenseTable = goomba::DefenseTable,
528 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
529 .elementImmunityFlags = 0,
530 .projectileTargetOffset = { 0, -10 },
531 },
532 {
534 .index = PRT_FLYING,
535 .posOffset = { 0, 0, 0 },
536 .targetOffset = { 0, 24 },
537 .opacity = 255,
538 .idleAnimations = DefaultAnims,
539 .defenseTable = FlyingDefense,
540 .eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
541 .elementImmunityFlags = 0,
542 .projectileTargetOffset = { 0, -10 },
543 },
544 {
546 .index = PRT_DUMMY_WING_L,
547 .posOffset = { 0, 0, 0 },
548 .targetOffset = { -16, 24 },
549 .opacity = 255,
550 .idleAnimations = LeftWingAnims,
551 .defenseTable = goomba::DefenseTable,
552 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
553 .elementImmunityFlags = 0,
554 .projectileTargetOffset = { 0, -10 },
555 },
556 {
558 .index = PRT_DUMMY_WING_R,
559 .posOffset = { 0, 0, 0 },
560 .targetOffset = { -16, 24 },
561 .opacity = 255,
562 .idleAnimations = RightWingAnims,
563 .defenseTable = goomba::DefenseTable,
564 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
565 .elementImmunityFlags = 0,
566 .projectileTargetOffset = { 0, -10 },
567 },
568};
@ ACTOR_EVENT_FLAG_GROUNDABLE
Actor can be knocked down from flight; triggered by jump attacks.
Definition enums.h:3382
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370

◆ ShuffleAnims

◆ EVS_Paragoomba_GoHome