From ca85f9b4608502102d29efc2e2be9348fadddac2 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Fri, 2 Oct 2020 17:27:51 +0200 Subject: [PATCH] Disruption Shield correctly respects the radius increase fomr Aether Avatar --- game/modules/tome/data/gfx/particles/arcanestorm.lua | 7 ++++--- game/modules/tome/data/talents/spells/arcane.lua | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/game/modules/tome/data/gfx/particles/arcanestorm.lua b/game/modules/tome/data/gfx/particles/arcanestorm.lua index a1219d6e4f..2993f09fd8 100644 --- a/game/modules/tome/data/gfx/particles/arcanestorm.lua +++ b/game/modules/tome/data/gfx/particles/arcanestorm.lua @@ -17,6 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org +local radius = radius or 5 base_size = 32 can_shift = true @@ -24,7 +25,7 @@ return { generator = function() local ad = rng.range(0, 360) local a = math.rad(ad) local dir = math.rad(ad + 90) - local r = rng.avg(1, 40 * 3) + local r = rng.avg(1, 16 + 32 * radius) local dirv = math.rad(5) return { @@ -44,7 +45,7 @@ return { generator = function() } end, }, function(self) - self.ps:emit(10) + self.ps:emit(radius * radius / 2) end, -500, +2000, "weather/snowflake" diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index c2b47b0e7b..7573354be6 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -152,7 +152,7 @@ newTalent{ use_only_arcane = 1, no_energy = true, tactical = { MANA = 3, DEFEND = 2, }, - radius = 5, + radius = function(self, t) return self:hasEffect(self.EFF_AETHER_AVATAR) and 10 or 5 end, getMaxAbsorb = function(self, t) return self:getShieldAmount(self:combatTalentSpellDamage(t, 50, 450)) end, getManaRatio = function(self, t) return self:combatTalentLimit(t, 0.2, 0.95, 0.35) end, -- Note: effects handled in mod.class.Actor:onTakeHit function @@ -175,7 +175,7 @@ newTalent{ DamageType.ARCANE, self:spellCrit(dam / 5), radius, 5, nil, - {type="arcanestorm", only_one=true}, + {type="arcanestorm", args={radius=radius}, only_one=true}, function(e) e.x = e.src.x e.y = e.src.y return true end, false ) -- GitLab