Download Lua/CharacterEffectCompositeDef/Conscience_Sinful.generated.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Lua/CharacterEffectCompositeDef/Conscience_Sinful.generated.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Lua/CharacterEffectCompositeDef/Conscience_Sinful.generated.lua
-
curl -L -o Conscience_Sinful.generated.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Lua/CharacterEffectCompositeDef/Conscience_Sinful.generated.lua
1.47 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| UndefineClass('Conscience_Sinful') | |
| DefineClass.Conscience_Sinful = { | |
| __parents = { "StatusEffect" }, | |
| __generated_by_class = "CharacterEffectCompositeDef", | |
| object_class = "StatusEffect", | |
| unit_reactions = { | |
| PlaceObj('UnitReaction', { | |
| Event = "OnNewDay", | |
| Handler = function (self, target) | |
| Conscience_CheckExpiration(self, target, "guilty_start_time") | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCalcPersonalMorale", | |
| Handler = function (self, target, value) | |
| return value - 2 | |
| end, | |
| }), | |
| }, | |
| DisplayName = T(634244208298, --[[CharacterEffectCompositeDef Conscience_Sinful DisplayName]] "Remorseful"), | |
| Description = T(518452710606, --[[CharacterEffectCompositeDef Conscience_Sinful Description]] "Morale decreased by 2 for a day."), | |
| AddEffectText = T(949084683649, --[[CharacterEffectCompositeDef Conscience_Sinful AddEffectText]] "<em><DisplayName></em> is full of remorse and lost Morale"), | |
| OnAdded = function (self, obj) | |
| self:SetParameter("guilty_start_time", Game.CampaignTime) | |
| end, | |
| OnRemoved = function (self, obj) | |
| -- Handles old guilty modifiers, new guilty applies morale modifier | |
| local stats = UnitPropertiesStats:GetProperties() | |
| for i, stat in ipairs(stats) do | |
| obj:RemoveModifier("guilty_" .. stat.id, stat.id) | |
| end | |
| end, | |
| type = "Debuff", | |
| Icon = "UI/Hud/Status effects/encumbered", | |
| HasFloatingText = true, | |
| } | |