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

Fix stores error when no FBO is active

Fix meteor rain
Dreamscape can no longer be cast on friendlies


git-svn-id: http://svn.net-core.org/repos/t-engine4@5509 51575b47-30f0-44d4-a5cc-537603b46e54
parent 78d9d517
No related branches found
No related tags found
No related merge requests found
......@@ -1728,7 +1728,7 @@ newTalent{
game:playSoundNear(game.player, "talents/fireflash")
for i = x-1, x+1 do for j = y-1, y+1 do
local oe = game.level.map(x + i, y + j, Map.TERRAIN)
local oe = game.level.map(i, j, Map.TERRAIN)
if oe and not oe:attr("temporary") and
(core.fov.distance(x, y, i, j) < 1 or rng.percent(40)) and (game.level.map:checkEntity(i, j, engine.Map.TERRAIN, "dig") or game.level.map:checkEntity(i, j, engine.Map.TERRAIN, "grow")) then
local g = terrains.LAVA_FLOOR:clone()
......
......@@ -153,6 +153,10 @@ newTalent{
game.logPlayer(self, "Your target must be sleeping in order to enter it's dreamscape.")
return nil
end
if self:reactionToward(target) >= 0 then
game.logPlayer(self, "You can't cast this on friendly targets.")
return nil
end
game:onTickEnd(function()
if self:attr("dead") then return end
......
......@@ -198,10 +198,8 @@ newTalent{
getTargetCount = function(self, t) return math.floor(self:getTalentLevel(t)) end,
getManaDrain = function(self, t) return -1.5 * self:getTalentLevelRaw(t) end,
do_storm = function(self, t)
if self:getMana() <= 0 then
self:forceUseTalent(t.id, {ignore_energy=true})
return
end
local mana = t.getManaDrain(self, t)
if self:getMana() <= mana + 1 then return end
local tgts = {}
local grids = core.fov.circle_grids(self.x, self.y, 6, true)
......@@ -222,7 +220,7 @@ newTalent{
self:project(tg, a.x, a.y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(t.getDamage(self, t)), 3))
game.level.map:particleEmitter(a.x, a.y, tg.radius, "ball_lightning", {radius=tg.radius, tx=x, ty=y})
game:playSoundNear(self, "talents/lightning")
self:incMana(t.getManaDrain(self, t))
self:incMana(mana)
end
end,
activate = function(self, t)
......
......@@ -53,7 +53,7 @@ floorEffect{
desc = "Font of Life", image = "talents/grand_arrival.png",
long_desc = function(self, eff) return ("The target is near a font of life, granting +%0.2f life regeneration, -%0.2f equilibrium regeneration, +%0.2f stamina regeneration and +%0.2f psi regeneration. Undeads are not affected."):format(eff.power, eff.power, eff.power, eff.power) end,
activate = function(self, eff)
if self:attr("undead") then return end
if self:attr("undead") then eff.power = 0 return end
eff.power = 3 + game.zone:level_adjust_level(game.level, game.zone, "object") / 2
self:effectTemporaryValue(eff, "life_regen", eff.power)
self:effectTemporaryValue(eff, "stamina_regen", eff.power)
......
......@@ -53,7 +53,7 @@ function _M:init(title, store_inven, actor_inven, store_filter, actor_filter, ac
local direct_draw= function(item, x, y, w, h, total_w, total_h, loffset_x, loffset_y, dest_area)
-- if there is object and is withing visible bounds
if item.object and total_h + h > loffset_y and total_h < loffset_y + dest_area.h then
if core.display.FBOActive() and item.object and total_h + h > loffset_y and total_h < loffset_y + dest_area.h then
local clip_y_start, clip_y_end = 0, 0
-- if it started before visible area then compute its top clip
if total_h < loffset_y 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