File size: 1,464 Bytes
b6a38d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ==========

PlaceObj('CharacterEffectCompositeDef', {
	'Group', "Perk-NPC",
	'Id', "AI_AdditionalAP",
	'Parameters', {
		PlaceObj('PresetParamNumber', {
			'Name', "bonus",
			'Value', 8,
			'Tag', "<bonus>",
		}),
	},
	'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 <em><bonus> AP</em>."),
	'AddEffectText', T(409912479847, --[[CharacterEffectCompositeDef AI_AdditionalAP AddEffectText]] "<em><DisplayName></em> 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,
})