From 249432ff36867d44e4d99ee9e9eb595a122e7562 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sun, 23 Sep 2012 14:02:08 +0000 Subject: [PATCH] Heroism infusions now let you survive at negative HP git-svn-id: http://svn.net-core.org/repos/t-engine4@5705 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/general/objects/scrolls.lua | 1 + game/modules/tome/data/talents/misc/inscriptions.lua | 7 ++++--- game/modules/tome/data/timed_effects/physical.lua | 6 ++---- ideas/todo | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/game/modules/tome/data/general/objects/scrolls.lua b/game/modules/tome/data/general/objects/scrolls.lua index eb9cf25834..b3db8cf065 100644 --- a/game/modules/tome/data/general/objects/scrolls.lua +++ b/game/modules/tome/data/general/objects/scrolls.lua @@ -229,6 +229,7 @@ newEntity{ base = "BASE_INFUSION", cooldown = resolvers.rngrange(20, 30), dur = resolvers.mbonus_level(7, 7), power = resolvers.mbonus_level(4, 4, function(e, v) return v * 3 end), + die_at = resolvers.mbonus_level(700, 100, function(e, v) return v * 1 end), use_stat_mod = 0.14, }, inscription_talent = "INFUSION:_HEROISM", diff --git a/game/modules/tome/data/talents/misc/inscriptions.lua b/game/modules/tome/data/talents/misc/inscriptions.lua index 84904c7f9f..6953dd0ff5 100644 --- a/game/modules/tome/data/talents/misc/inscriptions.lua +++ b/game/modules/tome/data/talents/misc/inscriptions.lua @@ -246,17 +246,18 @@ newInscription{ tactical = { BUFF = 2 }, action = function(self, t) local data = self:getInscriptionData(t.short_name) - self:setEffect(self.EFF_HEROISM, data.dur, {power=data.power + data.inc_stat}) + self:setEffect(self.EFF_HEROISM, data.dur, {power=data.power + data.inc_stat, die_at=data.die_at + data.inc_stat * 30}) return true end, info = function(self, t) local data = self:getInscriptionData(t.short_name) return ([[Activate the infusion to increase three of your primary stats by %d for %d turns. - It will always increase your three highest stats.]]):format(data.power + data.inc_stat, data.dur) + Also while Heroism is active you will only die when reaching -%d life. However, when below 0 you cannot see how much life you have left and you will die if you did not heal before the effect ends. + It will always increase your three highest stats.]]):format(data.power + data.inc_stat, data.dur, data.die_at + data.inc_stat * 30) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[+%d for %d turns]]):format(data.power + data.inc_stat, data.dur) + return ([[+%d for %d turns, die at -%d]]):format(data.power + data.inc_stat, data.dur, data.die_at + data.inc_stat * 30) end, } diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index 0d8c3881c2..eddd883af7 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -730,10 +730,8 @@ newEffect{ table.sort(l, function(a,b) return a[2] > b[2] end) local inc = {} for i = 1, 3 do inc[l[i][1]] = eff.power end - eff.stat = self:addTemporaryValue("inc_stats", inc) - end, - deactivate = function(self, eff) - self:removeTemporaryValue("inc_stats", eff.stat) + self:effectTemporaryValue(eff, "inc_stats", inc) + self:effectTemporaryValue(eff, "die_at", -eff.die_at) end, } diff --git a/ideas/todo b/ideas/todo index ac0a5694d8..0cb56a7a9b 100644 --- a/ideas/todo +++ b/ideas/todo @@ -1,6 +1,7 @@ * RSS feed of events in a character's life, exportable to FB * auto-leveling for beginners/lazy * better login screen in boot module +* chest : pop either mobs or items ? after v1: * donator's fight club -- GitLab