Download Data/CharacterEffectCompositeDef/BuildingConfidence.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/BuildingConfidence.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Data/CharacterEffectCompositeDef/BuildingConfidence.lua
-
curl -L -o BuildingConfidence.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/BuildingConfidence.lua
1.91 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| PlaceObj('CharacterEffectCompositeDef', { | |
| 'Group', "Perk-Personal", | |
| 'Id', "BuildingConfidence", | |
| 'Parameters', { | |
| PlaceObj('PresetParamNumber', { | |
| 'Name', "turnToProc", | |
| 'Value', 2, | |
| 'Tag', "<turnToProc>", | |
| }), | |
| PlaceObj('PresetParamPercent', { | |
| 'Name', "chanceToProc", | |
| 'Value', 50, | |
| 'Tag', "<chanceToProc>%", | |
| }), | |
| }, | |
| 'Comment', "MD - Inspired and + Morale after multiple turns", | |
| 'object_class', "Perk", | |
| 'unit_reactions', { | |
| PlaceObj('UnitReaction', { | |
| Event = "OnUnitAttack", | |
| Handler = function (self, target, attacker, action, attack_target, results, attack_args) | |
| if target == attacker then | |
| self:SetParameter("attacked", true) | |
| end | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCombatEnd", | |
| Handler = function (self, target) | |
| self:SetParameter("attacked", false) | |
| self:SetParameter("applied", false) | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnBeginTurn", | |
| Handler = function (self, target) | |
| if g_Combat.current_turn < self:ResolveValue("turnToProc") then return end | |
| if self:ResolveValue("attacked") and not self:ResolveValue("applied") then | |
| local chance = self:ResolveValue("chanceToProc") | |
| local roll = InteractionRand(100, "BuildingConfidence") | |
| if roll < chance then | |
| target:AddStatusEffect("Inspired") | |
| target.team:ChangeMorale(1, self.DisplayName) | |
| self:SetParameter("applied", true) | |
| end | |
| end | |
| end, | |
| }), | |
| }, | |
| 'DisplayName', T(110292118081, --[[CharacterEffectCompositeDef BuildingConfidence DisplayName]] "Find My Feet"), | |
| 'Description', T(969057307540, --[[CharacterEffectCompositeDef BuildingConfidence Description]] "Can become <GameTerm('Inspired')> and increase the team's <GameTerm('Morale')> during combat."), | |
| 'Icon', "UI/Icons/Perks/BuildingConfidence", | |
| 'Tier', "Personal", | |
| }) | |