Download Lua/CharacterEffectCompositeDef/CQCTraining.generated.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Lua/CharacterEffectCompositeDef/CQCTraining.generated.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Lua/CharacterEffectCompositeDef/CQCTraining.generated.lua
-
curl -L -o CQCTraining.generated.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Lua/CharacterEffectCompositeDef/CQCTraining.generated.lua
1.22 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| UndefineClass('CQCTraining') | |
| DefineClass.CQCTraining = { | |
| __parents = { "Perk" }, | |
| __generated_by_class = "CharacterEffectCompositeDef", | |
| object_class = "Perk", | |
| unit_reactions = { | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCalcChanceToHit", | |
| Handler = function (self, target, attacker, action, attack_target, weapon1, weapon2, data) | |
| if target == attacker then | |
| local value = self:ResolveValue("cqc_bonus_max") | |
| local tileSpace = DivRound(attacker:GetDist2D(attack_target), const.SlabSizeX) - 1 | |
| if tileSpace > 0 then | |
| local lossPerTile = self:ResolveValue("cqc_bonus_loss_per_tile") | |
| value = value - lossPerTile * tileSpace | |
| end | |
| if value > 0 then | |
| ApplyCthModifier_Add(self, data, value) | |
| end | |
| end | |
| end, | |
| }), | |
| }, | |
| DisplayName = T(144446625840, --[[CharacterEffectCompositeDef CQCTraining DisplayName]] "CQC Training"), | |
| Description = T(145788352124, --[[CharacterEffectCompositeDef CQCTraining Description]] "Major <em>Accuracy</em> bonus when attacking enemies at short range (degrades with distance)."), | |
| Icon = "UI/Icons/Perks/CQCTraining", | |
| Tier = "Specialization", | |
| } | |