--- --- Defines a character effect that provides additional action points (AP) to inspired units. --- --- @class AI_AdditionalAP --- @field object_class string The class of the object this effect is applied to. --- @field unit_reactions table A table of unit reactions, including a reaction to the `OnCalcStartTurnAP` event that adds the bonus AP. --- @field Conditions table A table of conditions that check if the effect should be applied, including that the target is a unit and is not already inspired. --- @field DisplayName string The display name of the effect. --- @field Description string The description of the effect. --- @field AddEffectText string The text displayed when the effect is added. --- @field OnAdded function A function that is called when the effect is added, which grants the bonus AP to the target. --- @field type string The type of the effect, which is "Buff". --- @field lifetime string The lifetime of the effect, which is "Until End of Turn". --- @field Icon string The icon used to represent the effect. --- @field RemoveOnEndCombat boolean A flag indicating that the effect should be removed at the end of combat. -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== UndefineClass('AI_AdditionalAP') DefineClass.AI_AdditionalAP = {__parents={"CharacterEffect"}, __generated_by_class="CharacterEffectCompositeDef", object_class="CharacterEffect", unit_reactions={PlaceObj('UnitReaction', {Event="OnCalcStartTurnAP", Handler=function(self, target, value) if not self:ResolveValue("applied") then return value + self:ResolveValue("bonus") * const.Scale.AP end end})}, Conditions={PlaceObj('CheckExpression', {Expression=function(self, obj) return g_Combat and IsKindOf(obj, "Unit") and not obj:HasStatusEffect("Inspired") end})}, DisplayName=T(905544012922, --[[CharacterEffectCompositeDef AI_AdditionalAP DisplayName]] "Inspired"), Description=T(912592808613, --[[CharacterEffectCompositeDef AI_AdditionalAP Description]] "Gain AP."), AddEffectText=T(409912479847, --[[CharacterEffectCompositeDef AI_AdditionalAP AddEffectText]] " is inspired"), OnAdded=function(self, obj) if g_Teams[g_CurrentTeam] == obj.team then obj:GainAP(self:ResolveValue("bonus") * const.Scale.AP) self:SetParameter("applied", true) end end, type="Buff", lifetime="Until End of Turn", Icon="UI/Hud/Status effects/inspired", RemoveOnEndCombat=true}