Download Data/CharacterEffectCompositeDef/Claustrophobic.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 1.89 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/Claustrophobic.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Data/CharacterEffectCompositeDef/Claustrophobic.lua
-
curl -L -o Claustrophobic.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/Claustrophobic.lua
1.89 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| PlaceObj('CharacterEffectCompositeDef', { | |
| 'Group', "Quirk", | |
| 'Id', "Claustrophobic", | |
| 'SortKey', 1000, | |
| 'object_class', "Perk", | |
| 'unit_reactions', { | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCombatStarted", | |
| Handler = function (self, target, load_game) | |
| if IsSectorUnderground(gv_CurrentSectorId) and not target:HasStatusEffect("ClaustrophobiaChecked") then | |
| CombatLog("debug", T{Untranslated("<em>Claustrophobic</em> proc on <unit>"), unit = target.Name}) | |
| self:SetParameter("active", true) | |
| end | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCalcPersonalMorale", | |
| Handler = function (self, target, value) | |
| if self:ResolveValue("active") then | |
| return value - 1 | |
| end | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCombatEnd", | |
| Handler = function (self, target) | |
| self:SetParameter("active", false) | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnSatelliteTick", | |
| Handler = function (self, target) | |
| self:SetParameter("active", false) | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnUnitEnterMapVisual", | |
| Handler = function (self, target) | |
| if IsSectorUnderground(gv_CurrentSectorId) and not target:HasStatusEffect("ClaustrophobiaChecked") then | |
| CreateGameTimeThread(function() | |
| while GetInGameInterfaceMode() == "IModeDeployment" do | |
| Sleep(20) | |
| end | |
| PlayVoiceResponse(target, "Claustrophobic") | |
| end) | |
| end | |
| end, | |
| }), | |
| }, | |
| 'DisplayName', T(464805356385, --[[CharacterEffectCompositeDef Claustrophobic DisplayName]] "Claustrophobic"), | |
| 'Description', T(356135028604, --[[CharacterEffectCompositeDef Claustrophobic Description]] "<GameTerm('Morale')> decrease when starting combat in <em>underground</em> Sectors."), | |
| 'Icon', "UI/Icons/Perks/Claustrophobic", | |
| 'Tier', "Quirk", | |
| }) | |