游戏狂人
 
- 贡献度
- 36
- 金元
- 11104
- 积分
- 1254
- 精华
- 0
- 注册时间
- 2009-1-27
|
怎么想带多重属性伤害的武器一样,一次性造成几种属性的伤害
现在就只会改伤害数值,不会添加其他属性
newTalent{
name = "Kinetic Aura",
type = {"psionic/projection", 1},
require = psi_wil_req1, no_sustain_autoreset = true,
points = 5,
mode = "sustained",
sustain_psi = 30,
remove_on_zero = true,
cooldown = function(self, t)
return 15 - (self:getTalentLevelRaw(self.T_AURA_DISCIPLINE) or 0)
end,
tactical = { ATTACKAREA = { PHYSICAL = 2 } },
on_pre_use = function(self, t, silent)
if self:isTalentActive(self.T_THERMAL_AURA) and self:isTalentActive(self.T_CHARGED_AURA) then
if not silent then game.logSeen(self, "You may only sustain two auras at once. Aura activation cancelled.") end
return false
end
return true
end,
range = aura_range,
radius = aura_radius,
target = aura_target,
getSpikedRange = function(self, t)
local r = 6
local gem_level = getGemLevel(self)
local mult = (1 + 0.02*gem_level*(self:getTalentLevel(self.T_REACH)))
r = math.floor(r*mult)
return math.min(r, 10)
end,
getNormalRange = function(self, t)
return 0
end,
getSpikedRadius = function(self, t)
return 0
end,
getNormalRadius = function(self, t)
return 1
end,
getSpikedTarget = function(self, t)
return {type="beam", nolock=true, range=t.getSpikedRange(self, t), talent=t}
end,
getNormalTarget = function(self, t)
return {type="ball", range=t.getNormalRange(self, t), radius=t.getNormalRadius(self, t), selffire=false, friendlyfire=false}
end,
requires_target = function(self, t)
-- Spiked ability
if self:isTalentActive(t.id) and self:getPsi() > t.getSpikeCost(self, t) then
return true
-- Normal ability
else
return false
end
end,
getSpikeCost = function(self, t)
return t.sustain_psi - 2*getGemLevel(self)
end,
getAuraStrength = function(self, t)
return aura_strength(self, t)
end,
getAuraSpikeStrength = function(self, t)
return aura_spike_strength(self, t)
end,
getKnockback = function(self, t)
return 3 + math.floor(self:getTalentLevel(t))
end,
do_kineticaura = function(self, t)
local mast = aura_mastery(self, t)
local dam = t.getAuraStrength(self, t)
local tg = t.getNormalTarget(self, t)
self:project(tg, self.x, self.y, function(tx, ty)
local act = game.level.map(tx, ty, engine.Map.ACTOR)
if act then
self:incPsi(-dam/mast)
self:breakStepUp()
end
DamageType:get(DamageType.PHYSICAL).projector(self, tx, ty, DamageType.PHYSICAL, dam)
end)
end,
activate = function(self, t)
--if self:isTalentActive(self.T_THERMAL_AURA) and self:isTalentActive(self.T_CHARGED_AURA) then
-- game.logSeen(self, "You may only sustain two auras at once. Aura activation cancelled.")
-- return false
--end
return true
end,
deactivate = function(self, t, p)
local dam = t.getAuraSpikeStrength(self, t)
local cost = t.getSpikeCost(self, t)
if self:getPsi() <= cost then
game.logPlayer(self, "The aura dissipates without producing a spike.")
return true
end
local tg = t.getSpikedTarget(self, t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local actor = game.level.map(x, y, Map.ACTOR)
--if core.fov.distance(self.x, self.y, x, y) == 1 and not actor then return true end
if core.fov.distance(self.x, self.y, x, y) == 0 then return true end
self:project(tg, x, y, DamageType.BATTER, self:spellCrit(rng.avg(0.8*dam, dam)))
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(self.x, self.y, tg.radius, "matter_beam", {tx=x-self.x, ty=y-self.y})
self:incPsi(-cost)
return true
end,
info = function(self, t)
local dam = t.getAuraStrength(self, t)
local spikedam = t.getAuraSpikeStrength(self, t)
local mast = aura_mastery(self, t)
local spikecost = t.getSpikeCost(self, t)
return ([[Fills the air around you with reactive currents of force that do %d physical damage to all who approach. All damage done by the aura will drain one point of energy per %0.2f points of damage dealt.
When deactivated, if you have at least %d energy, a massive spike of kinetic energy is released as a beam, smashing targets for %d physical damage and sending them flying. Telekinetically wielding a gem instead of a weapon will result in improved spike efficiency.
To turn off an aura without spiking it, deactivate it and target yourself.]]):format(dam, mast, spikecost, spikedam)
end,
}
|
|