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

Confusion power is reduced by confusion resistance

git-svn-id: http://svn.net-core.org/repos/t-engine4@3495 51575b47-30f0-44d4-a5cc-537603b46e54
parent fcb27411
No related branches found
No related tags found
No related merge requests found
......@@ -773,8 +773,10 @@ newEffect{
on_gain = function(self, err) return "#Target# wanders around!.", "+Confused" end,
on_lose = function(self, err) return "#Target# seems more focused.", "-Confused" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("confused", eff.power)
eff.dur = self:updateEffectDuration(eff.dur, "confusion")
eff.power = eff.power - (self:attr("confusion_immune") or 0) / 2
eff.tmpid = self:addTemporaryValue("confused", eff.power)
if eff.power <= 0 then eff.dur = 0 end
end,
deactivate = function(self, eff)
self:removeTemporaryValue("confused", eff.tmpid)
......@@ -3385,12 +3387,12 @@ newEffect{
end,
deactivate = function(self, eff)
game:onTickEnd(function()
if game._chronoworlds == nil then
game.logSeen(self, "#LIGHT_RED#The see the threads spell fizzles and cancels, leaving you in this timeline.")
return
end
if eff.thread < 3 then
local worlds = game._chronoworlds
......@@ -3483,12 +3485,12 @@ newEffect{
local t = self:getTalentFromId(self.T_PARADOX_CLONE)
local base = t.getDuration(self, t) - 2
game:onTickEnd(function()
if game._chronoworlds == nil then
game.logSeen(self, "#LIGHT_RED#You've altered your destiny and will not be pulled into the past.")
return
end
local worlds = game._chronoworlds
-- save the players health so we can reload it
local oldplayer = game.player
......
......@@ -118,6 +118,7 @@ elseif zone == "Far East" then
if spot and not game.level.map(spot.x, spot.y, Map.ACTOR) and not game.level.map.seens(spot.x, spot.y) then
print("Spawned sunwall patrol", spot.x, spot.y, e.name)
game.zone:addEntity(game.level, e, "actor", spot.x, spot.y)
wda.cur_patrols = math.max(wda.cur_patrols, 0)
wda.cur_patrols = wda.cur_patrols + 1
e.world_zone = zone
e.on_die = function(self) game.level.data.wda.zones[self.world_zone].cur_patrols = game.level.data.wda.zones[self.world_zone].cur_patrols - 1 end
......@@ -131,6 +132,7 @@ elseif zone == "Far East" then
if spot and not game.level.map(spot.x, spot.y, Map.ACTOR) and not game.level.map.seens(spot.x, spot.y) then
print("Spawned sunwall patrol", spot.x, spot.y, e.name)
game.zone:addEntity(game.level, e, "actor", spot.x, spot.y)
wda.cur_orc_patrols = math.max(wda.cur_orc_patrols, 0)
wda.cur_orc_patrols = wda.cur_orc_patrols + 1
e.world_zone = zone
e.on_die = function(self) game.level.data.wda.zones[self.world_zone].cur_orc_patrols = game.level.data.wda.zones[self.world_zone].cur_orc_patrols - 1 end
......@@ -147,6 +149,7 @@ elseif zone == "Far East" then
print("Spawned hostile", spot.x, spot.y, e.name)
game.zone:addEntity(game.level, e, "actor", spot.x, spot.y)
wda.cur_hostiles = wda.cur_hostiles + 1
wda.cur_hostiles = math.max(wda.cur_hostiles, 0)
e.world_zone = zone
e.on_die = function(self) game.level.data.wda.zones[self.world_zone].cur_hostiles = game.level.data.wda.zones[self.world_zone].cur_hostiles - 1 end
end
......
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