Alchemy
Loading...
Searching...
No Matches

game.h

Go to the documentation of this file.
1/// @file
2/// Party members, items, Djinn and game-state operations.
3/// Far-call interfaces; their ordered jump stubs live in
4/// games/tbs/src/system/far_call/GAME.S.
5
7#ifndef OWN_UnitGetFar
8struct BattleUnit *UnitGetFar(u32 owner);
9#endif
10void UnitCalcFar(s32 owner);
12/// Far call to Inventory_GetQuantity.
14s32 Inventory_AddItemFar(s32 owner_id, s32 item_id);
16s32 Inventory_FindFar(s32 owner, s32 item_id);
24/// Far call to BattleAction_GetDirect.
25struct BattleAct *BattleActGet(s32 actionId);
30 struct LevelUpResult *value);
35void GameFlag_SetByteFar(s32 flag, s32 value);
36s32 Unit_AddHpFar(s32 owner, s32 delta);
37s16 Unit_AddPpFar(s32 owner, s32 delta);
38void UnitRatioFar(s32 owner_id);
39void Unit_SetHpFar(struct BattleUnit *unit, s32 hp);
40s32 BattleUnitSetFar(s32 unitId, s32 enemyId, s32 suffix);
47/// Far call to BattleFx_RollSuccess.
48s32 BattleHitCheck(s32 caster, s32 target, s32 resistance_category,
49 s32 effect_id, s32 success_scale);
50/// Far call to Battle_CalcAttackDamage.
52/// Far call to Battle_CalcPsynergyPower.
53s32 BattlePowerCalc(s32 power, s32 bonus, s32 rate);
54/// Far call to Battle_CalcRecovery.
55s32 BattleRecoveryCalc(s32 power, s32 element, s32 rate);
56const u8 *Enemy_GetDefinitionFar(s32 selector);
58s32 Djinn_AddToOwnerFar(s32 owner, s32 index, s32 bit);
59s32 Djinn_ActivateFar(s32 owner, s32 index, s32 bit);
60u32 Djinn_DeactivateFar(s32 owner, s32 index, s32 bit);
63s32 Djinn_TransferFar(s32 source, s32 index, s32 bit, s32 target);
65/// Far call to SummonDefinition_GetNear.
66const struct SummonDefinition *SummonDefinition_Get(u32 summon_id);
68void Unit_LevelUpToFar(s32 unit, s32 lv);
70u32 Djinn_IsActiveFar(s32 owner, s32 index, s32 bit);
71s32 Djinn_IsReadyFar(s32 owner, s32 index, s32 bit);
72/// Far call to Item_CanOwnerEquipDirect.
s32 Party_AddActiveOwnerFar(s32 value)
struct BattleUnit * UnitGetFar(u32 owner)
struct ItemDefinition * Item_GetDirectFar(s32 item)
s32 BattleUnitSetFar(s32 unitId, s32 enemyId, s32 suffix)
s32 Inventory_CountItemFar(s32 owner, s32 item_id)
s32 Party_ListActiveOwnersFar(s16 *owners)
s32 PartyInventory_CountFreeSlotsFar(void)
s16 Unit_AddPpFar(s32 owner, s32 delta)
s32 Item_AdjustCounterFar(s32 item_id, s32 delta)
s32 BattleHitCheck(s32 caster, s32 target, s32 resistance_category, s32 effect_id, s32 success_scale)
Far call to BattleFx_RollSuccess.
s32 GameFlag_TestFar(s32 flag)
u32 * DjinnRecovery_AddStandbyFar(u32 kind, u32 first, u32 second)
s32 BattlePowerCalc(s32 power, s32 bonus, s32 rate)
Far call to Battle_CalcPsynergyPower.
s32 Equipment_GetUnleashRateBonusFar(struct BattleUnit *owner)
void Party_BeginChildhoodFar(void)
s32 PartyInventory_CountItemFar(s32 item_id)
s32 PartyInventory_DiscardFar(s32 item_id)
void UnitRatioFar(s32 owner_id)
s32 Inventory_CountFar(s32 owner)
s32 Inventory_FindEquippedFar(s32 owner, s32 type)
s32 Inventory_AddItemFar(s32 owner_id, s32 item_id)
s32 Item_GetEquipmentGroupFar(s32 item_id)
s32 Item_IsCompatibleWithOwnerFar(s32 unit, s32 item)
void InventorySnapshot_SaveFar(void)
s32 Unit_RefreshPsynergyFar(s32 owner)
struct LevelUpResult * Unit_TryLevelUpFar(s32 owner_id, struct LevelUpResult *value)
void * Djinn_GetRecoveryTableFar(s32 arg0)
struct BattleAct * BattleActGet(s32 actionId)
Far call to BattleAction_GetDirect.
s32 Inventory_GetEquippedItemFar(struct BattleUnit *inv, s32 type)
u32 Djinn_IsActiveFar(s32 owner, s32 index, s32 bit)
s32 Inventory_RepairFar(s32 owner, s32 slot)
s32 Djinn_TransferFar(s32 source, s32 index, s32 bit, s32 target)
s32 Unit_GetElementLevelFar(s32 owner, s32 index)
s32 GameFlag_SetBitFar(s32 flag)
s32 Djinn_AddToLeastLoadedOwnerFar(s32 element, s32 djinn)
void GameFlag_SetByteFar(s32 flag, s32 value)
s32 RollWeaponUnleashFar(struct BattleUnit *owner)
void Unit_SetHpFar(struct BattleUnit *unit, s32 hp)
s32 Inventory_RemoveFar(s32 owner, s32 slot)
void InventorySnapshot_RestoreFar(void)
s32 Unit_LearnPsynergyFar()
s32 DjinnRecovery_RemoveFar(s32 owner, s32 index, s32 bit)
u32 Djinn_DeactivateFar(s32 owner, s32 index, s32 bit)
s32 Unit_AddHpFar(s32 owner, s32 delta)
s32 Item_GetEquippedElementFar(s32 id)
s32 BattleRecoveryCalc(s32 power, s32 element, s32 rate)
Far call to Battle_CalcRecovery.
s32 Summon_ListLearnedFar(u8 *output)
s32 Djinn_AddToOwnerFar(s32 owner, s32 index, s32 bit)
const struct SummonDefinition * SummonDefinition_Get(u32 summon_id)
Far call to SummonDefinition_GetNear.
s32 Djinn_GetAbilityIdFar(u32 group, u32 index)
s32 PartyInventory_RemoveFar(s32 item_id)
u32 Runtime_GetBuildStampTimeFar()
s32 Inventory_BreakFar(s32 owner, s32 slot)
void Unit_LevelUpToFar(s32 unit, s32 lv)
void Party_EndChildhoodFar(void)
s32 PartyInventory_FindOwnerFar(s32 item_id)
s32 Party_RemoveActiveOwnerFar(s32 value)
void Party_RestoreHpPpFar(s32 arg0)
s32 Shop_GetSelectionState(s32 owner, s32 slot)
Far call to Inventory_GetQuantity.
void Party_RestorePpOfLitElementsFar(void)
s32 Inventory_EquipFar(s32 owner, s32 slot)
s32 Battle_IsReviveEffectFar(s32 effect_id)
s32 PartyInventory_HasSpaceFar(void)
s32 Item_CanOwnerEquip(s32 unit, s32 item)
Far call to Item_CanOwnerEquipDirect.
s32 Unit_KnowsActionFar(s32 owner, s32 value)
void GameFlag_RefreshLureCapFar(void)
s32 Party_SumDjinnCountsFar(s32 index)
s32 Djinn_IsReadyFar(s32 owner, s32 index, s32 bit)
s32 Party_AdjustShopGiftsFar(s32 amount)
s32 Inventory_FindFar(s32 owner, s32 item_id)
s32 PartyInventory_AddFar(s32 item_id)
const u8 * Enemy_GetDefinitionFar(s32 selector)
u32 Unit_GetExperienceForLevelFar(s32 owner, s32 level)
s32 Party_CountActiveOwnersFar(void)
s32 BattleRandomFar(void)
s32 GameFlag_GetByteFar(s32 flag)
void GameFlag_ClearBitFar(s32 flag)
s32 Djinn_ActivateFar(s32 owner, s32 index, s32 bit)
u32 Party_GetAverageLevelFar(void)
void UnitCalcFar(s32 owner)
void GameState_InitDefaultsFar(void)
s32 Inventory_DiscardFar(s32 owner, s32 slot)
s32 Party_AdjustShopCreditFar(s32 amount)
s32 BattleAtkCalc(s32 atk, s32 def, s32 add, s32 bonus)
Far call to Battle_CalcAttackDamage.
s32 Inventory_CheckDiscardFar(s32 owner, s32 slot)
s32 Party_AdjustCoinsFar(s32 amount)
An ability's definition, a row of gBattleAction_DefinitionTable: its targeting, kind,...
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
An item's definition: its price, type, who can equip it, its bonuses and unleash, its effects and the...
Definition item.h:104
u8 type
enum ItemType; 0 for an item that is not equipment
Definition item.h:106
A level up's result: the level reached, an ability learned and the gain in each stat.
Definition character.h:136
A summon: its name's message and the Djinn of each element it needs.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned char u8
Definition types.h:11