From 8d0a29b1eabdc0c0289967f219a77bc5e97f8387 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 6 Mar 2012 13:43:43 +0000 Subject: [PATCH] Headless horrors will properly lose elemental resists when the eyes are killed Heart of the sandworm queen no longer tells undead they've learned the harmony tree git-svn-id: http://svn.net-core.org/repos/t-engine4@4953 51575b47-30f0-44d4-a5cc-537603b46e54 --- .../modules/tome/data/general/npcs/horror.lua | 2 +- .../tome/data/zones/sandworm-lair/objects.lua | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/game/modules/tome/data/general/npcs/horror.lua b/game/modules/tome/data/general/npcs/horror.lua index b0e94b618c..9687bfd8c9 100644 --- a/game/modules/tome/data/general/npcs/horror.lua +++ b/game/modules/tome/data/general/npcs/horror.lua @@ -277,7 +277,7 @@ newEntity{ base = "BASE_NPC_HORROR", define_as = "BASE_NPC_ELDRICTH_EYE", game.logSeen(self, "#AQUAMARINE#As %s falls %s seems to weaken!", self.name, self.summoner.name) local damtype = next(self.resists) self.summoner.resists.all = (self.summoner.resists.all or 0) - 30 - self.summoner[damtype] = nil + self.summoner.resists[damtype] = nil -- Blind the main horror if no more eyes local nb = 0 diff --git a/game/modules/tome/data/zones/sandworm-lair/objects.lua b/game/modules/tome/data/zones/sandworm-lair/objects.lua index 022792d2d8..4038337c1f 100644 --- a/game/modules/tome/data/zones/sandworm-lair/objects.lua +++ b/game/modules/tome/data/zones/sandworm-lair/objects.lua @@ -47,17 +47,19 @@ newEntity{ game.logPlayer(who, "You have %d class talent point(s) to spend. Press G to use them.", who.unused_talents) game.logPlayer(who, "You have %d generic talent point(s) to spend. Press G to use them.", who.unused_generics) - if who:knowTalentType("wild-gift/harmony") then - who:setTalentTypeMastery("wild-gift/harmony", who:getTalentTypeMastery("wild-gift/harmony") + 0.1) - elseif who:knowTalentType("wild-gift/harmony") == false and not who:attr("forbid_nature") then - who:learnTalentType("wild-gift/harmony", true) - elseif not who:attr("forbid_nature") then - who:learnTalentType("wild-gift/harmony", false) + if not who:attr("forbid_nature") then + if who:knowTalentType("wild-gift/harmony") then + who:setTalentTypeMastery("wild-gift/harmony", who:getTalentTypeMastery("wild-gift/harmony") + 0.1) + elseif who:knowTalentType("wild-gift/harmony") == false then + who:learnTalentType("wild-gift/harmony", true) + else + who:learnTalentType("wild-gift/harmony", false) + end + -- Make sure a previous amulet didnt bug it out + if who:getTalentTypeMastery("wild-gift/harmony") == 0 then who:setTalentTypeMastery("wild-gift/harmony", 1) end + game.logPlayer(who, "You are transformed by the heart of the Queen!.") + game.logPlayer(who, "#00FF00#You gain an affinity for nature. You can now learn new Harmony talents (press G).") end - -- Make sure a previous amulet didnt bug it out - if who:getTalentTypeMastery("wild-gift/harmony") == 0 then who:setTalentTypeMastery("wild-gift/harmony", 1) end - game.logPlayer(who, "You are transformed by the heart of the Queen!.") - game.logPlayer(who, "#00FF00#You gain an affinity for nature. You can now learn new Harmony talents (press G).") game:setAllowedBuild("wilder_wyrmic", true) -- GitLab