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

All timed effects are now grouped in one of four categories: physical, mental,...

All timed effects are now grouped in one of four categories: physical, mental, magical or other, making it more obvious which save works with each. "Other" timed effects can never be reduced/removed/altered


git-svn-id: http://svn.net-core.org/repos/t-engine4@4445 51575b47-30f0-44d4-a5cc-537603b46e54
parent 472a1934
No related branches found
No related tags found
No related merge requests found
Showing
with 3047 additions and 4613 deletions
......@@ -2839,14 +2839,9 @@ end
-- Tells on_set_temporary_effect() what save to use for a given effect type
local save_for_effects = {
bane = "combatSpellResist",
curse = "combatMentalResist",
disease = "combatSpellResist",
hex = "combatSpellResist",
magical = "combatSpellResist",
mental = "combatMentalResist",
physical = "combatPhysicalResist",
poison = "combatPhysicalResist",
}
--- Adjust temporary effects
......@@ -2876,11 +2871,11 @@ function _M:on_set_temporary_effect(eff_id, e, p)
if e.status == "detrimental" and self:knowTalent(self.T_RESILIENT_BONES) then
p.dur = math.ceil(p.dur * (1 - (self:getTalentLevel(self.T_RESILIENT_BONES) / 12)))
end
if e.status == "detrimental" and self:hasEffect(self.EFF_FADE_FROM_TIME) then
if e.status == "detrimental" and e.type ~= "other" and self:hasEffect(self.EFF_FADE_FROM_TIME) then
local fft = self:hasEffect(self.EFF_FADE_FROM_TIME)
p.dur = math.ceil(p.dur * (1 - (fft.power/100)))
end
if e.status == "detrimental" and e.type ~= "magical" and self:knowTalent(self.T_SUPPRESSION) then
if e.status == "detrimental" and e.type ~= "magical" and e.type ~= "other" and self:knowTalent(self.T_SUPPRESSION) then
local t = self:getTalentFromId(self.T_SUPPRESSION)
p.dur = math.ceil(p.dur * (1 - (t.getPercent(self, t)/100)))
end
......
......@@ -243,13 +243,13 @@ TOOLTIP_RDEFENSE = [[#GOLD#Ranged Defense#LAST#
Ranged defense represents your chance to avoid being hit at all by a ranged attack, it is measured against the attacker's accuracy chance.
]]
TOOLTIP_PHYS_SAVE = [[#GOLD#Physical saving throw#LAST#
Increases chance to shrug off physically-induced effects. Also reduces duration of detrimental physical effects and poisons by up to one turn for every ten points, depending on the opponent.
Increases chance to shrug off physically-induced effects. Also reduces duration of detrimental physical effects by up to one turn for every ten points, depending on the opponent.
]]
TOOLTIP_SPELL_SAVE = [[#GOLD#Spell saving throw#LAST#
Increases chance to shrug off magically-induced effects. Also reduces duration of detrimental magical effects, diseases, hexes, and banes by up to one turn for every ten points, depending on the opponent.
Increases chance to shrug off magically-induced effects. Also reduces duration of detrimental magical effects by up to one turn for every ten points, depending on the opponent.
]]
TOOLTIP_MENTAL_SAVE = [[#GOLD#Mental saving throw#LAST#
Increases chance to shrug off mentally-induced effects. Also reduces duration of detrimental mental effects and curses by up to one turn for every ten points, depending on the opponent.
Increases chance to shrug off mentally-induced effects. Also reduces duration of detrimental mental effects by up to one turn for every ten points, depending on the opponent.
]]
-------------------------------------------------------------
......
......@@ -45,7 +45,7 @@ newBirthDescriptor{
starting_quest = "start-dwarf",
starting_intro = "dwarf",
resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={physical=true}, dur=4, power=14}),
resolvers.inventory{ id=true, {defined="ORB_SCRYING"} },
resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end),
},
......
......@@ -125,7 +125,7 @@ newBirthDescriptor
starting_intro = "thalore",
life_rating = 11,
resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={physical=true}, dur=4, power=14}),
},
experience = 1.35,
random_escort_possibilities = { {"norgos-lair", 2, 3}, {"heart-gloom", 1, 2}, {"daikara", 1, 3}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, },
......
......@@ -50,7 +50,7 @@ newBirthDescriptor{
starting_intro = "halfling",
size_category = 2,
resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={physical=true}, dur=4, power=14}),
resolvers.inventory{ id=true, {defined="ORB_SCRYING"} },
resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end),
},
......
......@@ -51,7 +51,7 @@ newBirthDescriptor{
faction = "allied-kingdoms",
type = "humanoid", subtype="human",
resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={physical=true}, dur=4, power=14}),
resolvers.inventory{ id=true, {defined="ORB_SCRYING"} },
resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end),
},
......
......@@ -49,7 +49,7 @@ newBirthDescriptor{
starting_intro = "yeek",
blood_color = colors.BLUE,
resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}),
resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={physical=true}, dur=4, power=14}),
},
random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 3}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, },
}
......
......@@ -875,7 +875,7 @@ newDamageType{
local status = (src:reactionToward(target) >= 0) and "detrimental" or "beneficial"
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.status == status and (e.type == "magical" or e.type == "physical" or e.type == "curse" or e.type == "hex") then
if e.status == status and (e.type == "magical" or e.type == "physical") then
effs[#effs+1] = {"effect", eff_id}
end
end
......@@ -1664,7 +1664,7 @@ newDamageType{
if target and (src:reactionToward(target) < 0 or dam.ff) then
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "bane" then return end
if e.subtype == "bane" then return end
end
local what = rng.percent(50) and "blind" or "confusion"
......
......@@ -156,20 +156,21 @@ newEntity{ base = "BASE_INFUSION",
inscription_kind = "protect",
inscription_data = resolvers.generic(function(e)
local what = {}
local effects = {physical=true, mental=true, magical=true}
local eff1 = rng.tableIndex(effects)
what[eff1] = true
local two = rng.percent(20) and true or false
if two then
local eff2 = rng.tableIndex(effects, {eff1})
what[eff2] = true
end
return {
cooldown = rng.range(12, 17),
dur = rng.mbonus(4, resolvers.current_level, resolvers.mbonus_max_level) + 4,
power = rng.mbonus(20, resolvers.current_level, resolvers.mbonus_max_level) + 10,
use_stat_mod = 0.1,
what = {
poison = true,
disease = rng.percent(40) and true or nil,
curse = rng.percent(40) and true or nil,
hex = rng.percent(40) and true or nil,
magical = rng.percent(40) and true or nil,
physical = rng.percent(40) and true or nil,
mental = rng.percent(40) and true or nil,
}
what=what,
}
end),
inscription_talent = "INFUSION:_WILD",
......
......@@ -92,7 +92,7 @@ newEntity{ base = "BASE_STAFF",
-- Go through all spell effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "disease" then
if e.subtype == "disease" then
effs[#effs+1] = {"effect", eff_id}
end
end
......
......@@ -168,7 +168,7 @@ newTalent{
-- Go through all spell effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type ~= "time" and e.type ~= "other" then
if e.type == "physical" then
effs[#effs+1] = {"effect", eff_id}
end
end
......@@ -187,9 +187,8 @@ newTalent{
info = function(self, t)
local heal = t.getHeal(self, t)
local count = t.getRemoveCount(self, t)
return ([[You revert your body to a previous state, healing yourself for %0.2f life and removing %d status effects (both good and bad).
The life healed will scale with your Paradox and Spellpower.
Does not remove 'time' or 'other' effects.]]):
return ([[You revert your body to a previous state, healing yourself for %0.2f life and removing %d physical status effects (both good and bad).
The life healed will scale with your Paradox and Spellpower.]]):
format(heal, count)
end,
}
\ No newline at end of file
......@@ -91,7 +91,7 @@ newTalent{
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "disease" then
if e.subtype == "disease" then
diseases[#diseases+1] = {id=eff_id, params=p}
end
end
......@@ -156,7 +156,7 @@ newTalent{
local diseases = {}
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "disease" then
if e.subtype == "disease" then
diseases[#diseases+1] = {id=eff_id, params=p}
end
end
......@@ -199,7 +199,7 @@ newTalent{
local diseases = {}
for eff_id, p in pairs(carrier.tmp) do
local e = carrier.tempeffect_def[eff_id]
if e.type == "disease" then
if e.subtype == "disease" then
diseases[#diseases+1] = {id=eff_id, params=p}
end
end
......
......@@ -94,7 +94,7 @@ newTalent{
local nb = 0
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "poison" then nb = nb + 1 end
if e.subtype == "poison" then nb = nb + 1 end
end
local dam = self:combatTalentWeaponDamage(t, 0.5 + nb * 0.6, 0.9 + nb * 1)
......@@ -135,7 +135,7 @@ newTalent{
local mod = (100 + self:combatTalentStatDamage(t, "cun", 40, 250)) / 100
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "poison" then
if e.subtype == "poison" then
p.dur = math.ceil(p.dur / 2)
p.power = (p.power or 0) * mod
end
......@@ -170,7 +170,7 @@ newTalent{
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "poison" and p.src == self then
if e.subtype == "poison" and p.src == self then
for i, tgt in ipairs(possible) do if rng.percent(20 + self:getTalentLevelRaw(t) * 8) and not tgt:hasEffect(eff_id) and self:reactionToward(tgt) < 0 then
p.src = nil
local pp = table.clone(p)
......@@ -195,7 +195,7 @@ local function checkChance(self, target)
local nb = 1
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "poison" then nb = nb + 1 end
if e.subtype == "poison" then nb = nb + 1 end
end
return rng.percent(chance / nb)
end
......
......@@ -29,7 +29,7 @@ newTalent{
on_pre_use = function(self, t)
for eff_id, p in pairs(self.tmp) do
local e = self.tempeffect_def[eff_id]
if e.type == "disease" or e.type == "poison" then
if e.subtype == "disease" or e.subtype == "poison" then
return true
end
end
......@@ -39,7 +39,7 @@ newTalent{
local nb = 0
for eff_id, p in pairs(self.tmp) do
local e = self.tempeffect_def[eff_id]
if e.type == "disease" or e.type == "poison" then
if e.subtype == "disease" or e.subtype == "poison" then
nb = nb + 1
end
end
......
......@@ -588,7 +588,7 @@ newTalent{
-- Go through all spell effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "poison" or e.type == "disease" then
if e.subtype == "poison" or e.subtype == "disease" then
effs[#effs+1] = {"effect", eff_id}
end
end
......
......@@ -222,7 +222,7 @@ newTalent{
local todel = {}
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type ~= "time" then
if e.type ~= "other" then
if e.status == "beneficial" then
p.dur = p.dur + self:getTalentLevelRaw(t)
elseif e.status == "detrimental" then
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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