Download Data/CharacterEffectCompositeDef/Bleeding.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 3.09 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/Bleeding.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Data/CharacterEffectCompositeDef/Bleeding.lua
-
curl -L -o Bleeding.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/Bleeding.lua
3.09 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| PlaceObj('CharacterEffectCompositeDef', { | |
| 'Id', "Bleeding", | |
| 'Parameters', { | |
| PlaceObj('PresetParamNumber', { | |
| 'Name', "DamagePerTurn", | |
| 'Value', 5, | |
| 'Tag', "<DamagePerTurn>", | |
| }), | |
| PlaceObj('PresetParamNumber', { | |
| 'Name', "APLoss", | |
| 'Value', -1, | |
| 'Tag', "<APLoss>", | |
| }), | |
| PlaceObj('PresetParamPercent', { | |
| 'Name', "cth_penalty", | |
| 'Value', -10, | |
| 'Tag', "<cth_penalty>%", | |
| }), | |
| }, | |
| 'Comment', "reduced ap at start of turn, take damage at end turn; cth penalty", | |
| 'object_class', "StatusEffect", | |
| 'unit_reactions', { | |
| PlaceObj('UnitReaction', { | |
| Event = "OnEndTurn", | |
| Handler = function (self, target) | |
| if not IsInCombat() then return end | |
| if target:HasStatusEffect("BeingBandaged") then | |
| target:RemoveStatusEffect("Bleeding") | |
| return | |
| end | |
| local value = self:ResolveValue("DamagePerTurn") | |
| local floating_text = T{193053798048, "<num> (bleeding)", num = value} | |
| local pov_team = GetPoVTeam() | |
| local has_visibility = HasVisibilityTo(pov_team, target) | |
| local log_msg = T{729241506274, "<name> bleeds for <em><num> damage</em>", name = target:GetLogName(), num = value} | |
| target:TakeDirectDamage(value, has_visibility and floating_text or false, "short", log_msg) | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCalcChanceToHit", | |
| Handler = function (self, target, attacker, action, attack_target, weapon1, weapon2, data) | |
| if target == attacker then | |
| ApplyCthModifier_Add(self, data, self:ResolveValue("cth_penalty")) | |
| end | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCalcCritChance", | |
| Handler = function (self, target, attacker, attack_target, action, weapon, data) | |
| if target == attack_target and IsKindOf(data.weapon, "GutHookKnife") then | |
| data.guaranteed_crit = true | |
| end | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnUnitBandaged", | |
| Handler = function (self, target, healer, patient, hp_restored) | |
| if target == patient then | |
| target:RemoveStatusEffect(self.class) | |
| end | |
| end, | |
| }), | |
| }, | |
| 'DisplayName', T(779855732255, --[[CharacterEffectCompositeDef Bleeding DisplayName]] "Bleeding"), | |
| 'Description', T(303094247377, --[[CharacterEffectCompositeDef Bleeding Description]] "This character will <em>take <DamagePerTurn> damage</em> each turn until they are <em>bandaged</em>. Maximum <em>AP decreased by <APLoss></em>."), | |
| 'AddEffectText', T(902710213609, --[[CharacterEffectCompositeDef Bleeding AddEffectText]] "<em><DisplayName></em> is bleeding"), | |
| 'OnAdded', function (self, obj) | |
| if g_Teams[g_CurrentTeam] == obj.team and not obj:HasStatusEffect("BeingBandaged") then | |
| obj:ConsumeAP(-self:ResolveValue("APLoss") * const.Scale.AP) | |
| end | |
| end, | |
| 'OnRemoved', function (self, obj) | |
| if g_Combat and not obj:HasStatusEffect("BeingBandaged") then | |
| obj:ConsumeAP(self:ResolveValue("APLoss") * const.Scale.AP) | |
| end | |
| end, | |
| 'type', "Debuff", | |
| 'Icon', "UI/Hud/Status effects/bleeding", | |
| 'RemoveOnEndCombat', true, | |
| 'Shown', true, | |
| 'HasFloatingText', true, | |
| }) | |