Alchemy
Loading...
Searching...
No Matches

BattlePlan Struct Reference

One action, as BattleCommand_BuildPlan lays it out for BattleTargetExec to apply target by target. More...

#include <battle_type.h>

Data Fields

u8 actorId
 the acting unit
s8 targetCount
 targets in targetIds
u8 targetIds [BATTLE_TARGET_CAPACITY]
 in battlefield order
s8 targetOffset [BATTLE_TARGET_CAPACITY]
 Each target's place relative to the aimed one: negative to one side.
s8 targetMultiplier [BATTLE_TARGET_CAPACITY]
 The damage multiplier: 0 a miss, 1 a blow, 2 or 3 a double or triple.
s8 targetCritical [BATTLE_TARGET_CAPACITY]
 enum BattleCritical
s8 targetHit [BATTLE_TARGET_CAPACITY]
 1, 0 or HIT_NOT_ROLLED
s16 command
 enum BattleCommand
u8 unk4a [2]
 not named by TBS code
s32 abilityId
s32 element
 enum Element
s32 outcome
 enum BattlePlanStaging: how the action is shown
u32 presentationFlags
 How the effect is staged (STAGING_ in battle_internal.h).
s32 failure
 0 cast; 1 the Psynergy is sealed, 2 too little PP
u32 hauntDamage
 The damage the evil spirit deals a haunted actor at the end of its turn.

Detailed Description

One action, as BattleCommand_BuildPlan lays it out for BattleTargetExec to apply target by target.

Definition at line 26 of file battle_type.h.

Field Documentation

◆ actorId

◆ targetCount

◆ targetIds

◆ targetOffset

s8 BattlePlan::targetOffset[BATTLE_TARGET_CAPACITY]

Each target's place relative to the aimed one: negative to one side.

Definition at line 31 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), and BattleTargetExec().

◆ targetMultiplier

s8 BattlePlan::targetMultiplier[BATTLE_TARGET_CAPACITY]

The damage multiplier: 0 a miss, 1 a blow, 2 or 3 a double or triple.

Definition at line 33 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), BattlePres_RunAttack(), and BattleTargetExec().

◆ targetCritical

s8 BattlePlan::targetCritical[BATTLE_TARGET_CAPACITY]

◆ targetHit

s8 BattlePlan::targetHit[BATTLE_TARGET_CAPACITY]

1, 0 or HIT_NOT_ROLLED

Definition at line 35 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), and BattleTargetExec().

◆ command

s16 BattlePlan::command

enum BattleCommand

Definition at line 36 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), and BattleTargetExec().

◆ unk4a

u8 BattlePlan::unk4a[2]

not named by TBS code

Definition at line 37 of file battle_type.h.

◆ abilityId

s32 BattlePlan::abilityId

Definition at line 38 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), and BattleTargetExec().

◆ element

◆ outcome

s32 BattlePlan::outcome

enum BattlePlanStaging: how the action is shown

Definition at line 40 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), and BattlePresentation_DispatchAction().

◆ presentationFlags

u32 BattlePlan::presentationFlags

How the effect is staged (STAGING_ in battle_internal.h).

bits: 19 view reversed | 18 view across | 17 other side | 16 on downed | 15 scene | 14 by id range | 13..12 variant | 11..0 effect kind

Definition at line 44 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), BattlePres_BuildTargetList(), BattlePres_RunAttack(), BattlePres_RunItem(), BattlePres_RunPsynergyCast(), and BattlePresentation_RunUnitTransition().

◆ failure

s32 BattlePlan::failure

0 cast; 1 the Psynergy is sealed, 2 too little PP

Definition at line 45 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), BattlePres_RunPsynergyCast(), and BattlePresentation_RunUnitTransition().

◆ hauntDamage

u32 BattlePlan::hauntDamage

The damage the evil spirit deals a haunted actor at the end of its turn.

Definition at line 47 of file battle_type.h.

Referenced by BattleCommand_BuildPlan(), BattleTargetExec(), and BattleUnit_ProcessTurnEnd().