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

Paradox failures etc. now have sound effects and more visible combat log entries

Fixed Precognition (hopefully)
Fixed steady mind defense bonus
Reduced duration of dreamscape
Dream prison drain is now based on a percentage of maximum psi


git-svn-id: http://svn.net-core.org/repos/t-engine4@5611 51575b47-30f0-44d4-a5cc-537603b46e54
parent fcee7921
No related branches found
No related tags found
No related merge requests found
......@@ -3378,17 +3378,19 @@ function _M:preUseTalent(ab, silent, fake)
for id, t in pairs(self.talents_def) do
if t.type[1] == "chronomancy/anomalies" then ts[#ts+1] = id end
end
if not silent then game.logPlayer(self, "You lose control and unleash an anomaly!") end
if not silent then game.logPlayer(self, "#LIGHT_RED#You lose control and unleash an anomaly!") end
self:forceUseTalent(rng.table(ts), {ignore_energy=true})
-- Anomalies correct the timeline and reduce Paradox
self:incParadox(- (ab.paradox and (ab.paradox * paradox_scaling) or ab.sustain_paradox) * 2)
game:playSoundNear(self, "talents/distortion")
self:useEnergy()
return false
-- Now check for failure
elseif not self:attr("no_paradox_fail") and self:paradoxFailChance() and not self:hasEffect(self.EFF_SPACETIME_STABILITY) then
if not silent then game.logPlayer(self, "You fail to use %s due to your paradox!", ab.name) end
if not silent then game.logPlayer(self, "#LIGHT_RED#You fail to use %s due to your paradox!", ab.name) end
self:incParadox(ab.paradox and (ab.paradox * paradox_scaling) or ab.sustain_paradox)
self:useEnergy()
game:playSoundNear(self, "talents/dispel")
return false
end
end
......
......@@ -557,6 +557,11 @@ end
function _M:die(src, death_note)
self:runStop("died")
self:restStop("died")
if self:hasEffect(self.EFF_PRECOGNITION) then
self:removeEffect(self.EFF_PRECOGNITION)
return
end
return self:onPartyDeath(src, death_note)
end
......
......@@ -107,7 +107,8 @@ temporal_req5 = {
-- Backfire Function; this does the actual backfire even though the chance is calculated in Actor
checkBackfire = function(self, x, y)
if self:paradoxBackfireChance() and not self:attr("no_paradox_fail") then
game.logPlayer(self, "The fabric of spacetime ripples and your spell backfires!!")
game.logPlayer(self, "#LIGHT_RED#The fabric of spacetime ripples and your spell backfires!!")
game:playSoundNear(self, "talents/echo")
return self.x, self.y
else
return x, y
......
......@@ -206,12 +206,13 @@ newTalent{
return {type="ball", radius=self:getTalentRange(t), range=0}
end,
direct_hit = true,
getDrain = function(self, t) return 10 - math.min(8, math.ceil(self:getTalentLevel(t))) end,
getDrain = function(self, t) return 5 - math.min(4, self:getTalentLevel(t)/2) end,
remove_on_zero = true,
activate = function(self, t)
game:playSoundNear(self, "talents/spell_generic")
local drain = self:getMaxPsi() * t.getDrain(self, t) / 100
local ret = {
drain = self:addTemporaryValue("psi_regen", -t.getDrain(self, t)),
drain = self:addTemporaryValue("psi_regen", -drain),
}
return ret
end,
......@@ -222,7 +223,7 @@ newTalent{
info = function(self, t)
local drain = t.getDrain(self, t)
return ([[Imprisons all sleeping targets within range in their dream state, effectively extending sleeping effects for as long as Dream Prison is maintainted.
This powerful effect constantly drains %d Psi per turn and is considered a psionic channel as such it will break if you move, use a talent that consumes a turn, or activate an item.
This powerful effect constantly drains %0.2f%% of your maximum Psi per turn and is considered a psionic channel as such it will break if you move, use a talent that consumes a turn, or activate an item.
(Note that sleeping effects that happen each turn, such as Nightmare's damage and Sleep's contagion, will cease to function for the duration of the effect.)]]):format(drain)
end,
}
\ No newline at end of file
......@@ -122,7 +122,7 @@ newTalent{
requires_target = true,
range = function(self, t) return 5 + math.min(5, self:getTalentLevelRaw(t)) end,
target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end,
getDuration = function(self, t) return 10 + math.ceil(self:getTalentLevel(t) * 4) end,
getDuration = function(self, t) return 4 + math.ceil(self:getTalentLevel(t) * 2) end,
getPower = function(self, t) return self:combatTalentMindDamage(t, 10, 100) end,
on_pre_use = function(self, t, silent) if self:attr("is_psychic_projection") then if not silent then game.logPlayer(self, "You feel it unwise to travel to the dreamscape in such a fragile form.") end return false end return true end,
action = function(self, t)
......@@ -228,8 +228,9 @@ newTalent{
info = function(self, t)
local duration = t.getDuration(self, t)
local power = t.getPower(self, t)
return([[Enter a sleeping target's dreams for %d turns. While in the dreamscape you'll encounter the target's invulnerable sleeping form as well as dream projections that it will spawn every three turns to defend it's mind. When the dreamscape ends the target's life will be reduced by 10%% and it will to be brainlocked for one turn for each projection destroyed.
Lucid dreamers will spawn projections every two turns instead of every three and their projections will deal more damage (generally projections have a 50%% penalty to all damage).
return([[Enter a sleeping target's dreams for %d turns. While in the dreamscape you'll encounter the target's invulnerable sleeping form as well as dream projections that it will spawn every other turn to defend it's mind.
Projections inflict 50%% less damage then the original, unless the target has Lucid Dreamer active.
When the dreamscape ends the target's life will be reduced by 10%% and it will to be brainlocked for one turn for each projection destroyed.
In the dreamscape your damage will be improved by %d%%.
The damage bonus will improve with your mindpower.]]):format(duration, power)
end,
......
......@@ -60,7 +60,7 @@ newTalent{
mode = "passive",
points = 5,
require = techs_cun_req2,
getDefense = function(self, t) return self:combatTalentStatDamage(t, "cun", 5, 35) end,
getDefense = function(self, t) return self:combatTalentStatDamage(t, "dex", 5, 35) end,
getMental = function(self, t) return self:combatTalentStatDamage(t, "cun", 5, 35) end,
info = function(self, t)
local defense = t.getDefense(self, t)
......
......@@ -1602,10 +1602,7 @@ newEffect{
-- Dreamscape doesn't cooldown in the dreamscape
self.talents_cd[self.T_DREAMSCAPE] = self.talents_cd[self.T_DREAMSCAPE] + 1
-- Spawn every three turns, or every two for lucid dreamers
local spawn_time = 3
if eff.target:attr("lucid_dreamer") then
spawn_time = 2
end
local spawn_time = 2
if eff.dur%spawn_time == 0 then
local x, y = util.findFreeGrid(eff.target.x, eff.target.y, 1, true, {[Map.ACTOR]=true})
if not x then
......
......@@ -203,9 +203,6 @@ function _M:use(item)
self:resurrectBasic(self.actor)
self:restoreResources(self.actor)
self.actor:check("on_resurrect", "cheat")
elseif act == "precognition" then
self:resurrectBasic(self.actor)
self.actor:removeEffect(self.actor.EFF_PRECOGNITION)
elseif act == "blood_life" then
self.actor.blood_life = false
game.logPlayer(self.actor, "#LIGHT_RED#The Blood of Life rushes through your dead body. You come back to life!")
......@@ -267,11 +264,6 @@ function _M:generateList()
if config.settings.cheat then list[#list+1] = {name="Resurrect by cheating", action="cheat"} end
if not self.actor.no_resurrect and allow_res then
if self.actor:hasEffect(self.actor.EFF_PRECOGNITION) then
self:use{action="precognition"}
self.dont_show = true
return
end
if self.actor:isTalentActive(self.actor.T_LICHFORM) then
self:use{action="lichform"}
self.dont_show = true
......
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