From 63ad7551ea4b57cced28dbd2457db056609a5c3e Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Fri, 15 Jan 2010 16:04:19 +0000 Subject: [PATCH] dwarven resilience git-svn-id: http://svn.net-core.org/repos/t-engine4@248 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/birth/races/dwarf.lua | 2 +- game/modules/tome/data/birth/races/elf.lua | 8 +++++--- game/modules/tome/data/birth/races/human.lua | 3 ++- game/modules/tome/data/talents/misc/misc.lua | 20 ++++++++++++++++++++ game/modules/tome/data/timed_effects.lua | 20 ++++++++++++++++++++ 5 files changed, 48 insertions(+), 5 deletions(-) diff --git a/game/modules/tome/data/birth/races/dwarf.lua b/game/modules/tome/data/birth/races/dwarf.lua index 6d1184c5df..c864592865 100644 --- a/game/modules/tome/data/birth/races/dwarf.lua +++ b/game/modules/tome/data/birth/races/dwarf.lua @@ -24,7 +24,7 @@ newBirthDescriptor{ }, stats = { str=4, con=3, wil=3, mag=-2, dex=-2 }, talents = { --- [ActorTalents.T_], + [ActorTalents.T_DWARF_RESILIENCE]=1, }, copy = { default_wilderness = {"wilderness/main", 41, 18}, diff --git a/game/modules/tome/data/birth/races/elf.lua b/game/modules/tome/data/birth/races/elf.lua index f092dc9b32..2ecb00f87e 100644 --- a/game/modules/tome/data/birth/races/elf.lua +++ b/game/modules/tome/data/birth/races/elf.lua @@ -6,7 +6,7 @@ newBirthDescriptor{ name = "Elf", desc = { "Quendi are Elves, the first children of Eru.", - "The first Elves awoke by Cuiviénen, the Water of Awakening in the far east of Middle-earth, long Ages before the Rising of the Sun or Moon.", + "The first Elves awoke by Cuiviénen, the Water of Awakening in the far east of Middle-earth, long Ages before the Rising of the Sun or Moon.", "Unlike Men, the Elves are not subject to death by old age.", }, descriptor_choices = @@ -36,7 +36,8 @@ newBirthDescriptor name = "Nandor", desc = { "Elves who turned aside from the Great Journey in the early days and settled in th east of the Misty Mountains.", - "Both the Wood-Elves of Mirkwood and the Elves of Lórien are Nandor.", + "Both the Wood-Elves of Mirkwood and the Elves of Lórien are Nandor.", + "They posses the Grace of the Eldar talent which allows them a boost of speed every once in a while.", }, stats = { str=-2, mag=2, wil=3, cun=1, dex=1, con=0 }, experience = 1.3, @@ -45,7 +46,7 @@ newBirthDescriptor life_rating = 9, }, } - +--[[ newBirthDescriptor { type = "subrace", @@ -56,3 +57,4 @@ newBirthDescriptor stats = { str=-1, mag=1, wil=1, cun=3, dex=2, con=0 }, experience = 1.1, } +]] \ No newline at end of file diff --git a/game/modules/tome/data/birth/races/human.lua b/game/modules/tome/data/birth/races/human.lua index 5b01da54c3..0fcdc247e8 100644 --- a/game/modules/tome/data/birth/races/human.lua +++ b/game/modules/tome/data/birth/races/human.lua @@ -30,7 +30,7 @@ newBirthDescriptor type = "subrace", name = "Bree-man", desc = { - "Humans hailing from the northen town of Bree. A common kind of man.", + "Humans hailing from the northen town of Bree. A common kind of man, unremarkable in all respects.", }, copy = { default_wilderness = {"wilderness/main", 41, 18}, @@ -44,6 +44,7 @@ newBirthDescriptor desc = { "The greatest of the Edain, humans in all respects but", "stronger, smarter and wiser.", + "They posses the Gift of Kings which allows them to regenerate their wounds once in a while.", }, stats = { str=1, cun=1, dex=1, wil=1 }, experience = 1.25, diff --git a/game/modules/tome/data/talents/misc/misc.lua b/game/modules/tome/data/talents/misc/misc.lua index 48d58a18c7..6e700370c7 100644 --- a/game/modules/tome/data/talents/misc/misc.lua +++ b/game/modules/tome/data/talents/misc/misc.lua @@ -95,3 +95,23 @@ newTalent{ The speed will increase with the Dexterity stat]]):format((0.20 + self:getDex() / 80) * 100) end, } + +-- Dwarf's power, a temporary stone shield +newTalent{ + short_name = "DWARF_RESILIENCE", + name = "Resilience of the Dwarves", + type = {"base/class", 1}, + cooldown = 50, + action = function(self, t) + self:setEffect(self.EFF_DWARVEN_RESILIENCE, 8, { + armor=5 + self:getCon() / 5, + physical=10 + self:getCon() / 5, + spell=10 + self:getCon() / 5, + }) + return true + end, + info = function(self) + return ([[Call legendary resilience of the Dwarven race to increase your armor(+%d), spell(+%d) and physical(+%d) resistances for 8 turns. + The bonus will increase with the Constitution stat]]):format(5 + self:getCon() / 5, 10 + self:getCon() / 5, 10 + self:getCon() / 5) + end, +} diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index 830b32dd56..44c93c6eb6 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -184,3 +184,23 @@ newEffect{ if self.player then game.level.map:redisplay() end end, } + +newEffect{ + name = "DWARVEN_RESILIENCE", + desc = "Dwarven Resilience", + type = "physical", + status = "beneficial", + parameters = { armor=10, mental=10, physical=10 }, + on_gain = function(self, err) return "#Target#'s skin turns to stone." end, + on_lose = function(self, err) return "#Target# returns to normal." end, + activate = function(self, eff) + eff.aid = self:addTemporaryValue("combat_armor", eff.armor) + eff.pid = self:addTemporaryValue("combat_physresist", eff.physical) + eff.sid = self:addTemporaryValue("combat_spellresist", eff.spell) + end, + deactivate = function(self, eff) + self:removeTemporaryValue("combat_armor", eff.aid) + self:removeTemporaryValue("combat_physresist", eff.pid) + self:removeTemporaryValue("combat_spellresist", eff.sid) + end, +} -- GitLab