File size: 1,922 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
-- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ==========
UndefineClass('Claustrophobic')
DefineClass.Claustrophobic = {
__parents = { "Perk" },
__generated_by_class = "CharacterEffectCompositeDef",
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",
}
|