Download Data/CharacterEffectCompositeDef/BloodlustPerk.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 2.18 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/BloodlustPerk.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/Data/CharacterEffectCompositeDef/BloodlustPerk.lua
-
curl -L -o BloodlustPerk.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/Data/CharacterEffectCompositeDef/BloodlustPerk.lua
2.18 kB
| -- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ========== | |
| PlaceObj('CharacterEffectCompositeDef', { | |
| 'Group', "Strength", | |
| 'Id', "BloodlustPerk", | |
| 'SortKey', 3, | |
| 'Parameters', { | |
| PlaceObj('PresetParamNumber', { | |
| 'Name', "Str_to_bonus_dmg_conversion", | |
| 'Value', 50, | |
| 'Tag', "<Str_to_bonus_dmg_conversion>", | |
| }), | |
| }, | |
| 'object_class', "Perk", | |
| 'unit_reactions', { | |
| PlaceObj('UnitReaction', { | |
| Event = "OnBeginTurn", | |
| Handler = function (self, target) | |
| self:SetParameter("target", false) | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnUnitAttack", | |
| Handler = function (self, target, attacker, action, attack_target, results, attack_args) | |
| if target == attacker then | |
| if action.ActionType ~= "Melee Attack" or not IsKindOf(attack_target, "Unit") then | |
| self:SetParameter("target", false) | |
| else | |
| self:SetParameter("target", attack_target.handle) | |
| end | |
| end | |
| end, | |
| }), | |
| PlaceObj('UnitReaction', { | |
| Event = "OnCalcDamageAndEffects", | |
| Handler = function (self, target, attacker, attack_target, action, weapon, attack_args, hit, data) | |
| if target == attacker and action then | |
| local last_target = self:ResolveValue("target") | |
| if action.ActionType == "Melee Attack" and last_target and IsKindOf(attack_target, "Unit") and attack_target.handle ~= last_target then | |
| local bonus = MulDivRound(attacker.Strength, self:ResolveValue("Str_to_bonus_dmg_conversion"), 100) | |
| data.base_damage = MulDivRound(data.base_damage, 100 + bonus, 100) | |
| data.breakdown[#data.breakdown + 1] = { name = self.DisplayName, value = bonus } | |
| end | |
| end | |
| end, | |
| }), | |
| }, | |
| 'DisplayName', T(700118302261, --[[CharacterEffectCompositeDef BloodlustPerk DisplayName]] "Killing Spree"), | |
| 'Description', T(419165368911, --[[CharacterEffectCompositeDef BloodlustPerk Description]] "Subsequent <em>Melee Attacks</em> against <em>different targets</em> during the same turn deal <em><percent(StatPercent('Strength', Str_to_bonus_dmg_conversion))></em> extra <em>Damage</em> (based on Strength)."), | |
| 'Icon', "UI/Icons/Perks/BloodlustPerk", | |
| 'Tier', "Bronze", | |
| 'Stat', "Strength", | |
| 'StatValue', 70, | |
| }) | |