初级玩家
- 贡献度
- 0
- 金元
- 889
- 积分
- 89
- 精华
- 0
- 注册时间
- 2013-9-20
|
那个,我按照这个写的试着弄了一下,但是游戏玩不了了哎。
我把我写的贴上,求各路大神指点。
---------------------------------------------------------
-- Dwarves --
---------------------------------------------------------
newBirthDescriptor
{
type = "subrace",
name = "Duergar",
display_name = " 灰 矮 人 ",
desc = {
" 灰 矮 人 是 一 支 隐 秘 的 种 族, 生 活 于 地 下 世 界 钢 铁 王 座。 ",
" 他 们 是 支 强 壮 的 种 族 并 以 大 师 级 手 艺 而 闻 名, 但 是, 由 于 在 过 去 的 战 乱 中 为 了 自 身 利 益 抛 弃 了 其 他 种 族, 他 们 仍 然 不 受 欢 迎。 ",
" 他 们 天 生 掌 握 #GOLD# 灰 矮 人 血 统 #WHITE#, 允 许 他 们 永 久 的 提 高 力 量 和 体 质。 ",
"#GOLD# 属 性 修 正: ",
"#LIGHT_BLUE# * +4 力 量, -2 敏 捷, +3 体 质 ",
"#LIGHT_BLUE# * -2 魔 法, +3 意 志, +0 灵 巧 ",
"#GOLD# 每 等 级 增 加 生 命 值: #LIGHT_BLUE# 12",
"#GOLD# 经 验 惩 罚: #LIGHT_BLUE# 25%",
},
inc_stats = { str=4, con=3, wil=3, mag=-2, dex=-2 },
talents_types = { ["race/duergar"]={true, 0} },
talents = {
[ActorTalents.T_DUERGAR_DUERGAR]=1,
},
copy = {
moddable_tile = "dwarf_#sex#",
moddable_tile_ornament = {male="beard_02", female="braid_01"},
random_name_def = "dwarf_#sex#",
life_rating=12,
},
experience = 1.25,
}
这个直接写在dwarf.lua下面了。是这个问题么?
------------------------------------------------------------------
-- Duergar' powers
------------------------------------------------------------------
newTalentType{ type="race/duergar", name = "duergar", generic = true, description = "The various racial bonuses a character can have." }
newTalent{
name = "Duergar",
type = {"race/duergar", 1},
mode = "passive",
require = racial_req1,
points = 5,
on_learn = function(self, t)
self.inc_stats[self.STAT_STR] = self.inc_stats[self.STAT_STR] + 2
selfnStatChange(self.STAT_STR, 2)
self.inc_stats[self.STAT_CON] = self.inc_stats[self.STAT_CON] + 2
selfnStatChange(self.STAT_CON, 2)
end,
on_unlearn = function(self, t)
self.inc_stats[self.STAT_STR] = self.inc_stats[self.STAT_STR] - 2
selfnStatChange(self.STAT_STR, -2)
self.inc_stats[self.STAT_CON] = self.inc_stats[self.STAT_CON] - 2
selfnStatChange(self.STAT_CON, -2)
end,
info = function(self, t)
return ([[增 强 灰 矮 人 的 身 体, 增 加 %d 点 力 量 和 体 质。]]):format(2 * self:getTalentLevelRaw(t))
end,
}
newTalent{
name = "Fast Metabolism",
type = {"race/duergar", 2},
require = racial_req2,
mode = "passive",
points = 5,
getLifeRegen = function(self, t) return math.decimals(self:getTalentLevel(t, "con", 2, 20), 2)
end,
info = function(self, t)
local regen = t.getLifeRegen(self, t)
return ([[灰 矮 人 在 专 注 于 战 斗 时, 可 以 更 快 的 回 复 生 命 值( +%0.2f 生 命 值 / 回 合)。]]):format(regen)
end,
}
newTalent{
name = "Earthquake",
type = {"race/duergar",3},
require = racial_req3,
points = 5,
random_ego = "attack",
cooldown = 30,
tactical = { ATTACKAREA = { PHYSICAL = 2 }, DISABLE = { stun = 3 } },
range = 10,
radius = function(self, t)
return 2 + (self:getTalentLevel(t)/2)
end,
direct_hit = true,
requires_target = true,
target = function(self, t)
return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)}
end,
getDamage = function(self, t) return self:getTalentLevel(t, "con", 15, 80) end,
getDuration = function(self, t) return 3 + self:getTalentLevel(t) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local _ _, _, _, x, y = self:canProject(tg, x, y)
-- Add a lasting map effect
game.level.map:addEffect(self,
x, y, t.getDuration(self, t),
DamageType.PHYSICAL_STUN, t.getDamage(self, t),
self:getTalentRadius(t),
5, nil,
{type="quake"},
nil, self:spellFriendlyFire()
)
game:playSoundNear(self, "talents/earth")
return true
end,
info = function(self, t)
local damage = t.getDamage(self, t)
local radius = self:getTalentRadius(t)
local duration = t.getDuration(self, t)
return ([[引 起 一 波 强 烈 的 地 震, 每 回 合 造 成 %0.2f 物 理 伤 害( %d 码 半 径 范 围), 持 续 %d 回 合。 有 概 率 震 慑 此 技 能 所 影 响 到 的 怪 物。
受 体 质 影 响, 伤 害 有 额 外 加 成。]]):
format(damDesc(self, DamageType.PHYSICAL, damage), radius, duration)
end,
}
newTalent{
name = "Carbon Spikes",
type = {"race/duergar", 4},
require = racial_req4,
points = 5,
mode = "sustained",
cooldown = 12,
tactical = { BUFF =2, DEFEND = 2 },
getDamageOnMeleeHit = function(self, t) return self:getTalentLevel(t, "con", 10, 100) end,
getArmor = function(self, t) return math.ceil (self:getTalentLevel(t, "con", 20, 50)) end,
do_carbonRegrowth = function(self, t)
local maxspikes = t.getArmor(self, t)
if self.carbon_armor < maxspikes then
self.carbon_armor = self.carbon_armor + 1
end
end,
do_carbonLoss = function(self, t)
if self.carbon_armor >= 1 then
self.carbon_armor = self.carbon_armor - 1
else
-- Deactivate without loosing energy
self:forceUseTalent(self.T_CARBON_SPIKES, {ignore_energy=true})
end
end,
activate = function(self, t)
local power = t.getArmor(self, t)
self.carbon_armor = power
game:playSoundNear(self, "talents/spell_generic")
return {
armor = self:addTemporaryValue("carbon_spikes", power),
onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.BLEED]=t.getDamageOnMeleeHit(self, t)}),
}
end,
info = function(self, t)
local damage = t.getDamageOnMeleeHit(self, t)
local armor = t.getArmor(self, t)
return ([[脆 弱 的 碳 化 钉 刺 从 你 的 肉 体、 衣 服 和 护 甲 中 伸 出 来, 增 加 %d 点 护 甲 值。 同 时, 在 6 回 合 内 对 攻 击 者 造 成 总 计 %0.2f 点 流 血 伤 害。
每 次 你 受 到 攻 击 时, 护 甲 增 益 效 果 减 少 1 点。 每 回 合 会 自 动 回 复 1 点 护 甲 增 益 至 初 始 效 果。
如 果 护 甲 增 益 降 到 1 点 一 下, 则 技 能 会 被 中 断, 效 果 结 束。
受 体 质 影 响, 护 甲 增 益 和 流 血 伤 害 有 额 外 加 成。]]):
format(armor, damDesc(self, DamageType.PHYSICAL, damage))
end,
}
这个写在了races.lua里面,不知道会不会有影响。 |
|