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

more achievemnts

git-svn-id: http://svn.net-core.org/repos/t-engine4@577 51575b47-30f0-44d4-a5cc-537603b46e54
parent de6b208d
No related branches found
No related tags found
No related merge requests found
......@@ -27,3 +27,27 @@ newAchievement{
return self.mana and self.life
end
}
newAchievement{
name = "Treasure Hunter",
desc = [[Amass 1000 gold pieces.]],
can_gain = function(self, who)
return who.money >= 1000
end,
}
newAchievement{
name = "Treasure Hoarder",
desc = [[Amass 3000 gold pieces.]],
can_gain = function(self, who)
return who.money >= 3000
end,
}
newAchievement{ id = "DRAGON_GREED",
name = "Dragon's Greed",
desc = [[Amass 8000 gold pieces.]],
can_gain = function(self, who)
return who.money >= 8000
end,
}
......@@ -26,3 +26,7 @@ newAchievement{
name = "A dangerous secret",
desc = [[Found the mysterious staff and told Minas Tirith about it.]],
}
newAchievement{
name = "The secret city",
desc = [[Discovered the truth about mages.]],
}
......@@ -84,7 +84,7 @@ Not many people are accepted there but I will arrange for you to be allowed insi
answers = {
{"Oh! How could such a place be kept secret for so long.. This is interresting indeed, thanks for your trust.",
action = function(npc, player)
player:hasQuest("mage-apprentice"):access_angolwen()
player:hasQuest("mage-apprentice"):access_angolwen(player)
npc:die()
end,
},
......
......@@ -48,6 +48,7 @@ newEntity{
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "actor", x, y)
game.log("#LIGHT_BLUE#You notice a novice mage nearby.")
return true
end,
}
......
......@@ -29,6 +29,11 @@ newEntity{
who.money = who.money + self.money_value / 10
-- Remove from the map
game.level.map:removeObject(who.x, who.y, id)
if who.player then
world:gainAchievement("TREASURE_HUNTER")
world:gainAchievement("TREASURE_HOARDER")
world:gainAchievement("DRAGON_GREED")
end
return true
end,
}
......
......@@ -58,7 +58,7 @@ can_offer = function(self, who)
end
end
access_angolwen = function(self)
access_angolwen = function(self, player)
local g = mod.class.Grid.new{
show_tooltip=true,
name="Angolwen, the hidden city of magic",
......@@ -81,6 +81,7 @@ access_angolwen = function(self)
game.zone:addEntity(game.level, p, "terrain", 16, 27)
game:setAllowedBuild("mage", true)
world:gainAchievement("THE_SECRET_CITY", who)
end
ring_gift = function(self, player)
......
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