src/battle/battle_action.c
An action announced and built for its targets, btActionRunBuild. More…
Included by battle.c.
Macros
| Name | Description | |
|---|---|---|
#define | ATTACK_BEAM_SLASH 1 | A party member's plain attack, by the beam it plays (BEAM_KIND, battle_effect_beams.c): one blue slash for Isaac, Garet and Jenna, three short blue arcs for Ivan and Mia. |
#define | ATTACK_BEAM_WAVE 4 | |
#define | EFFECT_CHANCE_FULL 100 | gmBattleRollEffectSuccess's successScale at full strength, in percent. |
Enumerations
| Name | Description | |
|---|---|---|
enum | ACTION_CHANCE { CHANCE_DELUDED_MISS, CHANCE_BLOW_LIKELY, CHANCE_BLOW_RARE, C … } | The chances, out of 256, an action rolls against the battle's random byte. |
Functions
| Name | Description | |
|---|---|---|
Uint32 | btUnitIsListed (Uint32 unitId) | Returns 1 when the unit is in its side's list of units in the battle (btUnitListIds), 0 otherwise. |
Sint32 | btDjinnCountStandby (Uint32 unitId, Uint8 *counts) | Counts the standby Djinn on unitId's side, and each element's count into counts when it is not null. |
Sint32 | btActionRunBuild (BATTLE_ACTION *request, BATTLE_ACTION_RUN *plan) | Announces the action and builds it for its targets, paying its PP or Djinn. |
Description
An action announced and built for its targets, btActionRunBuild. Part of
battle.c.
Macros in detail
ATTACK_BEAM_SLASH
#define ATTACK_BEAM_SLASH 1
A party member's plain attack, by the beam it plays (BEAM_KIND,
battle_effect_beams.c): one blue slash for Isaac, Garet and Jenna, three
short blue arcs for Ivan and Mia.
Referenced by btActionRunBuild().
Definition at line 18 of file battle_action.c.
ATTACK_BEAM_WAVE
#define ATTACK_BEAM_WAVE 4
Referenced by btActionRunBuild().
Definition at line 19 of file battle_action.c.
EFFECT_CHANCE_FULL
#define EFFECT_CHANCE_FULL 100
gmBattleRollEffectSuccess's successScale at full strength, in percent.
Referenced by btActionRunBuild().
Definition at line 22 of file battle_action.c.
Enumerations in detail
ACTION_CHANCE
enum ACTION_CHANCE
The chances, out of 256, an action rolls against the battle's random byte.
| Enumerator | Value | Description |
|---|---|---|
CHANCE_DELUDED_MISS | 153 | a deluded attacker misses |
CHANCE_BLOW_LIKELY | 153 | a likely double or triple blow lands |
CHANCE_BLOW_RARE | 32 | a rare one |
CHANCE_BLOW | 64 | any other |
Definition at line 7 of file battle_action.c.
Functions in detail
btUnitIsListed
Uint32 btUnitIsListed(Uint32 unitId)
Returns 1 when the unit is in its side's list of units in the battle
(btUnitListIds), 0 otherwise.
References btUnitListIds() and Sint32.
Referenced by btActionRunBuild().
Definition at line 26 of file battle_action.c.
btDjinnCountStandby
Sint32 btDjinnCountStandby(Uint32 unitId, Uint8 *counts)
Counts the standby Djinn on unitId's side, and each element's count into counts when it is not null.
References btUnitListIds(), gmDjinnGetRecoveryTableStub() and Sint32.
Referenced by btActionRunBuild().
Definition at line 49 of file battle_action.c.
btActionRunBuild
Sint32 btActionRunBuild(BATTLE_ACTION *request, BATTLE_ACTION_RUN *plan)
Announces the action and builds it for its targets, paying its PP or Djinn.
Returns 0 to stage it, ACTION_REPORTED when it failed with its message shown,
or ACTION_NOTHING_TO_SHOW.
References AbilityBattleEffects, AbilityStaging, btAbilityIsPsynergy(), btDjinnCountStandby(), btElementGlowPlay(), btGetUnitAtPlace(), btHighlightSetModes(), btMessageWaitForAdvance(), btObjectGet(), btPlaybackMarkMessage(), btPlaybackPush(), btPlaybackReset(), btPlaybackRunAll(), btPlaybackSchedulePhase(), btPlaybackWaitForReady(), btSpriteGetAttackEffect(), btUnitIsListed(), DebugMode, fdActorSelectAnimationStub(), fdActorSetAnimationSpeedStub(), gmAbilityGetDefinitionStub(), gmBattleIsReviveEffectStub(), gmBattleRandomStub(), gmBattleRollEffectSuccessStub(), gmDjinnCanSetStub(), gmDjinnGetAbilityIdStub(), gmDjinnGetRecoveryTableStub(), gmDjinnIsSetStub(), gmDjinnRecoveryAddStandbyStub(), gmDjinnRecoveryRemoveStub(), gmDjinnSetStub(), gmEquipmentGetUnleashRateBonusStub(), gmEquipmentRollUnleashStub(), gmFlagGetStub(), gmInventoryGetEquippedItemStub(), gmItemGetDefinitionStub(), gmSummonDefinitionGetNearStub(), gmUnitAddHpStub(), gmUnitCalculateStub(), gmUnitGetAttackElementStub(), gmUnitGetStub(), gmUnitRecalculateGaugesStub(), mnBattleMessageShowAndWaitStub(), mnMessageArgumentClearAllStub(), mnMessageArgumentPushStub(), PerData, Sint32, sySoundPlayStub() and sySynch().
Referenced by btStagingDispatchAction().
Definition at line 93 of file battle_action.c.