diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 87b52736c010b90f8a6f7b10d39bd684f24fd7ff..9543a401277c948f5df725ff4b8360f2e3509611 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -641,6 +641,9 @@ function _M:die(src) src.blood_frenzy = src.blood_frenzy + src:getTalentLevel(src.T_BLOOD_FRENZY) * 2 end + -- Increase vim + if src and src:attr("vim_on_death") and not self:attr("undead") then src:incVim(src:attr("vim_on_death")) end + if src and src.resolveSource and src:resolveSource().player then -- Achievements local p = src:resolveSource() @@ -897,6 +900,10 @@ function _M:preUseTalent(ab, silent, fake) game.logPlayer(self, "You do not have enough stamina to activate %s.", ab.name) return false end + if ab.sustain_vim and self.max_vim < ab.sustain_vim and not self:isTalentActive(ab.id) then + game.logPlayer(self, "You do not have enough vim to activate %s.", ab.name) + return false + end if ab.sustain_positive and self.max_positive < ab.sustain_positive and not self:isTalentActive(ab.id) then game.logPlayer(self, "You do not have enough positive energy to activate %s.", ab.name) return false @@ -914,6 +921,10 @@ function _M:preUseTalent(ab, silent, fake) game.logPlayer(self, "You do not have enough stamina to use %s.", ab.name) return false end + if ab.vim and self:getVim() < ab.vim then + game.logPlayer(self, "You do not have enough vim to use %s.", ab.name) + return false + end if ab.positive and self:getPositive() < ab.positive * (100 + self.fatigue) / 100 then game.logPlayer(self, "You do not have enough positive energy to use %s.", ab.name) return false @@ -993,6 +1004,9 @@ function _M:postUseTalent(ab, ret) if ab.sustain_stamina then self.max_stamina = self.max_stamina - ab.sustain_stamina end + if ab.sustain_vim then + self.max_vim = self.max_vim - ab.sustain_vim + end if ab.sustain_equilibrium then self:incEquilibrium(ab.sustain_equilibrium) end @@ -1009,6 +1023,9 @@ function _M:postUseTalent(ab, ret) if ab.sustain_stamina then self.max_stamina = self.max_stamina + ab.sustain_stamina end + if ab.sustain_vim then + self.max_vim = self.max_vim + ab.sustain_vim + end if ab.sustain_equilibrium then self:incEquilibrium(-ab.sustain_equilibrium) end @@ -1026,6 +1043,10 @@ function _M:postUseTalent(ab, ret) if ab.stamina then self:incStamina(-ab.stamina * (100 + self.fatigue) / 100) end + -- Vim is not affected by fatigue + if ab.vim then + self:incVim(-ab.vim) + end if ab.positive then self:incPositive(-ab.positive * (100 + self.fatigue) / 100) end @@ -1081,7 +1102,7 @@ function _M:getTalentFullDescription(t, addlevel) if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.sustain_mana or t.mana * (100 + self.fatigue) / 100) end if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.sustain_stamina or t.stamina * (100 + self.fatigue) / 100) end if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end - if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.sustain_vim or t.vim * (100 + self.fatigue) / 100) end + if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.sustain_vim or t.vim) end if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.sustain_positive or t.positive * (100 + self.fatigue) / 100) end if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.sustain_negative or t.negative * (100 + self.fatigue) / 100) end if self:getTalentRange(t) > 1 then d[#d+1] = "#6fff83#Range: #FFFFFF#"..self:getTalentRange(t) @@ -1134,6 +1155,7 @@ end --- Suffocate a bit, lose air function _M:suffocate(value, src) if self:attr("no_breath") then return false, false end + if self:attr("invulnerable") then return false, false end self.air = self.air - value if self.air <= 0 then game.logSeen(self, "%s suffocates to death!", self.name:capitalize()) diff --git a/game/modules/tome/class/PlayerDisplay.lua b/game/modules/tome/class/PlayerDisplay.lua index 409b5e089648c65bf114567c6d066f279d12a906..30967e803c0f5c7b6ab57b23c05675b4c9deb41f 100644 --- a/game/modules/tome/class/PlayerDisplay.lua +++ b/game/modules/tome/class/PlayerDisplay.lua @@ -103,6 +103,11 @@ function _M:display() self.surface:erase(colors.GREY.r / 2, colors.GREY.g / 2, colors.GREY.b / 2, 255, self.bars_x, h, self.bars_w * player:getNegative() / player.max_negative, self.font_h) self.surface:drawColorStringBlended(self.font, ("#7fffd4#Negative:#ffffff#%d/%d"):format(player:getNegative(), player.max_negative), 0, h, 255, 255, 255) h = h + self.font_h end + if player:knowTalent(player.T_VIM_POOL) then + self.surface:erase(0xff / 6, 0xcc / 6, 0x80 / 6, 255, self.bars_x, h, self.bars_w, self.font_h) + self.surface:erase(0xff / 3, 0xcc / 3, 0x80 / 3, 255, self.bars_x, h, self.bars_w * player:getVim() / player.max_vim, self.font_h) + self.surface:drawColorStringBlended(self.font, ("#904010#Vim: #ffffff#%d/%d"):format(player:getVim(), player.max_vim), 0, h, 255, 255, 255) h = h + self.font_h + end h = h + self.font_h for tid, act in pairs(player.sustain_talents) do diff --git a/game/modules/tome/data/birth/classes/corrupted.lua b/game/modules/tome/data/birth/classes/corrupted.lua index ea34c0776e4b03afca40cd399843f2adfafd3696..60e1454f72a5a81d2dfc078e59e210a686d0a667 100644 --- a/game/modules/tome/data/birth/classes/corrupted.lua +++ b/game/modules/tome/data/birth/classes/corrupted.lua @@ -19,16 +19,16 @@ newBirthDescriptor{ type = "class", - name = "Corrupted", + name = "Corrupter", desc = { - "Corrupteds are touched by the mark of evil, they are a blight on the world. Working to promote the cause of evil, they serve their masters, or themselves become masters.", + "Corrupters are touched by the mark of evil, they are a blight on the world. Working to promote the cause of evil, they serve their masters, or themselves become masters.", }, descriptor_choices = { subclass = { __ALL__ = "disallow", - Reaver = function() return profile.mod.allow_build.corrupted_reaver and "allow" or "disallow" end, + Reaver = function() return profile.mod.allow_build.corrupter_reaver and "allow" or "disallow" end, }, }, copy = { @@ -48,11 +48,20 @@ newBirthDescriptor{ stats = { str=5, mag=3, dex=1, }, talents_types = { ["technique/combat-training"]={true, 0.3}, + ["corruption/sanguisuge"]={true, 0.3}, + ["corruption/reaving-combat"]={true, 0.3}, + ["corruption/scourge"]={true, 0.3}, + ["corruption/plague"]={true, 0.3}, + ["corruption/hexes"]={true, 0.3}, + ["corruption/curses"]={true, 0.3}, + ["corruption/bone"]={true, 0.3}, }, talents = { [ActorTalents.T_DUAL_WEAPON_WIELD] = 1, [ActorTalents.T_WEAPON_COMBAT] = 1, [ActorTalents.T_HEAVY_ARMOUR_TRAINING] = 1, + [ActorTalents.T_BLOOD_SACRIFICE] = 1, + [ActorTalents.T_REND] = 1, }, copy = { resolvers.equip{ id=true, diff --git a/game/modules/tome/data/birth/worlds.lua b/game/modules/tome/data/birth/worlds.lua index c9c9324898d7ac64b2bd2e394b1d34a091998704..20f2a6a01bb8744bccd97f4e32c14484bdebd569 100644 --- a/game/modules/tome/data/birth/worlds.lua +++ b/game/modules/tome/data/birth/worlds.lua @@ -53,7 +53,7 @@ newBirthDescriptor{ profile.mod.allow_build.wilder_wyrmic ) and "allow" or "disallow" end, - Corrupted = function() return profile.mod.allow_build.corrupted and "allow" or "disallow" end, + Corrupter = function() return profile.mod.allow_build.corrupter and "allow" or "disallow" end, }, }, } diff --git a/game/modules/tome/data/chats/escort-quest-start.lua b/game/modules/tome/data/chats/escort-quest-start.lua new file mode 100644 index 0000000000000000000000000000000000000000..ab720ce3a1fb3be226b138375e4feb6dede17786 --- /dev/null +++ b/game/modules/tome/data/chats/escort-quest-start.lua @@ -0,0 +1,33 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newChat{ id="welcome", + text = text, + answers = + { + {"Lead on, I will protect you."}, + {"Go away, I do not care for the weak.", action=function(npc, player) + npc:disappear() + npc:removed() + player:setQuestStatus(npc.quest_id, engine.Quest.FAILED) + end}, + }, +} + +return "welcome" diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index 16390bd9d13927266798b2daceebea64e539804b..7d1324dcdb9450e93a3537433ce00d2eef4a1efe 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -628,6 +628,16 @@ newDamageType{ end, } +-- Drain Vim +newDamageType{ + name = "drain vim", type = "DRAIN_VIM", + projector = function(src, x, y, type, dam) + if _G.type(dam) == "number" then dam = {dam=dam, vim=0.2} end + local realdam = DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam.dam) + src:incVim(realdam * dam.vim) + end, +} + -- Retch: heal undead; damage living newDamageType{ name = "retch", type = "RETCH", diff --git a/game/modules/tome/data/talents/corruptions/corruptions.lua b/game/modules/tome/data/talents/corruptions/corruptions.lua index 705f3b6e01ce78d9fd349b68e758b73cb19aca4a..e22f4d6ee80008215ef4a0a8b42292b0d43ddc74 100644 --- a/game/modules/tome/data/talents/corruptions/corruptions.lua +++ b/game/modules/tome/data/talents/corruptions/corruptions.lua @@ -18,12 +18,13 @@ -- darkgod@te4.org -- Corruptions -newTalentType{ no_silence=true, type="corruption/ritual", name = "blighted rituals", description = "Learn how to control the dark powers." } -newTalentType{ no_silence=true, type="corruption/blight-magic", name = "blight magic", description = "Control the corruptions to form dark spells." } -newTalentType{ no_silence=true, type="corruption/blighted-combat", name = "blighted combat", description = "Control the corruptions to enhance melee combat." } -newTalentType{ no_silence=true, type="corruption/diseases", name = "diseases", description = "The subtle art of diseases and rotting." } -newTalentType{ no_silence=true, type="corruption/blood-magic", name = "blood magic", description = "Allows control of the blood, both yours or of your foes." } -newTalentType{ no_silence=true, type="corruption/necromancy", name = "necromancy", description = "The dark art of raising undeads." } +newTalentType{ no_silence=true, type="corruption/sanguisuge", name = "sanguisuge", generic = true, description = "Manipulate the life force to power your own dark powers." } +newTalentType{ no_silence=true, type="corruption/bone", name = "bone", description = "Harness the power of bones." } +newTalentType{ no_silence=true, type="corruption/hexes", name = "hexes", description = "Hex your foes, hindering and crippling them." } +newTalentType{ no_silence=true, type="corruption/curses", name = "curses", description = "Curse your foes, hindering and crippling them." } +newTalentType{ no_silence=true, type="corruption/plague", name = "plage", description = "Spread diseases to your foes." } +newTalentType{ no_silence=true, type="corruption/scourge", name = "scourge", description = "Bring pain and destruction to the world." } +newTalentType{ no_silence=true, type="corruption/reaving-combat", name = "reaving combat", description = "Enhanced melee combat through the dark arts." } -- Generic requires for corruptions based on talent level corrs_req1 = { @@ -47,4 +48,5 @@ corrs_req5 = { level = function(level) return 16 + (level-1) end, } -load("/data/talents/corruptions/rituals.lua") +load("/data/talents/corruptions/sanguisuge.lua") +load("/data/talents/corruptions/scourge.lua") diff --git a/game/modules/tome/data/talents/corruptions/rituals.lua b/game/modules/tome/data/talents/corruptions/rituals.lua deleted file mode 100644 index 7a1d18e65e8238895e0746f721c5b3bf2784c610..0000000000000000000000000000000000000000 --- a/game/modules/tome/data/talents/corruptions/rituals.lua +++ /dev/null @@ -1,120 +0,0 @@ --- ToME - Tales of Middle-Earth --- Copyright (C) 2009, 2010 Nicolas Casalini --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. --- --- Nicolas Casalini "DarkGod" --- darkgod@te4.org - -newTalent{ - name = "c1???", - type = {"corruption/ritual", 1}, - require = corrs_req1, - points = 5, - message = "@Source@ meditates on nature.", - equilibrium = 0, - cooldown = 150, - range = 20, - action = function(self, t) - self:setEffect(self.EFF_STUNNED, 17 - self:getTalentLevel(t), {}) - self:incEquilibrium(-10 - self:getWil(50) * self:getTalentLevel(t)) - game:playSoundNear(self, "talents/spell_generic2") - return true - end, - info = function(self, t) - return ([[Meditate on your link with Nature. You are considered stunned for %d turns and regenerate %d equilibrium. - The effect will increase with your Willpower stat.]]): - format(17 - self:getTalentLevel(t), 10 + self:getWil(50) * self:getTalentLevel(t)) - end, -} - -newTalent{ - name = "c2???", - type = {"corruption/ritual", 2}, - require = corrs_req2, - points = 5, - equilibrium = 10, - cooldown = 20, - range = 1, - action = function(self, t) - local tg = {type="hit", range=self:getTalentRange(t)} - local x, y, target = self:getTarget(tg) - if not x or not y or not target then return nil end - if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end - if not target.undead then - target:heal(20 + self:getWil(50) * self:getTalentLevel(t)) - end - game:playSoundNear(self, "talents/heal") - return true - end, - info = function(self, t) - return ([[Touch a target (or yourself) to infuse it with Nature, healing it for %d. - The effect will increase with your Willpower stat.]]): - format(20 + self:getWil(25) * self:getTalentLevel(t)) - end, -} - -newTalent{ - name = "c3???", - type = {"corruption/ritual", 3}, - require = corrs_req3, - points = 5, - equilibrium = 3, - cooldown = 10, - range = 100, - action = function(self, t) - local x, y = self:getTarget{type="ball", nolock=true, no_restrict=true, range=100, radius=3 + self:getTalentLevel(t)} - if not x then return nil end - - self:magicMap(3 + self:getTalentLevel(t), x, y) - game:playSoundNear(self, "talents/spell_generic2") - return true - end, - info = function(self, t) - return ([[Using your connection to Nature you can see remote areas in a radius of %d.]]): - format(3 + self:getTalentLevel(t)) - end, -} - -newTalent{ - name = "c4???", - type = {"corruption/ritual", 4}, - require = corrs_req4, - points = 5, - equilibrium = 20, - cooldown = 50, - range = 20, - action = function(self, t) - local nb = math.ceil(self:getTalentLevel(t) + 2) - local tids = {} - for tid, _ in pairs(self.talents_cd) do - local tt = self:getTalentFromId(tid) - if tt.type[2] <= self:getTalentLevelRaw(t) and tt.type[1]:find("^corruption/") then - tids[#tids+1] = tid - end - end - for i = 1, nb do - if #tids == 0 then break end - local tid = rng.tableRemove(tids) - self.talents_cd[tid] = nil - end - self.changed = true - game:playSoundNear(self, "talents/spell_generic2") - return true - end, - info = function(self, t) - return ([[Your deep link with Nature allows you to reset the cooldown of %d of your wild gifts of level %d or less.]]): - format(math.ceil(self:getTalentLevel(t) + 2), self:getTalentLevelRaw(t)) - end, -} diff --git a/game/modules/tome/data/talents/corruptions/sanguisuge.lua b/game/modules/tome/data/talents/corruptions/sanguisuge.lua new file mode 100644 index 0000000000000000000000000000000000000000..6c43fd2f02631146cc4433608732af5b6cb03dd3 --- /dev/null +++ b/game/modules/tome/data/talents/corruptions/sanguisuge.lua @@ -0,0 +1,115 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newTalent{ + name = "Blood Sacrifice", + type = {"corruption/sanguisuge", 1}, + require = corrs_req1, + points = 5, + vim = 0, + cooldown = 30, + range = 20, + action = function(self, t) + if self.max_life * 0.2 >= self.life then + game.logPlayer(self, "Doing this would kill you.") + return + end + self:incVim(self:combatTalentSpellDamage(t, 5, 200)) + self:takeHit(self.max_life * 0.2, self) + game:playSoundNear(self, "talents/spell_generic2") + return true + end, + info = function(self, t) + return ([[Sacrifices 20%% of your life to restore %d vim. + The effect will increase with your Magic stat.]]): + format(self:combatTalentSpellDamage(t, 5, 200)) + end, +} + +newTalent{ + name = "Drain", + type = {"corruption/sanguisuge", 2}, + require = corrs_req2, + points = 5, + vim = 0, + cooldown = 9, + reflectable = true, + proj_speed = 15, + action = function(self, t) + local tg = {type="bolt", range=self:getTalentRange(t), talent=t, display={particle="bolt_slime"}} + local x, y = self:getTarget(tg) + if not x or not y then return nil end + self:projectile(tg, x, y, DamageType.DRAIN_VIM, self:spellCrit(self:combatTalentSpellDamage(t, 25, 200)), {type="slime"}) + game:playSoundNear(self, "talents/slime") + return true + end, + info = function(self, t) + return ([[Fires a bolt of blight, doing %0.2f damage and replenishing 20%% of it as vim energy. + The effect will increase with your Magic stat.]]): + format(self:combatTalentSpellDamage(t, 15, 200)) + end, +} + +newTalent{ + name = "Absorb Life", + type = {"corruption/sanguisuge", 3}, + mode = "sustained", + require = corrs_req3, + points = 5, + sustain_vim = 30, + cooldown = 30, + range = 20, + activate = function(self, t) + game:playSoundNear(self, "talents/spell_generic2") + local ret = { + vim_regen = self:addTemporaryValue("vim_regen", -1), + vim_on_death = self:addTemporaryValue("vim_on_death", math.ceil(self:getTalentLevel(t))), + } + return ret + end, + deactivate = function(self, t, p) + self:removeTemporaryValue("vim_regen", p.vim_regen) + self:removeTemporaryValue("vim_on_death", p.vim_on_death) + return true + end, + info = function(self, t) + return ([[Absorbs the life force of your foes as you kill them. + As long as this talent is active vim will decrease by one per turn and increase by %d for each kill of a non-undead creature.]]): + format(math.ceil(self:getTalentLevel(t))) + end, +} + +newTalent{ + name = "Life Tap", + type = {"corruption/sanguisuge", 4}, + require = corrs_req4, + points = 5, + vim = 40, + cooldown = 20, + range = 20, + action = function(self, t) + self:setEffect(self.EFF_LIFE_TAP, 7, {power=math.ceil(6 + self:getTalentLevel(t) * 2)}) + game:playSoundNear(self, "talents/spell_generic2") + return true + end, + info = function(self, t) + return ([[Tap on your life force to provide a furious boost, increasing all your damage by %d%% for 7 turns.]]): + format(math.ceil(6 + self:getTalentLevel(t) * 2)) + end, +} diff --git a/game/modules/tome/data/talents/corruptions/scourge.lua b/game/modules/tome/data/talents/corruptions/scourge.lua new file mode 100644 index 0000000000000000000000000000000000000000..a400c50f50ae7aff5532b37572be0fa86d4196b3 --- /dev/null +++ b/game/modules/tome/data/talents/corruptions/scourge.lua @@ -0,0 +1,169 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newTalent{ + name = "Rend", + type = {"corruption/scourge", 1}, + require = corrs_req1, + points = 5, + vim = 9, + cooldown = 6, + range = 1, + action = function(self, t) + local weapon, offweapon = self:hasDualWeapon() + if not weapon then + game.logPlayer(self, "You cannot use Rend without two weapons!") + return nil + end + + local tg = {type="hit", range=self:getTalentRange(t)} + local x, y, target = self:getTarget(tg) + if not x or not y or not target then return nil end + if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end + + local speed1, hit1 = self:attackTargetWith(target, weapon.combat, nil, self:combatTalentWeaponDamage(t, 0.8, 1.6)) + local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, nil, self:combatTalentWeaponDamage(t, 0.8, 1.6)) + + -- Try to bleed ! + if hit1 then + if target:checkHit(self:combatAttackStr(weapon.combat), target:combatPhysicalResist(), 0, 95, 8 - self:getTalentLevel(t) / 2) and target:canBe("cut") then + target:setEffect(target.EFF_CUT, 5, {power=self:combatTalentSpellDamage(t, 5, 40), src=self}) + else + game.logSeen(target, "%s resists the cut!", target.name:capitalize()) + end + end + if hit2 then + if target:checkHit(self:combatAttackStr(offweapon.combat), target:combatPhysicalResist(), 0, 95, 8 - self:getTalentLevel(t) / 2) and target:canBe("cut") then + target:setEffect(target.EFF_CUT, 5, {power=self:combatTalentSpellDamage(t, 5, 40), src=self}) + else + game.logSeen(target, "%s resists the cut!", target.name:capitalize()) + end + end + + return true + end, + info = function(self, t) + return ([[Hit the target with both weapons doing %d%% damage, for each hit the target will bleed for %0.2f damage each turn for 5 turns. + The bleeding effect will increase with your Magic stat.]]): + format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.6), self:combatTalentSpellDamage(t, 5, 40)) + end, +} + +newTalent{ + name = "Ruin", + type = {"corruption/scourge", 2}, + mode = "sustained", + require = corrs_req2, + points = 5, + vim = 40, + cooldown = 30, + activate = function(self, t) + game:playSoundNear(self, "talents/slime") + local ret = { + per = self:addTemporaryValue("inc_damage", {[DamageType.BLIGHT] = self:combatTalentSpellDamage(t, 15, 40)}), + } + return ret + end, + deactivate = function(self, t, p) + self:removeTemporaryValue("inc_damage", p.per) + return true + end, + info = function(self, t) + return ([[Concentrate on the corruption you bring, increasing each of your melee strikes with %0.2f blight damage. + The damage will increase with your Magic stat.]]): + format(self:combatTalentSpellDamage(t, 15, 40)) + end, +} + +newTalent{ + name = "Acid Strike", + type = {"corruption/scourge", 3}, + require = corrs_req3, + points = 5, + vim = 18, + cooldown = 12, + range = 1, + action = function(self, t) + local weapon, offweapon = self:hasDualWeapon() + if not weapon then + game.logPlayer(self, "You cannot use Acid Strike without two weapons!") + return nil + end + + local tg = {type="hit", range=self:getTalentRange(t)} + local x, y, target = self:getTarget(tg) + if not x or not y or not target then return nil end + if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end + + local speed1, hit1 = self:attackTargetWith(target, weapon.combat, DamageType.ACID, self:combatTalentWeaponDamage(t, 0.8, 1.6)) + local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, DamageType.ACID, self:combatTalentWeaponDamage(t, 0.8, 1.6)) + + -- Acid splash ! + if hit1 or hit2 then + local tg = {type="ball", range=0, radius=1, friendlyfire=false, talent=t} + self:project(tg, target.x, target.y, DamageType.ACID, self:spellCrit(self:combatTalentSpellDamage(t, 10, 130))) + end + + return true + end, + info = function(self, t) + return ([[Strike with each of your weapons, doing %d%% acid weapon damage. If at least one of the strikes hits an acid splash is generated doing %0.2f acid damage. + The splash damage will increase with your Magic stat.]]): + format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.6), self:combatTalentSpellDamage(t, 10, 130)) + end, +} + +newTalent{ + name = "Dark Surprise", + type = {"corruption/scourge", 4}, + require = corrs_req4, + points = 5, + vim = 14, + cooldown = 8, + range = 1, + action = function(self, t) + local weapon, offweapon = self:hasDualWeapon() + if not weapon then + game.logPlayer(self, "You cannot use Dark Surprise without two weapons!") + return nil + end + + local tg = {type="hit", range=self:getTalentRange(t)} + local x, y, target = self:getTarget(tg) + if not x or not y or not target then return nil end + if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end + + local speed1, hit1 = self:attackTargetWith(target, weapon.combat, DamageType.DARKNESS, self:combatTalentWeaponDamage(t, 0.6, 1.4)) + + if hit1 then + local speed2, hit2 = self:attackTargetWith(target, weapon.combat, DamageType.BLIGHT, self:combatTalentWeaponDamage(t, 0.6, 1.4)) + if hit2 and target:checkHit(self:combatAttack(offweapon.combat), target:combatPhysicalResist(), 0, 95, 10) and target:canBe("blind") then + target:setEffect(target.EFF_BLINDED, 4, {}) + else + game.logSeen(self, "%s resists the darkness.", target.name:capitalize()) + end + end + + return true + end, + info = function(self, t) + return ([[Hits the target with your main weapon, doing %d%% darkness weapon damage. If the attack hits you attack with your second weapon, doing %d%% blight weapon damage and granting an automatic critical. If this attack hits the target is blinded for 4 turns.]]): + format(100 * self:combatTalentWeaponDamage(t, 0.6, 1.4), 100 * self:combatTalentWeaponDamage(t, 0.6, 1.4)) + end, +} diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index b0f10655a281066867f9bcae0c234677b977857f..5ac0d1e03bbd2e91cfe72b485395309ada25601c 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -523,6 +523,22 @@ newEffect{ end, } +newEffect{ + name = "LIFE_TAP", + desc = "Life Tap", + type = "magical", + status = "beneficial", + parameters = { power=10 }, + on_gain = function(self, err) return "#Target# is overloaded with power.", "+Life Tap" end, + on_lose = function(self, err) return "#Target# seems less dangerous.", "-Life Tap" end, + activate = function(self, eff) + eff.pid = self:addTemporaryValue("inc_damage", {all=eff.power}) + end, + deactivate = function(self, eff) + self:removeTemporaryValue("inc_damage", eff.pid) + end, +} + newEffect{ name = "SHELL_SHIELD", desc = "Shell Shield", diff --git a/ideas/blight.ods b/ideas/blight.ods index f860d2a0234c2965f1306dea09f93a894907bc8c..7b906da703a386ea610a0254a4ccd3c27ad0acf6 100644 Binary files a/ideas/blight.ods and b/ideas/blight.ods differ diff --git a/ideas/quests.ods b/ideas/quests.ods index aee5c6daac725ecf64b5c347e2fd09975dcf6453..f25186fb83d30b7eec9d446a221eb99835a12174 100644 Binary files a/ideas/quests.ods and b/ideas/quests.ods differ