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

Casting Cease to Exist on oneself is a bad idea

git-svn-id: http://svn.net-core.org/repos/t-engine4@6234 51575b47-30f0-44d4-a5cc-537603b46e54
parent 32c14f3d
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......
......@@ -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
......
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