Skip to content
Snippets Groups Projects
Commit 66afabb4 authored by dg's avatar dg
Browse files

Doomed class updated to be a fully mind based class, using mindpower to power its talents.

Doomed lost the Primal Magic tree and gained the Gestures tree


git-svn-id: http://svn.net-core.org/repos/t-engine4@4623 51575b47-30f0-44d4-a5cc-537603b46e54
parent ffd75a5f
No related branches found
No related tags found
No related merge requests found
Showing
with 315 additions and 221 deletions
......@@ -236,7 +236,7 @@ function _M:updateQuickHotkeys(actor)
elseif hotkey[1] == "inventory" then
local item = actor:findInAllInventories(hotkey[2])
if item.save_hotkey then save_quickhotkey = true end
if item and item.save_hotkey then save_quickhotkey = true end
end
if save_quickhotkey then self:updateQuickHotkey(actor, position) end
......
......@@ -377,11 +377,6 @@ function _M:actBase()
local t = self:getTalentFromId(self.T_UNSEEN_FORCE)
t.do_unseenForce(self, t)
end
-- this handles doomed arcane bolts turn based effects
if self.arcaneBolts then
local t = self:getTalentFromId(self.T_ARCANE_BOLTS)
t.do_arcaneBolts(self, t)
end
-- Curse of Nightmares: Nightmare
if not self.dead and self:hasEffect(self.EFF_CURSE_OF_NIGHTMARES) then
local eff = self:hasEffect(self.EFF_CURSE_OF_NIGHTMARES)
......
......@@ -105,7 +105,14 @@ function _M:attackTarget(target, damtype, mult, noenergy)
end
local break_stealth = false
if not self:attr("disarmed") and not self:isUnarmed() then
if self:isTalentActive(self.T_GESTURE_OF_PAIN) then
print("[ATTACK] attacking with Gesture of Pain")
local t = self:getTalentFromId(self.T_GESTURE_OF_PAIN)
speed, hit = t.attack(self, t, target)
break_stealth = true
end
if not speed and not self:attr("disarmed") and not self:isUnarmed() then
-- All weapons in main hands
if self:getInven(self.INVEN_MAINHAND) then
for i, o in ipairs(self:getInven(self.INVEN_MAINHAND)) do
......@@ -670,10 +677,6 @@ function _M:combatArmor()
if self:knowTalent(self.T_CARBON_SPIKES) and self:isTalentActive(self.T_CARBON_SPIKES) then
add = add + self.carbon_armor
end
if self:knowTalent(self.T_PRIMAL_SKIN) then
local t = self:getTalentFromId(self.T_PRIMAL_SKIN)
add = add + t.getArmor(self, t)
end
return self.combat_armor + add
end
......@@ -914,16 +917,22 @@ function _M:combatSpellCrit()
return self.combat_spellcrit + (self:getCun() - 10) * 0.3 + (self:getLck() - 50) * 0.30 + 1
end
--- Gets mindcrit
function _M:combatMindCrit()
local add = 0
if self:knowTalent(self.T_GESTURE_OF_POWER) then
local t = self:getTalentFromId(self.T_GESTURE_OF_POWER)
add = t.getMindCritChange(self, t)
end
return self.combat_mindcrit + (self:getCun() - 10) * 0.3 + (self:getLck() - 50) * 0.30 + 1 + add
end
--- Gets spellspeed
function _M:combatSpellSpeed()
return 1 / self.combat_spellspeed
end
--- Gets mindcrit
function _M:combatMindCrit()
return self.combat_mindcrit + (self:getCun() - 10) * 0.3 + (self:getLck() - 50) * 0.30 + 1
end
--- Gets summon speed
function _M:combatSummonSpeed()
return math.max(1 - ((self:attr("fast_summons") or 0) / 100), 0.1)
......@@ -1004,15 +1013,6 @@ function _M:spellCrit(dam, add_chance)
return dam, crit
end
--- Do we get hit by our own AOE ?
function _M:spellFriendlyFire()
local chance = (self:getLck() - 50) * 0.2
if self:isTalentActive(self.T_SPELLCRAFT) then chance = chance + self:getTalentLevelRaw(self.T_SPELLCRAFT) * 20 end
chance = 100 - chance
print("[SPELL] friendly fire chance", chance)
return chance
end
--- Computes mind crit for a damage
function _M:mindCrit(dam, add_chance)
if self:isTalentActive(self.T_STEALTH) and self:knowTalent(self.T_SHADOWSTRIKE) then
......@@ -1026,15 +1026,30 @@ function _M:mindCrit(dam, add_chance)
if rng.percent(chance) then
dam = dam * (1.5 + (self.combat_critical_power or 0) / 100)
crit = true
game.logSeen(self, "#{bold}#%s's power attains critical effect!#{normal}#", self.name:capitalize())
game.logSeen(self, "#{bold}#%s's mind surges with critical power!#{normal}#", self.name:capitalize())
end
return dam, crit
end
--- Do we get hit by our own AOE ?
function _M:spellFriendlyFire()
local chance = (self:getLck() - 50) * 0.2
if self:isTalentActive(self.T_SPELLCRAFT) then chance = chance + self:getTalentLevelRaw(self.T_SPELLCRAFT) * 20 end
chance = 100 - chance
print("[SPELL] friendly fire chance", chance)
return chance
end
--- Gets mindpower
function _M:combatMindpower(mod)
mod = mod or 1
local add = 0
if self:knowTalent(self.T_GESTURE_OF_COMMAND) then
local t = self:getTalentFromId(self.T_GESTURE_OF_COMMAND)
add = t.getMindpowerChange(self, t)
end
return self:rescaleCombatStats((self.combat_mindpower > 0 and self.combat_mindpower or 0) + add + self:getWil() * 0.7 + self:getCun() * 0.4) * mod
end
......@@ -1256,6 +1271,16 @@ function _M:isUnarmed()
return unarmed
end
-- Get the number of free hands the actor has
function _M:getFreeHands()
if not self:getInven("MAINHAND") or not self:getInven("OFFHAND") then return end
local weapon = self:getInven("MAINHAND")[1]
local offweapon = self:getInven("OFFHAND")[1]
if weapon and offweapon then return 0 end
if weapon or offweapon then return 1 end
return 2
end
--- Check if the actor dual wields
function _M:hasDualWeapon()
if self:attr("disarmed") then
......
......@@ -94,23 +94,23 @@ newBirthDescriptor{
locked_desc = "In shaded places in unknown lands thou must overcome thyself and see thy doom.",
desc = {
"The Doomed are fallen mages who once wielded powerful magic wrought by ambition and dark bargains.",
"They now possess only a twisted shadow of that power as they struggle to keep it from consuming them.",
"Stripped of their magic by the dark forces that once served them, they have learned to harness the hatred that burns in their minds.",
"Only time will tell if they can choose a new path or are doomed forever.",
"The Doomed strike from behind a veil of darkness or a host of shadows.",
"They feed upon their enemies as they unleash powerful forces and terrible punishments.",
"Their most important stats are: Magic and Willpower",
"They feed upon their enemies as they unleash their minds on all who confront them.",
"Their most important stats are: Willpower and Cunning",
"#GOLD#Stat modifiers:",
"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
"#LIGHT_BLUE# * +4 Magic, +4 Willpower, +0 Cunning",
"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +5 Cunning",
},
stats = { wil=4, mag=4, },
stats = { wil=4, cun=4, },
talents_types = {
["cursed/dark-sustenance"]={true, 0.3},
["cursed/force-of-will"]={true, 0.3},
["cursed/gestures"]={true, 0.3},
["cursed/punishments"]={true, 0.3},
["cursed/shadows"]={true, 0.3},
["cursed/darkness"]={true, 0.3},
["cursed/primal-magic"]={true, 0.3},
["cursed/cursed-form"]={true, 0.0},
["cunning/survival"]={false, 0.0},
["cursed/dark-figure"]={false, 0.0},
......@@ -118,13 +118,13 @@ newBirthDescriptor{
talents = {
[ActorTalents.T_UNNATURAL_BODY] = 1,
[ActorTalents.T_FEED] = 1,
[ActorTalents.T_GESTURE_OF_PAIN] = 1,
[ActorTalents.T_WILLFUL_STRIKE] = 1,
[ActorTalents.T_CALL_SHADOWS] = 1,
},
copy = {
max_life = 90,
resolvers.equip{ id=true,
{type="weapon", subtype="staff", name="elm staff", autoreq=true, ego_chance=-1000},
{type="armor", subtype="cloth", name="linen robe", autoreq=true, ego_chance=-1000},
},
chooseCursedAuraTree = true
......
......@@ -64,6 +64,11 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
dam = dam + dam * target:attr("inc_necrotic_minions") / 100
print("[PROJECTOR] after necrotic increase dam", dam)
end
if target.isTalentActive and target:isTalentActive(target.T_GESTURE_OF_GUARDING) then
local t = target:getTalentFromId(target.T_GESTURE_OF_GUARDING)
dam = t.on_damageInflicted(target, t, type, dam, src)
end
-- Blast the iceblock
if src.attr and src:attr("encased_in_ice") then
......@@ -179,6 +184,11 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
local t = target:getTalentFromId(target.T_ENERGY_DECOMPOSITION)
dam = t.on_damage(target, t, type, dam)
end
if target.isTalentActive and target:isTalentActive(target.T_GESTURE_OF_GUARDING) then
local t = target:getTalentFromId(target.T_GESTURE_OF_GUARDING)
dam = t.on_damageReceived(target, t, type, dam, src)
end
if src:attr("stunned") then
dam = dam * 0.3
......@@ -396,8 +406,14 @@ newDamageType{
local target = game.level.map(x, y, Map.ACTOR)
if target then
local mindpower, mentalresist
if _G.type(dam) == "table" then dam, mindpower, mentalresist, factor = dam.dam, dam.mindpower, dam.mentalresist end
if target:checkHit(mindpower or src:combatMindpower(), mentalresist or target:combatMentalResist(), 0, 95, 15) then
if _G.type(dam) == "table" then dam, mindpower, mentalresist, factor, alwaysHit, criticals, crossTierChance = dam.dam, dam.mindpower, dam.mentalresist, dam.alwaysHit, dam.criticals, dam.crossTierChance end
if alwaysHit or target:checkHit(mindpower or src:combatMindpower(), mentalresist or target:combatMentalResist(), 0, 95, 15) then
if criticals then
dam = src:mindCrit(dam)
end
if crossTierChance and rng.change(crossTierChance) then
target:crossTierEffect(target.EFF_BRAINLOCKED, src:combatMindpower())
end
return DamageType.defaultProjector(src, x, y, type, dam)
else
game.logSeen(target, "%s resists the mind attack!", target.name:capitalize())
......
game/modules/tome/data/gfx/talents/gesture_of_command.png

2.82 KiB

game/modules/tome/data/gfx/talents/gesture_of_guarding.png

3.92 KiB

game/modules/tome/data/gfx/talents/gesture_of_pain.png

3.95 KiB

game/modules/tome/data/gfx/talents/gesture_of_power.png

3.39 KiB

game/modules/tome/data/gfx/talents/willful_strike.png

3.88 KiB | W: | H:

game/modules/tome/data/gfx/talents/willful_strike.png

3.83 KiB | W: | H:

game/modules/tome/data/gfx/talents/willful_strike.png
game/modules/tome/data/gfx/talents/willful_strike.png
game/modules/tome/data/gfx/talents/willful_strike.png
game/modules/tome/data/gfx/talents/willful_strike.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -401,7 +401,11 @@ newTalent{
resolvers.talents{
[Talents.T_WEAPON_COMBAT]={base=1, every=5, max=10},
[Talents.T_WEAPONS_MASTERY]={base=1, every=5, max=10},
[Talents.T_KNIFE_MASTERY]={base=1, every=5, max=10},
[Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=5, max=10},
[Talents.T_STAFF_MASTERY]={base=1, every=5, max=10},
[Talents.T_BOW_MASTERY]={base=1, every=5, max=10},
[Talents.T_SLING_MASTERY]={base=1, every=5, max=10},
[Talents.T_SHOOT]=1,
},
......
......@@ -35,7 +35,7 @@ newTalent{
return true
end,
getHealPerKill = function(self, t)
return combatTalentDamage(self, t, 25, 70)
return combatTalentDamage(self, t, 15, 50)
end,
getMaxUnnaturalBodyHeal = function(self, t)
return t.getHealPerKill(self, t) * 2
......
......@@ -30,7 +30,7 @@ newTalentType{ allow_random=true, type="cursed/force-of-will", name = "force of
newTalentType{ allow_random=true, type="cursed/darkness", is_spell=true, name = "darkness", description = "Harness the power of darkness to envelop your foes." }
newTalentType{ allow_random=true, type="cursed/shadows", is_spell=true, name = "shades", description = "Summon shadows from the darkness to aid you." }
newTalentType{ allow_random=true, type="cursed/punishments", name = "punishments", description = "Your hate becomes punishment in the minds of your foes." }
newTalentType{ allow_random=true, type="cursed/primal-magic", name = "primal magic", description = "You still control traces of power from your previous life." }
newTalentType{ allow_random=true, type="cursed/gestures", name = "gestures", description = "Enhance the power of you mind with gestures." }
-- Generic
newTalentType{ allow_random=true, type="cursed/cursed-form", name = "cursed form", generic = true, description = "You are wracked with the dark energies of the curse." }
......@@ -80,24 +80,24 @@ cursed_str_req5 = {
level = function(level) return 16 + (level-1) end,
}
cursed_mag_req1 = {
stat = { mag=function(level) return 12 + (level-1) * 2 end },
cursed_cun_req1 = {
stat = { cun=function(level) return 12 + (level-1) * 2 end },
level = function(level) return 0 + (level-1) end,
}
cursed_mag_req2 = {
stat = { mag=function(level) return 20 + (level-1) * 2 end },
cursed_cun_req2 = {
stat = { cun=function(level) return 20 + (level-1) * 2 end },
level = function(level) return 4 + (level-1) end,
}
cursed_mag_req3 = {
stat = { mag=function(level) return 28 + (level-1) * 2 end },
cursed_cun_req3 = {
stat = { cun=function(level) return 28 + (level-1) * 2 end },
level = function(level) return 8 + (level-1) end,
}
cursed_mag_req4 = {
stat = { mag=function(level) return 36 + (level-1) * 2 end },
cursed_cun_req4 = {
stat = { cun=function(level) return 36 + (level-1) * 2 end },
level = function(level) return 12 + (level-1) end,
}
cursed_mag_req5 = {
stat = { mag=function(level) return 44 + (level-1) * 2 end },
cursed_cun_req5 = {
stat = { cun=function(level) return 44 + (level-1) * 2 end },
level = function(level) return 16 + (level-1) end,
}
......@@ -161,7 +161,7 @@ load("/data/talents/cursed/dark-sustenance.lua")
load("/data/talents/cursed/shadows.lua")
load("/data/talents/cursed/darkness.lua")
load("/data/talents/cursed/punishments.lua")
load("/data/talents/cursed/primal-magic.lua")
load("/data/talents/cursed/gestures.lua")
load("/data/talents/cursed/cursed-form.lua")
load("/data/talents/cursed/cursed-aura.lua")
......
......@@ -17,14 +17,6 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local function combatTalentDamage(self, t, min, max)
return self:combatTalentSpellDamage(t, min, max, (self.level + self:getWil()) * 1.2)
end
local function combatPower(self, t, multiplier)
return (self.level + self:getWil()) * (multiplier or 1)
end
newTalent{
name = "Feed",
type = {"cursed/dark-sustenance", 1},
......@@ -37,7 +29,7 @@ newTalent{
requires_target = function(self, t) return self:getTalentLevel(t) >= 5 end,
direct_hit = true,
getHateGain = function(self, t)
return math.sqrt(self:getTalentLevel(t)) * 0.2 + self:getWil(0.15, true)
return math.sqrt(self:getTalentLevel(t)) * 0.2 + self:combatMindpower() * 0.002
end,
action = function(self, t)
local range = self:getTalentRange(t)
......@@ -85,7 +77,7 @@ newTalent{
info = function(self, t)
local hateGain = t.getHateGain(self, t)
return ([[Feed from the essence of your enemy. Draws %0.2f hate per turn from a targeted foe as long as they remain in your line of sight.
Improves with the Willpower stat.]]):format(hateGain)
Hate gain improves with your Mindpower.]]):format(hateGain)
end,
}
......@@ -101,7 +93,7 @@ newTalent{
direct_hit = true,
requires_target = true,
getLifeSteal = function(self, t, target)
return combatTalentDamage(self, t, 0, 100)
return self:combatTalentMindDamage(t, 0, 140)
end,
action = function(self, t)
local effect = self:hasEffect(self.EFF_FEED)
......@@ -135,7 +127,7 @@ newTalent{
info = function(self, t)
local lifeSteal = t.getLifeSteal(self, t)
return ([[Devours life from the target of your feeding. %d life from the victim will be added to your own. This healing cannot be reduced. At level 5 Devour Life can be used like the Feed talent to begin feeding.
Improves with the Willpower stat.]]):format(lifeSteal)
Improves with your Mindpower.]]):format(lifeSteal)
end,
}
......@@ -174,12 +166,12 @@ newTalent{
require = cursed_wil_req3,
points = 5,
getDamageGain = function(self, t)
return math.sqrt(self:getTalentLevel(t)) * 5 + self:getWil(5, true)
return math.sqrt(self:getTalentLevel(t)) * 5 + self:combatMindpower() * 0.05
end,
info = function(self, t)
local damageGain = t.getDamageGain(self, t)
return ([[Enhances your feeding by reducing your targeted foe's damage by %d%% and increasing yours by the same amount.
Improves with the Willpower stat.]]):format(damageGain)
Improves with your Mindpower.]]):format(damageGain)
end,
}
......@@ -190,7 +182,7 @@ newTalent{
require = cursed_wil_req4,
points = 5,
getResistGain = function(self, t)
return math.sqrt(self:getTalentLevel(t)) * 22 + self:getWil(15, true)
return math.sqrt(self:getTalentLevel(t)) * 14 + self:combatMindpower() * 0.15
end,
getExtension = function(self, t)
return math.floor(self:getTalentLevel(t) - 1)
......@@ -198,6 +190,6 @@ newTalent{
info = function(self, t)
local resistGain = t.getResistGain(self, t)
return ([[Enhances your feeding by reducing your targeted foe's positive resistances by %d%% and increasing yours by the same amount. Resistance to "all" is not affected.
Improves with the Willpower stat.]]):format(resistGain)
Improves with your Mindpower.]]):format(resistGain)
end,
}
......@@ -20,10 +20,6 @@
local Object = require "engine.Object"
local Map = require "engine.Map"
local function combatTalentDamage(self, t, min, max)
return self:combatTalentSpellDamage(t, min, max, (self.level + self:getMag()) * 1.2)
end
local function createDarkTendrils(summoner, x, y, target, damage, duration, pinDuration)
if not summoner:getTalentFromId(summoner.T_CREEPING_DARKNESS) then return end
......@@ -141,7 +137,7 @@ end
newTalent{
name = "Creeping Darkness",
type = {"cursed/darkness", 1},
require = cursed_mag_req1,
require = cursed_wil_req1,
points = 5,
random_ego = "attack",
cooldown = 20,
......@@ -277,7 +273,7 @@ newTalent{
return 5 + math.floor(self:getTalentLevel(t))
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 80)
return self:combatTalentMindDamage(t, 0, 60)
end,
action = function(self, t)
local range = self:getTalentRange(t)
......@@ -325,14 +321,14 @@ newTalent{
local damage = t.getDamage(self, t)
local darkCount = t.getDarkCount(self, t)
return ([[Creeping dark slowly spreads from %d spots in a radius of %d around the targeted location. The dark deals %d damage and blocks the sight of any who do not possess Dark Vision or some other magical means of seeing.
Damage improves with the Magic stat.]]):format(darkCount, radius, damage)
The damage will increase with your Mindpower.]]):format(darkCount, radius, damage)
end,
}
newTalent{
name = "Dark Vision",
type = {"cursed/darkness", 2},
require = cursed_mag_req2,
require = cursed_wil_req2,
points = 5,
mode = "passive",
random_ego = "attack",
......@@ -340,18 +336,19 @@ newTalent{
return math.min(10, math.floor((math.sqrt(self:getTalentLevel(t)) - 0.5) * 5))
end,
getDamageIncrease = function(self, t)
return combatTalentDamage(self, t, 0, 40)
return self:combatTalentMindDamage(t, 0, 30)
end,
info = function(self, t)
local damageIncrease = t.getDamageIncrease(self, t)
return ([[Your eyes penetrate the darkness to find anyone that may be hiding there. You can also see through your clouds of creeping dark and gain the advantage of doing %d%% more damage to anyone enveloped by it.]]):format(damageIncrease)
return ([[Your eyes penetrate the darkness to find anyone that may be hiding there. You can also see through your clouds of creeping dark and gain the advantage of doing %d%% more damage to anyone enveloped by it.
The damage will increase with your Mindpower.]]):format(damageIncrease)
end,
}
newTalent{
name = "Dark Torrent",
type = {"cursed/darkness", 3},
require = cursed_mag_req3,
require = cursed_wil_req3,
points = 5,
random_ego = "attack",
hate = 0.8,
......@@ -362,7 +359,7 @@ newTalent{
reflectable = true,
requires_target = true,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 270)
return self:combatTalentMindDamage(t, 0, 260)
end,
action = function(self, t)
local tg = {type="beam", range=self:getTalentRange(t), talent=t}
......@@ -396,14 +393,14 @@ newTalent{
info = function(self, t)
local damage = t.getDamage(self, t)
return ([[Sends a torrent of searing darkness through your foes doing %d damage. There is a small chance the rushing darkness will blind them for 3 turns and cause them to forget their target.
The damage will increase with the Magic stat.]]):format(damDesc(self, DamageType.DARKNESS, damage))
The damage will increase with your Mindpower.]]):format(damDesc(self, DamageType.DARKNESS, damage))
end,
}
newTalent{
name = "Dark Tendrils",
type = {"cursed/darkness", 4},
require = cursed_mag_req4,
require = cursed_wil_req4,
points = 5,
random_ego = "attack",
cooldown = 10,
......@@ -416,7 +413,7 @@ newTalent{
return 2 + math.floor(self:getTalentLevel(t) / 2)
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 100)
return self:combatTalentMindDamage(t, 0, 80)
end,
action = function(self, t)
if self.dark_tendrils then return false end
......@@ -437,7 +434,7 @@ newTalent{
local pinDuration = t.getPinDuration(self, t)
local damage = t.getDamage(self, t)
return ([[Send tendrils of creeping dark out to attack your target and pin them in the darkness for %d turns. Creeping dark will trail behind the tendrils as they move. The darkness does %d damage per turn.
The damage will increase with the Magic stat.]]):format(pinDuration, damage)
The damage will increase with your Mindpower.]]):format(pinDuration, damage)
end,
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010, 2011 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
-- Afflictions
newTalentType{ type="cursed/cursed-form", name = "cursed form", description = "You are wracked with the dark energies of the curse." }
newTalentType{ type="cursed/slaughter", name = "slaughter", description = "Your axe yearns for its next victim." }
newTalentType{ type="cursed/endless-hunt", name = "endless hunt", description = "Each day you lift your weary body and begin the unending hunt." }
newTalentType{ type="cursed/gloom", name = "gloom", description = "All those in your sight must share your despair." }
newTalentType{ type="cursed/rampage", name = "rampage", generic = true, description = "Let loose the hate that has grown within." }
newTalentType{ type="cursed/dark-figure", name = "dark figure", generic = true, description = "Life as an outcast has given you time to reflect on your misfortunes." }
-- Generic requires for corruptions based on talent level
cursed_wil_req1 = {
stat = { wil=function(level) return 12 + (level-1) * 2 end },
level = function(level) return 0 + (level-1) end,
}
cursed_wil_req2 = {
stat = { wil=function(level) return 20 + (level-1) * 2 end },
level = function(level) return 4 + (level-1) end,
}
cursed_wil_req3 = {
stat = { wil=function(level) return 28 + (level-1) * 2 end },
level = function(level) return 8 + (level-1) end,
}
cursed_wil_req4 = {
stat = { wil=function(level) return 36 + (level-1) * 2 end },
level = function(level) return 12 + (level-1) end,
}
cursed_wil_req5 = {
stat = { wil=function(level) return 44 + (level-1) * 2 end },
level = function(level) return 16 + (level-1) end,
}
cursed_str_req1 = {
stat = { str=function(level) return 12 + (level-1) * 2 end },
level = function(level) return 0 + (level-1) end,
}
cursed_str_req2 = {
stat = { str=function(level) return 20 + (level-1) * 2 end },
level = function(level) return 4 + (level-1) end,
}
cursed_str_req3 = {
stat = { str=function(level) return 28 + (level-1) * 2 end },
level = function(level) return 8 + (level-1) end,
}
cursed_str_req4 = {
stat = { str=function(level) return 36 + (level-1) * 2 end },
level = function(level) return 12 + (level-1) end,
}
cursed_str_req5 = {
stat = { str=function(level) return 44 + (level-1) * 2 end },
level = function(level) return 16 + (level-1) end,
}
load("/data/talents/cursed/cursed-form.lua")
load("/data/talents/cursed/slaughter.lua")
load("/data/talents/cursed/endless-hunt.lua")
load("/data/talents/cursed/gloom.lua")
load("/data/talents/cursed/rampage.lua")
load("/data/talents/cursed/dark-figure.lua")
......@@ -18,10 +18,6 @@
-- darkgod@te4.org
local function combatTalentDamage(self, t, min, max)
return self:combatTalentSpellDamage(t, min, max, (self.level + self:getWil()) * 1.2)
end
-- damage: initial physical damage and used for fractional knockback damage
-- knockback: distance to knockback
-- knockbackDamage: when knockback strikes something, both parties take damage - percent of damage * remaining knockback
......@@ -101,7 +97,7 @@ newTalent{
require = cursed_wil_req1,
points = 5,
random_ego = "attack",
cooldown = 4,
cooldown = 5,
hate = 0.5,
tactical = { ATTACK = 2 },
direct_hit = true,
......@@ -110,7 +106,7 @@ newTalent{
return 4
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 200)
return self:combatTalentMindDamage(t, 0, 240)
end,
getKnockback = function(self, t)
return math.floor((self:getTalentLevelRaw(t) + 1) / 2)
......@@ -133,7 +129,7 @@ newTalent{
local damage = t.getDamage(self, t)
local knockback = t.getKnockback(self, t)
return ([[Focusing your hate, you strike your foe with unseen force for %d damage and %d knockback.
Damage increases with the Willpower stat.]]):format(damDesc(self, DamageType.PHYSICAL, damage), knockback)
Damage increases with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), knockback)
end,
}
......@@ -148,7 +144,7 @@ newTalent{
tactical = { DEFEND = 2 },
no_sustain_autoreset = true,
getMaxDamage = function(self, t)
return combatTalentDamage(self, t, 0, 200)
return self:combatTalentMindDamage(t, 0, 240)
end,
getDisplayName = function(self, t, p)
return ("Deflection (%d)"):format(p.value)
......@@ -199,7 +195,7 @@ newTalent{
info = function(self, t)
local maxDamage = t.getMaxDamage(self, t)
return ([[Deflect 50%% of incoming damage with the force of your will. You may deflect up to %d damage, but first your hate must slowly feed your strength (-0.02 hate regeneration while building strength).
The maximum damage deflected increases with the Willpower stat.]]):format(maxDamage)
The maximum damage deflected increases with your Mindpower.]]):format(maxDamage)
end,
}
......@@ -220,7 +216,7 @@ newTalent{
return math.floor(2 + self:getTalentLevel(t) / 3)
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 240)
return self:combatTalentMindDamage(t, 0, 200)
end,
getKnockback = function(self, t)
return math.floor((self:getTalentLevelRaw(t) + 1) / 2)
......@@ -271,7 +267,7 @@ newTalent{
local knockback = t.getKnockback(self, t)
local dazeDuration = t.getDazeDuration(self, t)
return ([[You rage coalesces at a single point and then explodes outward blasting enemies within a radius of %d in all directions. The blast causes %d damage and %d knockback at the center that decreases with distance. Anyone caught in the explosion will also be dazed for 3 turns.
Damage increases with the Willpower stat.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), knockback)
Damage increases with your Mindpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), knockback)
end,
}
......@@ -290,7 +286,7 @@ newTalent{
return 5 + math.floor(self:getTalentLevel(t))
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 200)
return self:combatTalentMindDamage(t, 0, 140)
end,
getKnockback = function(self, t)
return math.floor(self:getTalentLevel(t))
......@@ -348,7 +344,7 @@ newTalent{
local knockback = t.getKnockback(self, t)
local secondHitChance = t.getSecondHitChance(self, t)
return ([[Your fury becomes an unseen force that randomly lashes out at the foes around you. For %d turns you strike one nearby target doing %d damage and %d knockback. At higher levels there is a chance of a second strike.
Damage increases with the Willpower stat.]]):format(duration, damDesc(self, DamageType.PHYSICAL, damage), knockback, secondHitChance)
Damage increases with your Mindpower.]]):format(duration, damDesc(self, DamageType.PHYSICAL, damage), knockback, secondHitChance)
end,
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010, 2011 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 = "Gesture of Pain",
type = {"cursed/gestures", 1},
mode = "sustained",
require = cursed_cun_req1,
points = 5,
random_ego = "attack",
proj_speed = 4,
tactical = { ATTACK = 2 },
getBaseDamage = function(self, t)
return self:combatTalentMindDamage(t, 0, 125)
end,
getSecondAttackChance = function(self, t)
return 20
end,
attack = function(self, t, target)
if self.hate < 0.1 then return true end
local freeHands = self:getFreeHands()
if freeHands == 0 then return true end
local hit = false
local mindpower = self:combatMindpower()
local baseDamage = t.getBaseDamage(self, t)
if self:checkHit(mindpower, target:combatMentalResist()) then
local damage = baseDamage * rng.float(0.5, 1)
self:project({type="hit", x=target.x,y=target.y}, target.x, target.y, DamageType.MIND, { dam=damage,alwaysHit=true,criticals=true,crossTierChance=100 })
self:incHate(-0.1)
game:playSoundNear(self, "actions/melee_hit_squish")
hit = true
else
game.logSeen(self, "%s resists the Gesture of Pain.", target.name:capitalize())
game:playSoundNear(self, "actions/melee_miss")
end
if not target.dead and freeHands > 1 and self.hate >= 0.1 and rng.chance(t.getSecondAttackChance(self, t)) then
if self:checkHit(mindpower, target:combatMentalResist()) then
local damage = baseDamage * rng.float(0.5, 1)
self:project({type="hit", x=target.x,y=target.y}, target.x, target.y, DamageType.MIND, { dam=damage,alwaysHit=true,criticals=true,crossTierChance=100 })
game:playSoundNear(self, "actions/melee_hit_squish")
hit = true
self:incHate(-0.1)
else
game.logSeen(self, "%s resists the Gesture of Pain.", target.name:capitalize())
game:playSoundNear(self, "actions/melee_miss")
end
end
if hit then
game.level.map:particleEmitter(target.x, target.y, 1, "melee_attack", {color=colors.VIOLET})
end
return self:combatSpeed(), hit
end,
activate = function(self, t)
return {}
end,
deactivate = function(self, t, p)
return true
end,
info = function(self, t)
local baseDamage = t.getBaseDamage(self, t)
local secondAttackChance = t.getSecondAttackChance(self, t)
return ([[Use a gesture of pain in place of an normal attack to strike into the minds of your enemies, inflicting between %0.1f and %0.1f mind damage. Requires a single free hand. A second free hand adds a %d%% chance of a second attack. Each hit costs 0.1 hate.
Can cause critical hits with cross tier effects. The damage will increase with your Mindpower.]]):format(damDesc(self, DamageType.MIND, baseDamage * 0.5), damDesc(self, DamageType.MIND, baseDamage), secondAttackChance)
end,
}
newTalent{
name = "Gesture of Command",
type = {"cursed/gestures", 2},
require = cursed_cun_req2,
mode = "passive",
points = 5,
getMindpowerChange = function(self, t, freeHands)
freeHands = freeHands or self:getFreeHands()
if freeHands == 0 then return 0 end
local change = math.pow(self:getTalentLevel(t), 0.7) * 4
if freeHands > 1 then change = change * 1.4 end
return math.floor(change)
end,
info = function(self, t)
local mindpowerChange1 = t.getMindpowerChange(self, t, 1)
local mindpowerChange2 = t.getMindpowerChange(self, t, 2)
return ([[Command the forces of your mind through your gestures. With 1 free hand, you gain %d mindpower. With 2 free hands, you gain %d mindpower.]]):format(mindpowerChange1, mindpowerChange2)
end,
}
newTalent{
name = "Gesture of Power",
type = {"cursed/gestures", 3},
require = cursed_cun_req3,
mode = "passive",
points = 5,
getMindCritChange = function(self, t, freeHands)
freeHands = freeHands or self:getFreeHands()
if freeHands == 0 then return 0 end
local change = math.pow(self:getTalentLevel(t), 0.5) * 2
if freeHands > 1 then change = change * 1.4 end
return change
end,
info = function(self, t)
local mindCritChange1 = t.getMindCritChange(self, t, 1)
local mindCritChange2 = t.getMindCritChange(self, t, 2)
return ([[Enhance your mental attacks with a single gesture, granting a chance to inflict critical damage with certain mind attacks. With 1 free hand, you gain a %0.1f%% chance. With 2 free hands, you gain %0.1f%% chance.]]):format(mindCritChange1, mindCritChange2)
end,
}
newTalent{
name = "Gesture of Guarding",
type = {"cursed/gestures", 4},
require = cursed_cun_req4,
mode = "sustained",
cooldown = 10,
points = 5,
getDamageResistChange = function(self, t, distance, freeHands)
freeHands = freeHands or self:getFreeHands()
if freeHands == 0 then return 0 end
local change = math.pow(self:getTalentLevel(t), 0.5) * 1.15
if freeHands > 1 then change = change * 1.4 end
return change * math.min(7, distance)
end,
getIncDamageChange = function(self, t, distance)
local change = -(2 + math.pow(self:getTalentLevel(t), 0.5) * 0.8)
return change * math.min(7, distance)
end,
on_damageRecieved = function(self, t, type, dam, src)
if src and src.x and src.y and (self.x ~= src.x or self.y ~= src.y) and self:hasLOS(src.x, src.y) then
local distance = core.fov.distance(src.x, src.y, self.x, self.y)
dam = dam * (100 - t.getDamageResistChange(self, t, distance) / 100)
end
return dam
end,
on_damageInflicted = function(self, type, dam, target)
if target and target.x and target.y and (self.x ~= target.x or self.y ~= target.y) and self:hasLOS(target.x, target.y) then
local distance = core.fov.distance(target.x, target.y, self.x, self.y)
dam = dam * (100 + t.getIncDamageChange(self, t, distance) / 100)
end
return dam
end,
info = function(self, t)
local damageResistChange1 = t.getDamageResistChange(self, t, 1, 1)
local damageResistChangeMax1 = t.getDamageResistChange(self, t, 1000, 1)
local damageResistChange2 = t.getDamageResistChange(self, t, 1, 2)
local damageResistChangeMax2 = t.getDamageResistChange(self, t, 1000, 2)
local incDamageChange = t.getIncDamageChange(self, t, 1)
local incDamageChangeMax = t.getIncDamageChange(self, t, 1000)
return ([[While active, you guard against incoming damage with a sweep of your hand. The farther the source of damage the more it will be reduced, with a maximum reduction at range 7. With 1 free hand, damage taken is reduced by %0.1f%% per space away (up to a maximum of %0.1f%%). With 2 free hands it is reduced by %0.1f%% (up to a maximum of %0.1f%%). Guarding yourself requires great focus and reduces the damage you inflict at range by %0.1f%% per space away (up to a maximum of %0.1f%%).]]):format(damageResistChange1, damageResistChangeMax1, damageResistChange2, damageResistChangeMax2, -incDamageChange, -incDamageChangeMax)
end,
}
......@@ -221,10 +221,10 @@ newTalent{
require = cursed_wil_req4,
points = 5,
getDamage = function(self, t)
return combatTalentDamage(self, t, 3, 15)
return combatTalentDamage(self, t, 2, 10)
end,
getMaxHeal = function(self, t)
return combatTalentDamage(self, t, 5, 30)
return combatTalentDamage(self, t, 4, 25)
end,
info = function(self, t)
local damage = t.getDamage(self, t)
......
......@@ -17,29 +17,18 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local function combatTalentDamage(self, t, min, max)
return self:combatTalentSpellDamage(t, min, max, (self.level + self:getWil()) * 1.2)
end
local function combatPower(self, t, multiplier)
return (self.level + self:getWil()) * (multiplier or 1)
end
newTalent{
name = "Reproach",
type = {"cursed/punishments", 1},
require = cursed_wil_req1,
require = cursed_cun_req1,
points = 5,
random_ego = "attack",
cooldown = 3,
cooldown = 4,
hate = 0.5,
range = 3,
tactical = { ATTACKAREA = 2 },
getDamage = function(self, t)
return combatTalentDamage(self, t, 10, 350)
end,
getMindpower = function(self, t)
return combatPower(self, t)
return self:combatTalentMindDamage(t, 10, 280)
end,
action = function(self, t)
local targets = {}
......@@ -56,9 +45,8 @@ newTalent{
if #targets == 0 then return false end
local damage = t.getDamage(self, t) / #targets
local mindpower = t.getMindpower(self, t)
for i, t in ipairs(targets) do
self:project({type="hit", x=t.x,y=t.y}, t.x, t.y, DamageType.MIND, { dam=damage, mindpower=mindpower })
self:project({type="hit", x=t.x,y=t.y}, t.x, t.y, DamageType.MIND, { dam=damage,criticals=true })
game.level.map:particleEmitter(t.x, t.y, 1, "reproach", { dx = self.x - t.x, dy = self.y - t.y })
end
......@@ -68,16 +56,15 @@ newTalent{
end,
info = function(self, t)
local damage = t.getDamage(self, t)
local mindpower = t.getMindpower(self, t)
return ([[You unleash your hateful mind on any who dare approach you. %d mind damage is spread between everyone in range (mindpower %d vs mental resistance).
The damage and mindpower will increase with the Willpower stat.]]):format(damDesc(self, DamageType.MIND, damage), mindpower)
return ([[You unleash your hateful mind on any who dare approach you. %d mind damage is spread between everyone in range.
Can cause critical hits. The damage increases with your Mindpower.]]):format(damDesc(self, DamageType.MIND, damage))
end,
}
newTalent{
name = "Hateful Whisper",
type = {"cursed/punishments", 2},
require = cursed_wil_req2,
require = cursed_cun_req2,
points = 5,
random_ego = "attack",
cooldown = 10,
......@@ -90,10 +77,7 @@ newTalent{
return 10
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 180)
end,
getMindpower = function(self, t)
return combatPower(self, t)
return self:combatTalentMindDamage(t, 0, 160)
end,
getJumpRange = function(self, t)
return 0.7 + math.sqrt(self:getTalentLevel(t))
......@@ -109,7 +93,7 @@ newTalent{
local duration = t.getDuration(self, t)
local damage = t.getDamage(self, t)
local mindpower = t.getMindpower(self, t)
local mindpower = self:combatMindpower()
local jumpRange = t.getJumpRange(self, t)
local extraJumpChance = t.getExtraJumpChance(self, t)
target:setEffect(target.EFF_HATEFUL_WHISPER, duration, {
......@@ -126,11 +110,10 @@ newTalent{
end,
info = function(self, t)
local damage = t.getDamage(self, t)
local mindpower = t.getMindpower(self, t)
local jumpRange = t.getJumpRange(self, t)
local extraJumpChance = t.getExtraJumpChance(self, t)
return ([[Send a whisper filled with hate to spread throughout your foes. When first heard they will suffer %d mind damage and the whisper can travel to another victim within a range of %0.2f and begin to spread from them. There is a %d%% chance the whisper will be passed to two victims instead of one. (%d mindpower vs mental resistance)
The damage and mindpower will increase with the Willpower stat.]]):format(damDesc(self, DamageType.MIND, damage), jumpRange, extraJumpChance, mindpower)
return ([[Send a whisper filled with hate to spread throughout your foes. When first heard they will suffer %d mind damage and the whisper can travel to another victim within a range of %0.2f and begin to spread from them. There is a %d%% chance the whisper will be passed to two victims instead of one.
Can cause critical hits. The damage increases with your Mindpower.]]):format(damDesc(self, DamageType.MIND, damage), jumpRange, extraJumpChance)
end,
}
......@@ -138,7 +121,7 @@ newTalent{
newTalent{
name = "Cursed Ground",
type = {"cursed/punishments", 2},
require = cursed_wil_req2,
require = cursed_cun_req2,
points = 5,
random_ego = "attack",
cooldown = 6,
......@@ -255,7 +238,7 @@ newTalent{
newTalent{
name = "Agony",
type = {"cursed/punishments", 3},
require = cursed_wil_req3,
require = cursed_cun_req3,
points = 5,
random_ego = "attack",
cooldown = 3,
......@@ -268,10 +251,7 @@ newTalent{
return 5
end,
getDamage = function(self, t)
return combatTalentDamage(self, t, 0, 160)
end,
getMindpower = function(self, t)
return combatPower(self, t, 1.2)
return self:combatTalentMindDamage(t, 0, 160)
end,
action = function(self, t)
local range = self:getTalentRange(t)
......@@ -280,7 +260,7 @@ newTalent{
if not x or not y or not target or core.fov.distance(self.x, self.y, x, y) > range then return nil end
local damage = t.getDamage(self, t)
local mindpower = t.getMindpower(self, t)
local mindpower = self:combatMindpower()
local duration = t.getDuration(self, t)
target:setEffect(target.EFF_AGONY, duration, {
source = self,
......@@ -295,9 +275,8 @@ newTalent{
local duration = t.getDuration(self, t)
local maxDamage = t.getDamage(self, t)
local minDamage = maxDamage / duration
local mindpower = t.getMindpower(self, t)
return ([[Unleash agony upon your target. The pain will grow over the course of %d turns. The first turn will inflict %d damage and slowly increase to %d on the last turn. (%d mindpower vs mental resistance)
The damage and mindpower will increase with the Willpower stat.]]):format(duration, damDesc(self, DamageType.MIND, minDamage), damDesc(self, DamageType.MIND, maxDamage), mindpower)
return ([[Unleash agony upon your target. The pain will grow over the course of %d turns. The first turn will inflict %d damage and slowly increase to %d on the last turn.
The damage will increase with your Mindpower.]]):format(duration, damDesc(self, DamageType.MIND, minDamage), damDesc(self, DamageType.MIND, maxDamage))
end,
}
......@@ -305,20 +284,15 @@ newTalent{
name = "Madness",
type = {"cursed/punishments", 4},
mode = "passive",
require = cursed_wil_req4,
require = cursed_cun_req4,
points = 5,
tactical = { ATTACK = 2 },
getMindpower = function(self, t)
return math.sqrt(self:getTalentLevel(t)) * 0.4 * combatPower(self, t)
end,
getChance = function(self, t)
return 25
return math.sqrt(self:getTalentLevel(t)) * 8
end,
doMadness = function(self, t, src)
local mindpower = t.getMindpower(src, t)
local chance = t.getChance(src, t)
if self and src and self:reactionToward(src) < 0 and self:checkHit(mindpower, self:combatMentalResist(), 0, chance, 5) then
if self and src and self:reactionToward(src) < 0 and self:checkHit(self:combatMindpower(), self:combatMentalResist(), 0, chance, 5) then
local effect = rng.range(1, 3)
if effect == 1 then
-- confusion
......@@ -342,10 +316,8 @@ newTalent{
end
end,
info = function(self, t)
local mindpower = t.getMindpower(self, t)
local chance = t.getChance(self, t)
return ([[Every time you inflict mental damage there is a %d%% chance that your foe must save against your mindpower or go mad. Madness can briefly cause them to become confused, slowed or stunned. (%d mindpower vs mental resistance).
The mindpower will increase with the Willpower stat.]]):format(chance, mindpower)
return ([[Every time you inflict mental damage there is a %d%% chance that your foe must save against your Mindpower or go mad. Madness can briefly cause them to become confused, slowed or stunned.]]):format(chance)
end,
}
......@@ -353,7 +325,7 @@ newTalent{
newTalent{
name = "Tortured Sanity",
type = {"cursed/punishments", 4},
require = cursed_wil_req4,
require = cursed_cun_req4,
points = 5,
random_ego = "attack",
cooldown = 30,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment