Download Lua/CharacterEffectCompositeDef/BuildingConfidence.generated.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Lua/CharacterEffectCompositeDef/BuildingConfidence.generated.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Lua/CharacterEffectCompositeDef/BuildingConfidence.generated.lua
-
curl -L -o BuildingConfidence.generated.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Lua/CharacterEffectCompositeDef/BuildingConfidence.generated.lua
1.66 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| UndefineClass('BuildingConfidence') | |
| DefineClass.BuildingConfidence = { | |
| __parents = { "Perk" }, | |
| __generated_by_class = "CharacterEffectCompositeDef", | |
| 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", | |
| } | |