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

cannot die in the ambush of tol falas

killing ukruk is now supported in tol falas ambush


git-svn-id: http://svn.net-core.org/repos/t-engine4@708 51575b47-30f0-44d4-a5cc-537603b46e54
parent 01c95cfe
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,26 @@ newChat{ id="found_staff",
text = [[#LIGHT_GREEN#*He remains silent for a while*#WHITE# Indeed you were right in coming here.
The staff you describe reminds me of some artifact of power of the old ages. Please may I see it?]],
answers = {
{"I am afraid I lost it. #LIGHT_GREEN#*Tell him the encounter with the orcs*", jump="lost_staff"},
{"Here it is. #LIGHT_GREEN#*Tell him the encounter with the orcs* You should keep it, I can feel its power and it would be safer if guarded by the armies of the kingdom.",
jump="given_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") end},
{"I am afraid I lost it. #LIGHT_GREEN#*Tell him the encounter with the orcs*",
jump="lost_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-finish") end},
}
}
newChat{ id="given_staff",
text = [[I am truly astonished by your strength, surviving this encounter is truly an epic feat. Please take this as a token of gratitude for your service.
As for orcs, this is most troubling, we have not seen any for eithy years, could they come from the far east?
Anyway, thanks again @playername@ for your help.]],
answers = {
{"Thank you Sir.", action=function(npc, player)
local o, item, inven_id = player:findInAllInventories("Staff of Absorption")
player:removeObject(inven_id, item, true)
o:removed()
player:setQuestStatus("staff-absorption", engine.Quest.DONE)
world:gainAchievement("A_DANGEROUS_SECRET", player)
end, jump="orc_hunt"},
}
}
......
......@@ -40,3 +40,49 @@ on_grant = function(self, who)
game.logPlayer(who, "#00FFFF#You can feel the power of this staff just by carrying it. This is both ancient and dangerous.")
game.logPlayer(who, "#00FFFF#It should be shown to the wise elders in Minas Tirith!")
end
start_ambush = function(self, who)
game.logPlayer(who, "#VIOLET#As you come out of Tol Falas, you encounter a band of orcs!")
who:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush")
-- Next time the player dies (and he WILL die) he wont really die
who.die = function(self)
self.dead = false
self.die = nil
self.life = 1
for _, e in pairs(game.level.entities) do
if e ~= self then
game.level:removeEntity(e)
e.dead = true
end
end
-- Protect from other hits on the same turn
self:setEffect(self.EFF_BARRIER, 3, {power=1000000})
local o, item, inven_id = who:findInAllInventories("Staff of Absorption")
who:removeObject(inven_id, item, true)
o:removed()
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 Minas Tirith to report those events!")
game.level.map(who.x, who.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
self:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-finish")
end
local Chat = require("engine.Chat")
local chat = Chat.new("tol-falas-ambush", {name="Ukruk the Fierce"}, who)
chat:invoke()
end
killed_ukruk = function(self, who)
game.player.die = nil
game.logPlayer(self, "#VIOLET#You are surprised to still be alive.")
game.logPlayer(self, "#VIOLET#Go at once to Minas Tirith to report those events!")
game.level.map(who.x, who.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
self:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk")
end
......@@ -27,8 +27,8 @@ newEntity{ base="BASE_NPC_ORC", define_as = "UKRUK",
faction = "orc-pride",
color=colors.VIOLET,
desc = [[This ugly orc looks really nasty and vicious. He is obviously looking for something and bears an unkown symbol on his shield.]],
level_range = {50, 50}, exp_worth = 2,
max_life = 15000, life_rating = 15, fixed_rating = true,
level_range = {30, 50}, exp_worth = 2,
max_life = 1500, life_rating = 15, fixed_rating = true,
rank = 4,
size_category = 3,
......@@ -50,4 +50,8 @@ newEntity{ base="BASE_NPC_ORC", define_as = "UKRUK",
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { talent_in=1, },
on_die = function(self, who)
game.player:resolveSource():hasQuest("staff-absorption"):killed_ukruk(game.player:resolveSource())
end,
}
......@@ -49,39 +49,8 @@ return {
},
on_enter = function(lev, old_lev, newzone)
if newzone then
game.logPlayer(game.player, "#VIOLET#As you come out of Tol Falas, you encounter a band of orcs!")
game.player:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush")
-- Next time the player dies (and he WILL die) he wont really die
game.player.die = function(self)
self.dead = false
self.die = nil
self.life = 1
for _, e in pairs(game.level.entities) do
if e ~= self then
game.level:removeEntity(e)
e.dead = true
end
end
local o, item, inven_id = game.player:findInAllInventories("Staff of Absorption")
game.player:removeObject(inven_id, item, true)
o:removed()
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 Minas Tirith to report those events!")
local exit = game.level.map(10, 6, game.level.map.TERRAIN)
exit.change_level = 1
exit.change_zone = "wilderness"
self:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-finish")
end
local Chat = require("engine.Chat")
local chat = Chat.new("tol-falas-ambush", {name="Ukruk the Fierce"}, game.player)
chat:invoke()
if newzone and game.player:hasQuest("staff-absorption") then
game.player:hasQuest("staff-absorption"):start_ambush(game.player)
end
end,
}
......@@ -21,10 +21,10 @@ load("/data/general/objects/objects.lua")
newEntity{ base = "BASE_RING",
define_as = "RING_LOST_LOVE", rarity=false,
name = "Choker of Dread", unique=true,
unided_name = "dark amulet", color=colors.LIGHT_DARK,
desc = [[The evilness of undeath radiates from this amulet.]],
cost = 5000,
name = "Ring of Lost Love", unique=true,
unided_name = "wedding ring", color=colors.LIGHT_BLUE,
desc = [[Letters are engraved in it: "Crichton my love".]],
cost = 500,
wielder = {
see_invisible = 10,
blind_immune = 1,
......
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