3DMGAME 3DM首页 新闻中心 前瞻 | 评测 游戏库 热门 | 最新 攻略中心 攻略 | 秘籍 下载中心 游戏 | 汉化 购买正版 论坛

注册 登录

QQ登录

只需一步,快速开始

查看: 2149|回复: 5
打印 上一主题 下一主题

[求助] 如何修改心灵杀手的光环技能伤害为多属性伤害

[复制链接]

70

主题

1287

帖子

1254

积分

游戏狂人

Rank: 6Rank: 6

贡献度
36
金元
11104
积分
1254
精华
0
注册时间
2009-1-27
跳转到指定楼层
主题
发表于 2012-5-19 14:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
怎么想带多重属性伤害的武器一样,一次性造成几种属性的伤害

现在就只会改伤害数值,不会添加其他属性


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,
}

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|3DMGAME ( 京ICP备14006952号-1  沪公网安备 31011202006753号

GMT+8, 2026-4-10 18:23 , Processed in 0.031761 second(s), 15 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表