Alchemy

battle_type.h

games/tbs/include/battle_type.h on GitHub

Structures

BattlePlan

struct BattlePlan

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

FieldDeclared as
actorIdu8 actorIdthe acting unit
targetCounts8 targetCounttargets in targetIds
targetIdsu8 targetIds[BATTLE_TARGET_CAPACITY]in battlefield order
targetOffsets8 targetOffset[BATTLE_TARGET_CAPACITY]Each target's place relative to the aimed one: negative to one side.
targetMultipliers8 targetMultiplier[BATTLE_TARGET_CAPACITY]The damage multiplier: 0 a miss, 1 a blow, 2 or 3 a double or triple.
targetCriticals8 targetCritical[BATTLE_TARGET_CAPACITY]enum BattleCritical
targetHits8 targetHit[BATTLE_TARGET_CAPACITY]1, 0 or HIT_NOT_ROLLED
commands16 commandenum BattleCommand
unk4au8 unk4a[2]not named by TBS code
abilityIds32 abilityId
elements32 elementenum Element
outcomes32 outcomeenum BattlePlanStaging: how the action is shown
presentationFlagsu32 presentationFlagsHow 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
failures32 failure0 cast; 1 the Psynergy is sealed, 2 too little PP
hauntDamageu32 hauntDamageThe damage the evil spirit deals a haunted actor at the end of its turn.

Used by BattleCommand_BuildPlan, BattlePres_BuildTargetList, BattlePres_RunActorEntries, BattlePres_RunAttack, BattlePres_RunEscape, BattlePres_RunItem, BattlePres_RunPlainAttack, BattlePres_RunPsynergyCast, BattlePresentation_RunUnitTransition.

Line 26

Enumerations

BattleCritical

enum BattleCritical

BattlePlan.targetCritical: the critical hit rolled for each target.

Value=
CRITICAL_NONE
CRITICAL_HITan attack's: a quarter more damage
CRITICAL_STRONGan ability's (effects 36 to 40): half as much again

Line 14

Macros

HIT_NOT_ROLLED

#define HIT_NOT_ROLLED -1

BattlePlan.targetHit while the hit is still to be rolled, as the ability lands; BattleCommand_BuildPlan rolls it ahead only for Annihilation.

Used by BattleCommand_BuildPlan.

Line 22

On this page