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

Zigur will not offer the antimagic quest when it is already done

Refusing antimagic quest will not prevent changing your mind later
New icon


git-svn-id: http://svn.net-core.org/repos/t-engine4@2682 51575b47-30f0-44d4-a5cc-537603b46e54
parent f34e06cb
No related branches found
No related tags found
No related merge requests found
game/engines/default/data/gfx/te4-icon.png

2.78 KiB | W: | H:

game/engines/default/data/gfx/te4-icon.png

6.81 KiB | W: | H:

game/engines/default/data/gfx/te4-icon.png
game/engines/default/data/gfx/te4-icon.png
game/engines/default/data/gfx/te4-icon.png
game/engines/default/data/gfx/te4-icon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -561,7 +561,7 @@ function _M:changeLevel(lev, zone, keep_old_lev, force_down)
if feeling then game.log("#TEAL#%s", feeling) end
-- Autosave
if config.settings.tome.autosave and left_zone and left_zone.short_name ~= "wilderness" and left_zone.short_name ~= self.zone.short_name then self:saveGame() end
if config.settings.tome.autosave and ((left_zone and left_zone.short_name ~= "wilderness") or self.zone.save_per_level) and left_zone.short_name ~= self.zone.short_name then self:saveGame() end
self.player:onEnterLevelEnd(self.zone, self.level)
end
......@@ -844,7 +844,7 @@ function _M:setupCommands()
MOVE_LEFT_DOWN = function() self.player:moveDir(1) end,
MOVE_RIGHT_UP = function() self.player:moveDir(9) end,
MOVE_RIGHT_DOWN = function() self.player:moveDir(3) end,
MOVE_STAY = function() if self.player:enoughEnergy() then self.player:useEnergy() end end,
MOVE_STAY = function() if self.player:enoughEnergy() then self.player:describeFloor(self.player.x, self.player.y) self.player:useEnergy() end end,
RUN_LEFT = function() self.player:runInit(4) end,
RUN_RIGHT = function() self.player:runInit(6) end,
......
......@@ -158,35 +158,35 @@ function _M:onWorldEncounter(target)
end
end
function _M:describeFloor(x, y)
-- Autopickup money
if self:getInven(self.INVEN_INVEN) then
local i, nb = 1, 0
local obj = game.level.map:getObject(x, y, i)
while obj do
if obj.auto_pickup then
self:pickupFloor(i, true)
else
if self:attr("auto_id") and obj:getPowerRank() <= self.auto_id then obj:identify(true) end
nb = nb + 1
i = i + 1
game.logSeen(self, "There is an item here: %s", obj:getName{do_color=true})
end
obj = game.level.map:getObject(x, y, i)
end
end
local g = game.level.map(x, y, game.level.map.TERRAIN)
if g and g.change_level then game.logPlayer(self, "#YELLOW_GREEN#There is "..g.name:a_an().." here (press '<', '>' or right click to use).") end
end
function _M:move(x, y, force)
local moved = mod.class.Actor.move(self, x, y, force)
if moved then
game.level.map:moveViewSurround(self.x, self.y, 8, 8)
game.level.map.attrs(self.x, self.y, "walked", true)
-- Autopickup money
if self:getInven(self.INVEN_INVEN) then
local i, nb = 1, 0
local obj = game.level.map:getObject(self.x, self.y, i)
while obj do
if obj.auto_pickup then
self:pickupFloor(i, true)
else
if self:attr("auto_id") and obj:getPowerRank() <= self.auto_id then obj:identify(true) end
nb = nb + 1
i = i + 1
end
obj = game.level.map:getObject(self.x, self.y, i)
end
if nb >= 2 then
game.logSeen(self, "There is more than one object lying here.")
elseif nb == 1 then
game.logSeen(self, "There is an item here: %s", game.level.map:getObject(self.x, self.y, 1):getName{do_color=true})
end
end
local g = game.level.map(self.x, self.y, game.level.map.TERRAIN)
if g and g.change_level then game.logPlayer(self, "#YELLOW_GREEN#There is "..g.name:a_an().." here (press '<', '>' or right click to use).") end
self:describeFloor(self.x, self.y)
end
-- Update wilderness coords
......
......@@ -17,6 +17,16 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
if game.player:isQuestStatus("antimagic", engine.Quest.DONE) then
newChat{ id="welcome",
text = [[Well met friend.]],
answers = {
{"Farewell."},
}
}
return "welcome"
end
local sex = game.player.female and "Sister" or "Brother"
local remove_magic = function(npc, player)
......@@ -58,7 +68,7 @@ You will be challenged against magical foes. Should you defeat them, we will tea
newChat{ id="ko",
text = [[Very well. I will say that this is disappointing, but it is your choice. Farewell.]],
answers = {
{"Farewell.", action=function(npc, player) player:grantQuest("antimagic") player:setQuestStatus("antimagic", engine.Quest.FAILED) end},
{"Farewell."},
}
}
......
......@@ -99,7 +99,7 @@ for i = 1, 8 do newEntity{ base = "CRYSTAL_FLOOR", define_as = "CRYSTAL_FLOOR"..
newEntity{
define_as = "CRYSTAL_LADDER_DOWN",
type = "floor", subtype = "underground",
name = "ladder to the next level", image = "terrain/crystal_floor1.png", add_displays = {class.new{image="terrain/ladder_down.png"}},
name = "ladder to the next level", image = "terrain/crystal_floor1.png", add_displays = {class.new{image="terrain/crystal_ladder_down.png"}},
display = '>', color_r=255, color_g=255, color_b=0,
notice = true,
always_remember = true,
......@@ -108,7 +108,7 @@ newEntity{
newEntity{
define_as = "CRYSTAL_LADDER_UP",
type = "floor", subtype = "underground",
name = "ladder to the previous level", image = "terrain/crystal_floor1.png", add_displays = {class.new{image="terrain/ladder_up.png"}},
name = "ladder to the previous level", image = "terrain/crystal_floor1.png", add_displays = {class.new{image="terrain/crystal_ladder_up.png"}},
display = '<', color_r=255, color_g=255, color_b=0,
notice = true,
always_remember = true,
......@@ -118,7 +118,7 @@ newEntity{
newEntity{
define_as = "CRYSTAL_LADDER_UP_WILDERNESS",
type = "floor", subtype = "underground",
name = "ladder to worldmap", image = "terrain/crystal_floor1.png", add_displays = {class.new{image="terrain/ladder_up_wild.png"}},
name = "ladder to worldmap", image = "terrain/crystal_floor1.png", add_displays = {class.new{image="terrain/crystal_ladder_up.png"}},
display = '<', color_r=255, color_g=255, color_b=0,
notice = true,
change_level = 1,
......
......@@ -83,7 +83,7 @@ start_ambush = function(self, who)
game.logPlayer(self, "#VIOLET#You wake up after a few hours, surprised to be alive, but the staff is gone!")
game.logPlayer(self, "#VIOLET#Go at once to Last Hope to report those events!")
game.level.map(self.x, self.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
game.level.map(self.x, self.y, game.level.map.TERRAIN, game.zone.grid_list.GRASS_UP_WILDERNESS)
self:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-finish")
end
......@@ -99,7 +99,7 @@ killed_ukruk = function(self, who)
game.logPlayer(self, "#VIOLET#You are surprised to still be alive.")
game.logPlayer(self, "#VIOLET#Go at once to Last Hope to report those events!")
game.level.map(who.x, who.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
game.level.map(who.x, who.y, game.level.map.TERRAIN, game.zone.grid_list.GRASS_UP_WILDERNESS)
who:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk")
end
No preview for this file type
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