diff --git a/game/engines/default/engine/Target.lua b/game/engines/default/engine/Target.lua index 8559b32b23e74815df61760ddaaf7e544307b4a6..e0f2ae2c937547e8ff2b1cbd67672e4a82a02eaa 100644 --- a/game/engines/default/engine/Target.lua +++ b/game/engines/default/engine/Target.lua @@ -82,7 +82,7 @@ function _M:display(dispx, dispy) if self.target_type.block_path then block, hit, hit_radius = self.target_type:block_path(lx, ly) end - + -- Update coordinates and set color if hit and not stopped then stop_x, stop_y = lx, ly @@ -106,7 +106,7 @@ function _M:display(dispx, dispy) s = self.sr stopped = true end - + lx, ly = l() end self.cursor:toScreen(self.display_x + (self.target.x - game.level.map.mx) * self.tile_w * Map.zoom, self.display_y + (self.target.y - game.level.map.my) * self.tile_h * Map.zoom, self.tile_w * Map.zoom, self.tile_h * Map.zoom) @@ -202,7 +202,6 @@ function _M:getType(t) end } - table.update(t, target_type) -- And now modify for the default types if t.type then if t.type:find("ball") then @@ -211,6 +210,7 @@ function _M:getType(t) if t.type:find("cone") then target_type.cone = t.radius target_type.cone_angle = t.cone_angle or 55 + target_type.selffire = false end if t.type:find("bolt") then target_type.stop_block = true diff --git a/game/modules/tome/data/zones/shertul-fortress/objects.lua b/game/modules/tome/data/zones/shertul-fortress/objects.lua index b730fcb6100f6e0f5451fb8ecd673832f7251f73..9fba0ea0a685fe0b2030b1d403a8bfbaff5c74d6 100644 --- a/game/modules/tome/data/zones/shertul-fortress/objects.lua +++ b/game/modules/tome/data/zones/shertul-fortress/objects.lua @@ -35,10 +35,12 @@ When activated it will prompt to destroy items on the floor, if there are none i max_power = 1000, power_regen = 1, use_power = { name = "open a portal to send items to the Fortress core, extracting energies from it for the Fortress and sending back useless gold.", power = 0, use = function(self, who) + local pricemod = function(o) if o.type == "gem" then return 0.40 else return 0.15 end end + -- On the floor or inventory if game.level.map:getObjectTotal(who.x, who.y) > 0 then local d = require("engine.dialogs.ShowPickupFloor").new("Transmogrify", who.x, who.y, function(o) if o:getPrice() <= 0 or o.quest then return false end return true end, function(o, idx) - local price = o:getPrice() * o:getNumber() + local price = o:getPrice() * o:getNumber() * pricemod(o) price = math.min(price, 25) game.level.map:removeObject(who.x, who.y, idx) who:incMoney(price) @@ -48,7 +50,7 @@ When activated it will prompt to destroy items on the floor, if there are none i game:registerDialog(d) else local d = require("engine.dialogs.ShowInventory").new("Transmogrify", who:getInven("INVEN"), function(o) if o:getPrice() <= 0 or o.quest then return false end return true end, function(o, idx) - local price = o:getPrice() * o:getNumber() + local price = o:getPrice() * o:getNumber() * pricemod(o) price = math.min(price, 25) who:removeObject(who:getInven("INVEN"), idx, true) who:sortInven()