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

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@1677 51575b47-30f0-44d4-a5cc-537603b46e54
parent daef8dbe
No related branches found
No related tags found
No related merge requests found
...@@ -28,9 +28,9 @@ Good day to you, fellow traveler!]], ...@@ -28,9 +28,9 @@ Good day to you, fellow traveler!]],
action=function(npc, player, dialog) player:hasQuest("mage-apprentice"):collect_staff(npc, player, dialog) end action=function(npc, player, dialog) player:hasQuest("mage-apprentice"):collect_staff(npc, player, dialog) end
}, },
{"I found this staff; it looks powerful. Maybe it would be enough?", {"I found this staff; it looks powerful. Maybe it would be enough?",
jump="angmar_fall", jump="kor_fall",
cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):can_offer_angmar(player) end, cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):can_offer_kor(player) end,
action=function(npc, player, dialog) player:hasQuest("mage-apprentice"):collect_staff_angmar(player, dialog) end action=function(npc, player, dialog) player:hasQuest("mage-apprentice"):collect_staff_kor(player, dialog) end
}, },
-- Reward for non-mages: access to Angolwen -- Reward for non-mages: access to Angolwen
{"So you have enough magical items now?", {"So you have enough magical items now?",
...@@ -80,7 +80,7 @@ In any case, I must collect 15 magic staves, rings or amulets and I have yet to ...@@ -80,7 +80,7 @@ In any case, I must collect 15 magic staves, rings or amulets and I have yet to
} }
} }
newChat{ id="angmar_fall", newChat{ id="kor_fall",
text = [[Let me examine it. text = [[Let me examine it.
Oh yes, my friend, this is indeed a powerful staff! I think that it alone should suffice to complete my quest! Many thanks!]], Oh yes, my friend, this is indeed a powerful staff! I think that it alone should suffice to complete my quest! Many thanks!]],
answers = { answers = {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
defineTile('.', "FLOOR") defineTile('.', "FLOOR")
defineTile('#', "WALL") defineTile('#', "WALL")
defineTile('+', "DOOR") defineTile('+', "DOOR")
defineTile('s', "FLOOR", nil, "SHADE_OF_ANGMAR") defineTile('s', "FLOOR", nil, "SHADE")
subGenerator{ subGenerator{
x = 0, y = 0, w = 50, h = 43, x = 0, y = 0, w = 50, h = 43,
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
collect_staff = function(self, npc, who, dialog) collect_staff = function(self, npc, who, dialog)
who:showEquipInven("Offer which item?", who:showEquipInven("Offer which item?",
function(o) return (o.type == "weapon" and o.subtype == "staff" and (not o.define_as or o.define_as ~= "STAFF_ANGMAR")) or (o.type == "jewelry" and o.subtype == "ring") or (o.type == "jewelry" and o.subtype == "amulet") end, function(o) return (o.type == "weapon" and o.subtype == "staff" and (not o.define_as or o.define_as ~= "STAFF_KOR")) or (o.type == "jewelry" and o.subtype == "ring") or (o.type == "jewelry" and o.subtype == "amulet") end,
function(o, inven, item) function(o, inven, item)
-- Special handling for the staff of absorption -- Special handling for the staff of absorption
if o.define_as and o.define_as == "STAFF_ABSORPTION" then if o.define_as and o.define_as == "STAFF_ABSORPTION" then
...@@ -70,14 +70,14 @@ can_offer = function(self, who) ...@@ -70,14 +70,14 @@ can_offer = function(self, who)
for inven_id, inven in pairs(who.inven) do for inven_id, inven in pairs(who.inven) do
for item, o in ipairs(inven) do for item, o in ipairs(inven) do
if (o.type == "weapon" and o.subtype == "staff" and (not o.define_as or o.define_as ~= "STAFF_ANGMAR")) or (o.type == "jewelry" and o.subtype == "ring") or (o.type == "jewelry" and o.subtype == "amulet") then return true end if (o.type == "weapon" and o.subtype == "staff" and (not o.define_as or o.define_as ~= "STAFF_KOR")) or (o.type == "jewelry" and o.subtype == "ring") or (o.type == "jewelry" and o.subtype == "amulet") then return true end
end end
end end
end end
collect_staff_angmar = function(self, who, dialog) collect_staff_kor = function(self, who, dialog)
who:showEquipInven("Offer which item?", who:showEquipInven("Offer which item?",
function(o) return o.type == "weapon" and o.subtype == "staff" and o.define_as == "STAFF_ANGMAR" end, function(o) return o.type == "weapon" and o.subtype == "staff" and o.define_as == "STAFF_KOR" end,
function(o, inven, item) function(o, inven, item)
self.nb_collect = self.nb_collect + 15 self.nb_collect = self.nb_collect + 15
if self.nb_collect >= 15 then who:setQuestStatus(self, self.COMPLETED) end if self.nb_collect >= 15 then who:setQuestStatus(self, self.COMPLETED) end
...@@ -90,14 +90,14 @@ collect_staff_angmar = function(self, who, dialog) ...@@ -90,14 +90,14 @@ collect_staff_angmar = function(self, who, dialog)
) )
end end
can_offer_angmar = function(self, who) can_offer_kor = function(self, who)
if self.nb_collect >= 15 then return end if self.nb_collect >= 15 then return end
-- Only works after mages are unlocked -- Only works after mages are unlocked
-- if not profile.mod.allow_build.mage then return end -- if not profile.mod.allow_build.mage then return end
for inven_id, inven in pairs(who.inven) do for inven_id, inven in pairs(who.inven) do
for item, o in ipairs(inven) do for item, o in ipairs(inven) do
if o.type == "weapon" and o.subtype == "staff" and o.define_as == "STAFF_ANGMAR" then return true end if o.type == "weapon" and o.subtype == "staff" and o.define_as == "STAFF_KOR" then return true end
end end
end end
end end
......
...@@ -18,23 +18,3 @@ ...@@ -18,23 +18,3 @@
-- darkgod@te4.org -- darkgod@te4.org
load("/data/general/objects/objects-far-east.lua") load("/data/general/objects/objects-far-east.lua")
-- Artifact, droped (and used!) by the Shade of Angmar
newEntity{ base = "BASE_STAFF",
define_as = "STAFF_ANGMAR", rarity=false,
name = "Angmar's Fall", unique=true,
desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]],
require = { stat = { mag=25 }, },
cost = 5,
combat = {
dam = 10,
apr = 0,
physcrit = 1.5,
dammod = {mag=1.1},
},
wielder = {
see_invisible = 2,
combat_spellpower = 15,
combat_spellcrit = 8,
},
}
...@@ -47,7 +47,6 @@ return { ...@@ -47,7 +47,6 @@ return {
class = "engine.generator.actor.Random", class = "engine.generator.actor.Random",
-- nb_npc = {20*5, 20*5}, -- nb_npc = {20*5, 20*5},
nb_npc = {0, 0}, nb_npc = {0, 0},
-- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map
}, },
object = { object = {
class = "engine.generator.object.Random", class = "engine.generator.object.Random",
......
...@@ -28,9 +28,9 @@ load("/data/general/npcs/all.lua", rarity(4, 35)) ...@@ -28,9 +28,9 @@ load("/data/general/npcs/all.lua", rarity(4, 35))
local Talents = require("engine.interface.ActorTalents") local Talents = require("engine.interface.ActorTalents")
-- The boss of Amon Sul, no "rarity" field means it will not be randomly generated -- The boss of Amon Sul, no "rarity" field means it will not be randomly generated
newEntity{ define_as = "SHADE_OF_ANGMAR", newEntity{ define_as = "SHADE",
type = "undead", subtype = "skeleton", unique = true, type = "undead", subtype = "skeleton", unique = true,
name = "The Shade of Angmar", name = "The Shade",
display = "s", color=colors.VIOLET, display = "s", color=colors.VIOLET,
shader = "unique_glow", shader = "unique_glow",
desc = [[This skeleton looks nasty. There is red flames in its empty eye sockets. It wield a nasty sword and towers toward you, throwing spells.]], desc = [[This skeleton looks nasty. There is red flames in its empty eye sockets. It wield a nasty sword and towers toward you, throwing spells.]],
...@@ -48,7 +48,7 @@ newEntity{ define_as = "SHADE_OF_ANGMAR", ...@@ -48,7 +48,7 @@ newEntity{ define_as = "SHADE_OF_ANGMAR",
move_others=true, move_others=true,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
equipment = resolvers.equip{ {type="weapon", subtype="staff", defined="STAFF_ANGMAR", autoreq=true}, {type="armor", subtype="light", autoreq=true}, }, equipment = resolvers.equip{ {type="weapon", subtype="staff", defined="STAFF_KOR", autoreq=true}, {type="armor", subtype="light", autoreq=true}, },
drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} }, drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} },
resolvers.talents{ resolvers.talents{
...@@ -60,15 +60,15 @@ newEntity{ define_as = "SHADE_OF_ANGMAR", ...@@ -60,15 +60,15 @@ newEntity{ define_as = "SHADE_OF_ANGMAR",
ai = "dumb_talented_simple", ai_state = { talent_in=4, ai_move="move_astar" }, ai = "dumb_talented_simple", ai_state = { talent_in=4, ai_move="move_astar" },
on_die = function(self, who) on_die = function(self, who)
game.state:activateBackupGuardian("ANGMAR_FURY", 5, 35, ".. yes I tell you! The old ruins opf Kor'Pul are still haunted!") game.state:activateBackupGuardian("KOR_FURY", 5, 35, ".. yes I tell you! The old ruins opf Kor'Pul are still haunted!")
game.player:resolveSource():setQuestStatus("start-dunadan", engine.Quest.COMPLETED, "kor-pul") game.player:resolveSource():setQuestStatus("start-dunadan", engine.Quest.COMPLETED, "kor-pul")
end, end,
} }
-- The boss of Amon Sul, no "rarity" field means it will not be randomly generated -- The boss of Amon Sul, no "rarity" field means it will not be randomly generated
newEntity{ define_as = "ANGMAR_FURY", newEntity{ define_as = "KOR_FURY",
type = "undead", subtype = "ghost", unique = true, type = "undead", subtype = "ghost", unique = true,
name = "Angmar's Fury", name = "Kor's Fury",
display = "G", color=colors.VIOLET, display = "G", color=colors.VIOLET,
desc = [[The shade's colossal will keeps it anchored to this world, now as a vengeful, insane spirit.]], desc = [[The shade's colossal will keeps it anchored to this world, now as a vengeful, insane spirit.]],
level_range = {38, nil}, exp_worth = 3, level_range = {38, nil}, exp_worth = 3,
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
load("/data/general/objects/objects.lua") load("/data/general/objects/objects.lua")
-- Artifact, droped (and used!) by the Shade of Angmar -- Artifact, droped (and used!) by the Shade
newEntity{ base = "BASE_STAFF", newEntity{ base = "BASE_STAFF",
define_as = "STAFF_ANGMAR", rarity=false, define_as = "STAFF_KOR", rarity=false,
name = "Angmar's Fall", unique=true, name = "Kor's Fall", unique=true,
desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]], desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]],
require = { stat = { mag=25 }, }, require = { stat = { mag=25 }, },
cost = 5, cost = 5,
......
...@@ -46,7 +46,7 @@ return { ...@@ -46,7 +46,7 @@ return {
class = "engine.generator.actor.Random", class = "engine.generator.actor.Random",
nb_npc = {20, 30}, nb_npc = {20, 30},
filters = { {max_ood=2}, }, filters = { {max_ood=2}, },
-- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map -- guardian = "SHADE", -- The gardian is set in the static map
}, },
object = { object = {
class = "engine.generator.object.Random", class = "engine.generator.object.Random",
......
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