diff --git a/game/modules/tome/class/uiset/Minimalist.lua b/game/modules/tome/class/uiset/Minimalist.lua index 55b3f01daad910081e7e28ac3bf36f194c387cc5..e5139b1733dd918db267c853361689079fa00576 100644 --- a/game/modules/tome/class/uiset/Minimalist.lua +++ b/game/modules/tome/class/uiset/Minimalist.lua @@ -1062,7 +1062,7 @@ function _M:displayResources(scale, bx, by, a) dt[1]:toScreenFull(x+(front[6]-dt[6])/2, y+90, dt[6], dt[7], dt[2], dt[3], 1, 1, 1, a) front[1]:toScreenFull(x, y, front[6], front[7], front[2], front[3], 1, 1, 1, a) - self:showResourceTooltip(bx+x*scale, by+y*scale, front[6], front[7], "res:hourglass", game.level.turn_counter_desc) + self:showResourceTooltip(bx+x*scale, by+y*scale, front[6], front[7], "res:hourglass", game.level.turn_counter_desc or "") x, y = self:resourceOrientStep(orient, bx, by, scale, x, y, fshat[6], front[7]) elseif game.mouse:getZone("res:hourglass") then game.mouse:unregisterZone("res:hourglass") end diff --git a/game/modules/tome/data/general/events/noxious-caldera.lua b/game/modules/tome/data/general/events/noxious-caldera.lua new file mode 100644 index 0000000000000000000000000000000000000000..83a300b15db8e6aef61733314823c4c3083c1f43 --- /dev/null +++ b/game/modules/tome/data/general/events/noxious-caldera.lua @@ -0,0 +1,41 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +level.data.on_enter_list.noxious_caldera = function() + if game.level.data.noxious_caldera_added then return end + if game:getPlayer(true).level < 20 then return end + + local spot = game.level:pickSpot{type="world-encounter", subtype="noxious-caldera"} + if not spot then return end + + game.level.data.noxious_caldera_added = true + local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN):cloneFull() + g.__nice_tile_base = nil + g.name = "Way into a volcanic caldera" + g.display='>' g.color_r=255 g.color_g=0 g.color_b=0 g.notice = true + g.change_level=1 g.change_zone="noxious-caldera" g.glow=true + g.add_displays = g.add_displays or {} + g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/caldera.png", z=5} + g.nice_tiler = nil + g:initGlow() + game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y) + print("[WORLDMAP] noxious caldera at", spot.x, spot.y) +end + +return true diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/caldera.png b/game/modules/tome/data/gfx/shockbolt/terrain/caldera.png new file mode 100644 index 0000000000000000000000000000000000000000..90b38061d7ff0036e995192d109eb4ae2fa17f56 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/caldera.png differ diff --git a/game/modules/tome/data/maps/wilderness/eyal.lua b/game/modules/tome/data/maps/wilderness/eyal.lua index d8aba539b67711b2961d0055dd78de5fc0f0069b..dd7720019fd21a4323b5674db35ee144278aa0c0 100644 --- a/game/modules/tome/data/maps/wilderness/eyal.lua +++ b/game/modules/tome/data/maps/wilderness/eyal.lua @@ -448,6 +448,7 @@ addSpot({34, 25}, "world-encounter", "lost-merchant") addSpot({35, 25}, "world-encounter", "lost-merchant") addSpot({36, 25}, "world-encounter", "lost-merchant") addSpot({37, 25}, "world-encounter", "lost-merchant") +addSpot({35, 35}, "world-encounter", "noxious-caldera") -- addZone section addZone({5, 1, 82, 43}, "zonename", "Maj'Eyal") diff --git a/game/modules/tome/data/zones/dreams/zone.lua b/game/modules/tome/data/zones/dreams/zone.lua index c68f17db5594f8b79632e66562fe1fa46a2a117f..6d2196a62d53f1638caae45715f3776d2ead2ebb 100644 --- a/game/modules/tome/data/zones/dreams/zone.lua +++ b/game/modules/tome/data/zones/dreams/zone.lua @@ -53,7 +53,7 @@ return { }, actor = { class = "mod.class.generator.actor.Random", - nb_npc = {40, 40}, + nb_npc = {30, 30}, filter = {type="feline"}, randelite = 0, }, @@ -73,7 +73,7 @@ return { -- Dream of vulnerability if lev == 1 then local f = require("mod.class.Player").new{ - name = "frail mice", image = "npc/vermin_rodent_giant_white_mouse.png", + name = "frail mouse", image = "npc/vermin_rodent_giant_white_mouse.png", type = "vermin", subtype = "rodent", display = "r", color=colors.WHITE, body = { INVEN = 10 }, diff --git a/game/modules/tome/data/zones/noxious-caldera/zone.lua b/game/modules/tome/data/zones/noxious-caldera/zone.lua index 618ccf2596f9f9acfd365a842d54ea20f74afb75..ddffec8810e1f89b27b6bf427992d07a81c997b2 100644 --- a/game/modules/tome/data/zones/noxious-caldera/zone.lua +++ b/game/modules/tome/data/zones/noxious-caldera/zone.lua @@ -87,6 +87,9 @@ return { game.level.turn_counter = game.level.turn_counter - 1 game.player.changed = true if game.level.turn_counter < 0 then + game.level.turn_counter = nil + game.level.max_turn_counter = nil + local dream = rng.range(1, 1) game:changeLevel(dream, "dreams") end diff --git a/game/modules/tome/data/zones/wilderness/events.lua b/game/modules/tome/data/zones/wilderness/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..e594bd3cdc3a3f22362d684d676d00091929ab46 --- /dev/null +++ b/game/modules/tome/data/zones/wilderness/events.lua @@ -0,0 +1,22 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return { one_per_level=true, + {name="noxious-caldera", percent=100}, +} diff --git a/game/modules/tome/data/zones/wilderness/zone.lua b/game/modules/tome/data/zones/wilderness/zone.lua index 7725ccdc8a2c13f2ce4e478af3c5a018c6a784b7..c4cf10ecace89133b24349a5cce24511ed253384 100644 --- a/game/modules/tome/data/zones/wilderness/zone.lua +++ b/game/modules/tome/data/zones/wilderness/zone.lua @@ -84,11 +84,15 @@ return { -- Only run once level.data.post_nicer_tiles = nil end, + on_enter_list = {}, on_enter = function(_, _, newzone) if game.player.level >= 12 and game.player.level <= 20 and not game.player:hasQuest("lightning-overload") then game.player:grantQuest("lightning-overload") elseif game.player:hasQuest("lightning-overload") then game.player:hasQuest("lightning-overload"):on_wilderness() end + for name, f in pairs(game.level.data.on_enter_list) do + f() + end end } diff --git a/tiled-maps/eyal2.tmx b/tiled-maps/eyal2.tmx index d00c5231cc85aa0a4239f27ffc6d05d77029d9fc..8b08beb791965af4a788cdd3b96e6e98c0d74003 100644 --- a/tiled-maps/eyal2.tmx +++ b/tiled-maps/eyal2.tmx @@ -17946,5 +17946,11 @@ <property name="type" value=""world-encounter""/> </properties> </object> + <object name="Noxious Caldera" x="1125" y="1125" width="21" height="20"> + <properties> + <property name="subtype" value=""noxious-caldera""/> + <property name="type" value=""world-encounter""/> + </properties> + </object> </objectgroup> </map>