From 4398f10c0cb15cd8b5477acf895123192806dab9 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sat, 24 Mar 2012 01:02:01 +0000 Subject: [PATCH] Quests that add a location to the map now reveal the location on the map git-svn-id: http://svn.net-core.org/repos/t-engine4@4988 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/GameState.lua | 9 +++++++++ game/modules/tome/data/chats/alchemist-last-hope.lua | 1 + game/modules/tome/data/quests/east-portal.lua | 1 + game/modules/tome/data/quests/lightning-overload.lua | 1 + game/modules/tome/data/quests/mage-apprentice.lua | 3 +++ game/modules/tome/data/quests/master-jeweler.lua | 1 + game/modules/tome/data/quests/orc-hunt.lua | 1 + game/modules/tome/data/quests/orc-pride.lua | 4 ++++ game/modules/tome/data/quests/spydric-infestation.lua | 1 + game/modules/tome/data/quests/west-portal.lua | 1 + 10 files changed, 23 insertions(+) diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index c82e020be9..f30623ce70 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -1620,3 +1620,12 @@ function _M:debugRandomZone() end end end + +function _M:locationRevealAround(x, y) + game.level.map.lites(x, y, true) + game.level.map.remembers(x, y, true) + for _, c in pairs(util.adjacentCoords(x, y)) do + game.level.map.lites(x+c[1], y+c[2], true) + game.level.map.remembers(x+c[1], y+c[2], true) + end +end diff --git a/game/modules/tome/data/chats/alchemist-last-hope.lua b/game/modules/tome/data/chats/alchemist-last-hope.lua index 6e7ae6c2ec..95184f0ff4 100644 --- a/game/modules/tome/data/chats/alchemist-last-hope.lua +++ b/game/modules/tome/data/chats/alchemist-last-hope.lua @@ -552,6 +552,7 @@ It's strange what death can do to people, how it can take over their minds. Some local spot = level:pickSpot{type="zone-pop", subtype="last-hope-graveyard"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) game.log("He points the location of the graveyard on your map.") player:grantQuest("grave-necromancer") diff --git a/game/modules/tome/data/quests/east-portal.lua b/game/modules/tome/data/quests/east-portal.lua index e10aa18e72..7cbf3f3be4 100644 --- a/game/modules/tome/data/quests/east-portal.lua +++ b/game/modules/tome/data/quests/east-portal.lua @@ -116,6 +116,7 @@ open_telmur = function(self, player) local spot = level:pickSpot{type="zone-pop", subtype="telmur"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) game.logPlayer(game.player, "Tannen points to the location of Telmur on your map.") diff --git a/game/modules/tome/data/quests/lightning-overload.lua b/game/modules/tome/data/quests/lightning-overload.lua index 40648f3609..8930df964b 100644 --- a/game/modules/tome/data/quests/lightning-overload.lua +++ b/game/modules/tome/data/quests/lightning-overload.lua @@ -96,6 +96,7 @@ create_entrance = function(self) local spot = level:pickSpot{type="zone-pop", subtype="tempest-peak"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) game.player:setQuestStatus(self.id, engine.Quest.COMPLETED, "tempest-entrance") end diff --git a/game/modules/tome/data/quests/mage-apprentice.lua b/game/modules/tome/data/quests/mage-apprentice.lua index 7b1ee6be36..65841a301f 100644 --- a/game/modules/tome/data/quests/mage-apprentice.lua +++ b/game/modules/tome/data/quests/mage-apprentice.lua @@ -86,8 +86,11 @@ access_angolwen = function(self, player) local spot = level:pickSpot{type="zone-pop", subtype="angolwen"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) spot = level:pickSpot{type="zone-pop", subtype="angolwen-portal"} game.zone:addEntity(level, p, "terrain", spot.x, spot.y) + game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) game:setAllowedBuild("mage", true) world:gainAchievement("THE_SECRET_CITY", player) diff --git a/game/modules/tome/data/quests/master-jeweler.lua b/game/modules/tome/data/quests/master-jeweler.lua index b582312afc..c00001d750 100644 --- a/game/modules/tome/data/quests/master-jeweler.lua +++ b/game/modules/tome/data/quests/master-jeweler.lua @@ -60,6 +60,7 @@ start_search = function(self, who) local spot = level:pickSpot{type="zone-pop", subtype="valley-moon-caverns"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) who:setQuestStatus(self.id, engine.Quest.COMPLETED, "search-valley") diff --git a/game/modules/tome/data/quests/orc-hunt.lua b/game/modules/tome/data/quests/orc-hunt.lua index c3c82d862e..1a2cbcdcd3 100644 --- a/game/modules/tome/data/quests/orc-hunt.lua +++ b/game/modules/tome/data/quests/orc-hunt.lua @@ -34,6 +34,7 @@ on_grant = function(self, who) local spot = level:pickSpot{type="zone-pop", subtype="reknor"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) game.logPlayer(game.player, "The elder points to Reknor on your map, to the north on the western side of the Iron Throne.") end diff --git a/game/modules/tome/data/quests/orc-pride.lua b/game/modules/tome/data/quests/orc-pride.lua index d491619103..a4bff8bdd8 100644 --- a/game/modules/tome/data/quests/orc-pride.lua +++ b/game/modules/tome/data/quests/orc-pride.lua @@ -65,21 +65,25 @@ on_grant = function(self, who) local spot = level:pickSpot{type="zone-pop", subtype="rak-shor-pride"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) g = game.zone:makeEntityByName(level, "terrain", "VOR_PRIDE") local spot = level:pickSpot{type="zone-pop", subtype="vor-pride"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) g = game.zone:makeEntityByName(level, "terrain", "GORBAT_PRIDE") local spot = level:pickSpot{type="zone-pop", subtype="gorbat-pride"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) g = game.zone:makeEntityByName(level, "terrain", "GRUSHNAK_PRIDE") local spot = level:pickSpot{type="zone-pop", subtype="grushnak-pride"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) end diff --git a/game/modules/tome/data/quests/spydric-infestation.lua b/game/modules/tome/data/quests/spydric-infestation.lua index fa2648a75b..1bb3c7d97d 100644 --- a/game/modules/tome/data/quests/spydric-infestation.lua +++ b/game/modules/tome/data/quests/spydric-infestation.lua @@ -37,6 +37,7 @@ on_grant = function(self, who) local spot = level:pickSpot{type="zone-pop", subtype="ardhungol"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) game.logPlayer(game.player, "She marks the location of Ardhungol on your map.") end diff --git a/game/modules/tome/data/quests/west-portal.lua b/game/modules/tome/data/quests/west-portal.lua index 6300b4f4d7..bf1417b580 100644 --- a/game/modules/tome/data/quests/west-portal.lua +++ b/game/modules/tome/data/quests/west-portal.lua @@ -48,6 +48,7 @@ on_grant = function(self, who) local spot = level:pickSpot{type="zone-pop", subtype="vor-armoury"} game.zone:addEntity(level, g, "terrain", spot.x, spot.y) game.nicer_tiles:updateAround(game.level, spot.x, spot.y) + game.state:locationRevealAround(spot.x, spot.y) end) game.logPlayer(game.player, "Zemekkys points to the location of Vor Armoury on your map.") -- GitLab