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

Moment of Prescience now increases accuracy too

Spin Fate now buffs all saves each time it's applied
Swap and Temporal Wake ranges adjusted
Dimensional Step no longer lets you break line of sight but takes no time to cast
Wormhole now takes time to cast and the exit radius adjusted
Celerity improved
Strength of Purpose and Quantum Feed values adjusted


git-svn-id: http://svn.net-core.org/repos/t-engine4@4935 51575b47-30f0-44d4-a5cc-537603b46e54
parent 28c09bc4
No related branches found
No related tags found
No related merge requests found
......@@ -108,33 +108,29 @@ newTalent{
paradox = 10,
cooldown = 18,
getDuration = function(self, t) return math.ceil(self:getTalentLevel(t) * 2) end,
getDetection = function(self, t) return self:getTalentLevel(t) * 5 end,
getDefense = function(self, t) return self:getTalentLevel(t) * 4 end,
getPower = function(self, t) return math.ceil(self:getTalentLevel(t) * 3) end,
tactical = { BUFF = 4 },
no_energy = true,
no_npc_use = true,
action = function(self, t)
local defense_power = t.getDefense(self, t)
local detect_power = t.getDetection(self, t)
local power = t.getPower(self, t)
-- check for Spin Fate
local eff = self:hasEffect(self.EFF_SPIN_FATE)
if eff then
local bonus = math.max(0, (eff.cur_mental or eff.mental), (eff.cur_physical or eff.physical), (eff.cur_spell or eff.spell))/2
defense_power = defense_power + bonus
detect_power = detect_power + bonus
local bonus = math.max(0, (eff.cur_save_bonus or eff.save_bonus) / 2)
power = power + bonus
end
self:setEffect(self.EFF_PRESCIENCE, t.getDuration(self, t), {detect=detect_power, defense=defense_power})
self:setEffect(self.EFF_PRESCIENCE, t.getDuration(self, t), {power=power})
return true
end,
info = function(self, t)
local detect = t.getDetection(self, t)
local defense = t.getDefense(self, t)
local power = t.getPower(self, t)
local duration = t.getDuration(self, t)
return ([[You pull your awareness fully into the moment, increasing your stealth detection and see invisibility by %d and your defense by %d for %d turns.
If you have Spin Fate going when you cast this spell you'll gain a bonus to these values equal to 50%% of your highest active spin.
return ([[You pull your awareness fully into the moment increasing your stealth detection, see invisibility, defense, and accuracy by %d for %d turns.
If you have Spin Fate going when you cast this spell you'll gain a bonus to these values equal to 50%% of your spin.
This spell takes no time to cast.]]):
format(detect, defense, duration)
format(power, duration)
end,
}
......@@ -145,21 +141,15 @@ newTalent{
mode = "passive",
points = 5,
getDuration = function(self, t) return 1 + math.ceil(self:getTalentLevel(t)) end,
getSaveBonus = function(self, t) return self:getTalentLevel(t) end,
getSaveBonus = function(self, t) return math.ceil(self:getTalentLevel(t)) end,
do_spin_fate = function(self, t, type)
local save_bonus = t.getSaveBonus(self, t)
local mental_save, physical_save, spell_save = 0
if type == "mental" then mental_save = save_bonus end
if type == "physical" then physical_save = save_bonus end
if type == "spell" then spell_save = save_bonus end
print("Spin Fate", type, mental_save, physical_save, spell_save)
if type ~= "defense" then
if not self:hasEffect(self.EFF_SPIN_FATE) then
game:playSoundNear(self, "talents/spell_generic")
end
self:setEffect(self.EFF_SPIN_FATE, t.getDuration(self, t), {max_bonus = t.getSaveBonus(self, t) * 5, mental = mental_save, physical = physical_save, spell = spell_save})
self:setEffect(self.EFF_SPIN_FATE, t.getDuration(self, t), {max_bonus = t.getSaveBonus(self, t) * 5, save_bonus = t.getSaveBonus(self, t)})
end
return true
......@@ -167,7 +157,7 @@ newTalent{
info = function(self, t)
local save = t.getSaveBonus(self, t)
local duration = t.getDuration(self, t)
return ([[You've learned to make minor corrections in how future events unfold. Each time an attacker makes a check against one of your saving throws the respective value is increased by %d (stacking up to a maximum increase of %d for each value).
return ([[You've learned to make minor corrections in how future events unfold. Each time you make a saving throw all your saves are increased by %d (stacking up to a maximum increase of %d for each value).
The effect will last %d turns but the duration will refresh everytime it's reapplied.]]):
format(save, save * 5, duration)
end,
......
......@@ -53,7 +53,7 @@ newTalent{
requires_target = true,
direct_hit = true,
range = function(self, t)
return 3 + math.ceil(self:getTalentLevel(t))
return 2 + math.floor(self:getTalentLevel(t))
end,
getConfuseDuration = function(self, t) return math.floor((self:getTalentLevel(t) + 2) * getParadoxModifier(self, pm)) end,
getConfuseEfficency = function(self, t) return (30 + self:getTalentLevelRaw(t) * 10) end,
......@@ -151,7 +151,7 @@ newTalent{
end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 20, 230) * getParadoxModifier(self, pm) end,
range = function(self, t)
return 2 + math.floor(self:getTalentLevel(t)/2)
return 2 + math.ceil(self:getTalentLevel(t)/2)
end,
action = function(self, t)
local tg = self:getTalentTarget(t)
......
......@@ -30,19 +30,16 @@ newTalent{
end,
requires_target = true,
target = function(self, t)
if self:getTalentLevel(t) >=4 then
return {type="hit", range=self:getTalentRange(t), pass_terrain=true, requires_knowledge=false}
else
return {type="hit", range=self:getTalentRange(t)}
end
return {type="hit", range=self:getTalentRange(t)}
end,
direct_hit = true,
no_energy = true,
is_teleport = true,
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
if not self:hasLOS(x, y) and self:getTalentLevel(t) < 4 then
if not self:hasLOS(x, y) then
game.logSeen(self, "You do not have line of sight.")
return nil
end
......@@ -67,7 +64,7 @@ newTalent{
info = function(self, t)
local range = self:getTalentRange(t)
return ([[Teleports you to up to %d tiles away to a targeted location in line of sight. Additional talent points increase the range.
At talent level 4 you no longer require line of sight to teleport.]]):format(range)
This spell takes no time to cast..]]):format(range)
end,
}
......@@ -148,12 +145,11 @@ newTalent{
return 10 + math.floor(self:getTalentLevel(t)/2)
end,
radius = function(self, t)
return 7 - math.floor(self:getTalentLevel(t))
return 8 - math.floor(self:getTalentLevel(t))
end,
requires_target = true,
getDuration = function (self, t) return 5 + math.floor(self:getTalentLevel(t)*getParadoxModifier(self, pm)) end,
no_npc_use = true,
no_energy = true,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=1, nolock=true, talent=t}
local entrance_x, entrance_y = self:getTarget(tg)
......@@ -274,8 +270,7 @@ newTalent{
local duration = t.getDuration(self, t)
local radius = self:getTalentRadius(t)
return ([[You fold the space between yourself and a random point within range, creating a pair of wormholes. Any creature stepping on either wormhole will be teleported to the other. The wormholes will last %d turns.
At level 4 you may choose the exit location target area (radius %d). The duration will scale with your Paradox.
This spell takes no time to cast.]])
At level 4 you may choose the exit location target area (radius %d). The duration will scale with your Paradox.]])
:format(duration, radius)
end,
}
......
......@@ -24,13 +24,13 @@ newTalent{
points = 5,
mode = "passive",
on_learn = function(self, t)
self.movement_speed = self.movement_speed + 0.05
self.movement_speed = self.movement_speed + 0.10
end,
on_unlearn = function(self, t)
self.movement_speed = self.movement_speed - 0.05
self.movement_speed = self.movement_speed - 0.10
end,
info = function(self, t)
local power = self:getTalentLevelRaw(t) * 5
local power = self:getTalentLevelRaw(t) * 10
return ([[Increases your movement speed by %d%% and switching between already equipped weapon sets (default hotkey x) no longer takes a turn.]]):
format(power)
end,
......
......@@ -27,7 +27,7 @@ newTalent{
sustain_paradox = 100,
cooldown = 18,
tactical = { BUFF = 2 },
getPower = function(self, t) return math.ceil((self:getTalentLevel(t) * 1.5) + self:combatTalentStatDamage(t, "wil", 5, 20)) end,
getPower = function(self, t) return math.ceil(self:combatTalentStatDamage(t, "wil", 5, 20)) end,
activate = function(self, t)
game:playSoundNear(self, "talents/arcane")
return {
......@@ -77,7 +77,7 @@ newTalent{
sustain_paradox = 100,
cooldown = 18,
tactical = { BUFF = 2 },
getPower = function(self, t) return math.ceil((self:getTalentLevel(t) * 1.5) + self:combatTalentStatDamage(t, "wil", 5, 20)) end,
getPower = function(self, t) return math.ceil(self:combatTalentStatDamage(t, "wil", 5, 20)) end,
activate = function(self, t)
game:playSoundNear(self, "talents/arcane")
return {
......
......@@ -1017,24 +1017,26 @@ newEffect{
}
newEffect{
name = "PRESCIENCE", image = "talents/premonition.png",
name = "PRESCIENCE", image = "talents/moment_of_prescience.png",
desc = "Prescience",
long_desc = function(self, eff) return ("The target's awareness is fully in the present, increasing stealth detection and see invisibility by %d and defense by %d."):format(eff.detect, eff.defense) end,
long_desc = function(self, eff) return ("The target's awareness is fully in the present, increasing stealth detection, see invisibility, defense, and accuracy by %d."):format(eff.power) end,
type = "magical",
subtype = { sense=true, temporal=true },
status = "beneficial",
parameters = { detect = 10, defense=1},
parameters = { power = 1 },
on_gain = function(self, err) return "#Target# has found the present moment!", "+Prescience" end,
on_lose = function(self, err) return "#Target#'s awareness returns to normal.", "-Prescience" end,
activate = function(self, eff)
eff.defid = self:addTemporaryValue("combat_def", eff.defense)
eff.invis = self:addTemporaryValue("see_invisible", eff.detect)
eff.stealth = self:addTemporaryValue("see_stealth", eff.detect)
eff.defid = self:addTemporaryValue("combat_def", eff.power)
eff.atkid = self:addTemporaryValue("combat_atk", eff.power)
eff.invis = self:addTemporaryValue("see_invisible", eff.power)
eff.stealth = self:addTemporaryValue("see_stealth", eff.power)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("see_invisible", eff.invis)
self:removeTemporaryValue("see_stealth", eff.stealth)
self:removeTemporaryValue("combat_def", eff.defid)
self:removeTemporaryValue("combat_atk", eff.atkid)
end,
}
......@@ -1322,12 +1324,12 @@ newEffect{
newEffect{
name = "SPIN_FATE", image = "talents/spin_fate.png",
desc = "Spin Fate",
long_desc = function(self, eff) return ("The target's physical save has been increased by %d, spell saves by %d, and mental saves by %d."):
format(eff.cur_physical or eff.physical, eff.cur_spell or eff.spell, eff.cur_mental or eff.mental) end,
long_desc = function(self, eff) return ("The target's saves have been increased by %d."):
format(eff.cur_save_bonus or eff.save_bonus) end,
type = "magical",
subtype = { temporal=true },
status = "beneficial",
parameters = { physical=0, mental=0, spell=0, max = 10},
parameters = { save_bonus, max_bonus = 10},
on_gain = function(self, err) return "#Target# takes fate by the hand.", "+Spin Fate" end,
on_lose = function(self, err) return "#Target#'s fate is no longer being spun.", "-Spin Fate" end,
on_merge = function(self, old_eff, new_eff)
......@@ -1336,26 +1338,22 @@ newEffect{
self:removeTemporaryValue("combat_spellresist", old_eff.spellid)
self:removeTemporaryValue("combat_mentalresist", old_eff.mentalid)
-- combine the old and new values
old_eff.cur_physical = math.min(new_eff.max_bonus, old_eff.cur_physical + new_eff.physical)
old_eff.cur_spell = math.min(new_eff.max_bonus, old_eff.cur_spell + new_eff.spell)
old_eff.cur_mental = math.min(new_eff.max_bonus, old_eff.cur_mental + new_eff.mental)
old_eff.cur_save_bonus = math.min(new_eff.max_bonus, old_eff.cur_save_bonus + new_eff.save_bonus)
-- and apply the current values
old_eff.physid = self:addTemporaryValue("combat_physresist", old_eff.cur_physical)
old_eff.spellid = self:addTemporaryValue("combat_spellresist", old_eff.cur_spell)
old_eff.mentalid = self:addTemporaryValue("combat_mentalresist", old_eff.cur_mental)
old_eff.physid = self:addTemporaryValue("combat_physresist", old_eff.cur_save_bonus)
old_eff.spellid = self:addTemporaryValue("combat_spellresist", old_eff.cur_save_bonus)
old_eff.mentalid = self:addTemporaryValue("combat_mentalresist", old_eff.cur_save_bonus)
old_eff.dur = new_eff.dur
return old_eff
end,
activate = function(self, eff)
-- track the current values
eff.cur_physical = eff.physical
eff.cur_spell = eff.spell
eff.cur_mental = eff.mental
eff.cur_save_bonus = eff.save_bonus
-- apply current values
eff.physid = self:addTemporaryValue("combat_physresist", eff.physical)
eff.spellid = self:addTemporaryValue("combat_spellresist", eff.spell)
eff.mentalid = self:addTemporaryValue("combat_mentalresist", eff.mental)
eff.physid = self:addTemporaryValue("combat_physresist", eff.save_bonus)
eff.spellid = self:addTemporaryValue("combat_spellresist", eff.save_bonus)
eff.mentalid = self:addTemporaryValue("combat_mentalresist", eff.save_bonus)
eff.particle = self:addParticles(Particles.new("arcane_power", 1))
end,
deactivate = function(self, eff)
......
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