From b302b2509aa61537c5fef13e1b72c0cb0d40a1e8 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 13 Nov 2012 00:48:18 +0000 Subject: [PATCH] New achievement for headbanging 20 bosses to death git-svn-id: http://svn.net-core.org/repos/t-engine4@5790 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/achievements/kills.lua | 13 +++++++++++++ .../tome/data/general/objects/world-artifacts.lua | 2 +- .../tome/data/talents/techniques/thuggery.lua | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/game/modules/tome/data/achievements/kills.lua b/game/modules/tome/data/achievements/kills.lua index a60ec9bc38..1b6a8d17ad 100644 --- a/game/modules/tome/data/achievements/kills.lua +++ b/game/modules/tome/data/achievements/kills.lua @@ -151,6 +151,19 @@ newAchievement{ track = function(self) return tstring{tostring(self.nb or 0)," / 20"} end, } +newAchievement{ + name = "Headbanger", id = "HEADBANG", + show = "full", + desc = [[Headbanged 20 bosses to death.]], + mode = "player", + can_gain = function(self, who, target) + if target.rank < 3.5 then return false end + self.nb = (self.nb or 0) + 1 + if self.nb >= 20 then return true end + end, + track = function(self) return tstring{tostring(self.nb or 0)," / 20"} end, +} + newAchievement{ name = "Are you out of your mind?!", id = "UBER_WYRMS_OPEN", image = "npc/dragon_multihued_multi_hued_drake.png", diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index 44a5ae5847..965db12484 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -5123,7 +5123,7 @@ newEntity{ base = "BASE_TOOL_MISC", --Sorta Thanks Donkatsu! newEntity{ base = "BASE_RING", power_source = {technique=true, nature=true}, - name = "Ring of Growth", unique=true, image = "object/ring_of_growth.png", + name = "Ring of Growth", unique=true, image = "object/artifact/ring_of_growth.png", desc = [[This small wooden ring has a single green stem wrapped around it. Thin leaves still seem to be growing from it.]], unided_name = "vine encircled ring", level_range = {6, 20}, diff --git a/game/modules/tome/data/talents/techniques/thuggery.lua b/game/modules/tome/data/talents/techniques/thuggery.lua index 6b2f884636..e061da9e74 100644 --- a/game/modules/tome/data/talents/techniques/thuggery.lua +++ b/game/modules/tome/data/talents/techniques/thuggery.lua @@ -60,6 +60,9 @@ newTalent{ else game.logSeen(target, "%s resists the headblow!", target.name:capitalize()) end + if target:attr("dead") then + world:gainAchievement("HEADBANG", self, target) + end end return true -- GitLab