diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index 11925863490c1509fcf34480fbc288d0fcc2a72c..b3ac8c7f6e655199b9aaf2cfd7313beb85ef1ee6 100644 --- a/game/engines/default/engine/utils.lua +++ b/game/engines/default/engine/utils.lua @@ -363,6 +363,12 @@ function string.a_an(str) else return "a "..str end end +function string.his_her(actor) + if actor.female then return "her" + else return "his" + end +end + function string.capitalize(str) if #str > 1 then return string.upper(str:sub(1, 1))..str:sub(2) diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index 5475c408654613ee78c121baf2a97028a1968822..88e3c4070441fb3e3cf84219eda5a48c9f370538 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -734,11 +734,20 @@ function _M:checkDonation(back_insert) end -- Dont ask often - local last = profile.mod.donations and profile.mod.donations.last_ask or 0 - local min_interval = 15 * 24 * 60 * 60 -- 1 month - if os.time() < last + min_interval then - print("Donation check: too soon") - return + if profile.auth and tonumber(profile.auth.donated) then + local last = profile.mod.donations and profile.mod.donations.last_ask or 0 + local min_interval = 30 * 24 * 60 * 60 -- 1 month + if os.time() < last + min_interval then + print("Donation check: too soon (donator)") + return + end + else + local last = profile.mod.donations and profile.mod.donations.last_ask or 0 + local min_interval = 7 * 24 * 60 * 60 -- 1 week + if os.time() < last + min_interval then + print("Donation check: too soon (player)") + return + end end -- Not as soon as they start playing, wait 15 minutes diff --git a/game/modules/tome/data/talents/chronomancy/paradox.lua b/game/modules/tome/data/talents/chronomancy/paradox.lua index 7dbc07cf6b560e62892b4d64fe2bcf4bcdea1efd..12272cafe17e0b4bd977bd5fea923514fd344776 100644 --- a/game/modules/tome/data/talents/chronomancy/paradox.lua +++ b/game/modules/tome/data/talents/chronomancy/paradox.lua @@ -84,6 +84,13 @@ newTalent{ local target = game.level.map(tx, ty, Map.ACTOR) if not target then return end + + if target == self then + game.logSeen(self, "#LIGHT_STEEL_BLUE#%s tries to remove %sself from existance!", self.name, string.his_her(self)) + self:incParadox(400) + game.level.map:particleEmitter(self.x, self.y, 1, "ball_temporal", {radius=1, tx=self.x, ty=self.y}) + return true + end -- does the spell hit? if not nothing happens if not self:checkHit(self:combatSpellpower(), target:combatSpellResist()) then