diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index a703f895eb18041a93afb9cdf793675762ebbcd1..4cfb07f2a40199900aefd324a6af41098ea8acf2 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -60,6 +60,11 @@ end --- Use the object (quaff, read, ...) function _M:use(who, typ) + if self.use_no_blind and who:attr("blind") then + game.logPlayer(who, "You can not see!") + return + end + local types = {} if self:canUseObject() then types[#types+1] = "use" end diff --git a/game/modules/tome/data/general/objects/scrolls.lua b/game/modules/tome/data/general/objects/scrolls.lua index 54fdf32ed12f6da55d198d6890bede310ac67f05..d3397e11b9be25c9ae3f786bbaa36267cbbadae0 100644 --- a/game/modules/tome/data/general/objects/scrolls.lua +++ b/game/modules/tome/data/general/objects/scrolls.lua @@ -25,6 +25,7 @@ newEntity{ encumber = 0.1, stacking = true, use_sound = "actions/read", + use_no_blind = true, fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}}, desc = [[Magical scrolls can have wildly different effects! Most of them function better with a high Magic score]], egos = "/data/general/objects/egos/scrolls.lua", egos_chance = resolvers.mbonus(10, 5), diff --git a/game/modules/tome/data/zones/vor-pride/objects.lua b/game/modules/tome/data/zones/vor-pride/objects.lua index 7e08be8885f00488028b3b4eeca7937e1e88011b..9a2f9bad4e102207e487789dabcf3d5856c7c863 100644 --- a/game/modules/tome/data/zones/vor-pride/objects.lua +++ b/game/modules/tome/data/zones/vor-pride/objects.lua @@ -39,7 +39,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", -- Artifact, randomly dropped in Vor Pride, and only there newEntity{ base = "BASE_SCROLL", subtype="tome", - name = "Tome of Flames", unided_name = "burning book", unique=true, + name = "Tome of Wildfire", unided_name = "burning book", unique=true, color = colors.VIOLET, level_range = {35, 45}, rarity = 200, @@ -51,6 +51,7 @@ newEntity{ base = "BASE_SCROLL", subtype="tome", game.logPlayer(who, "#00FFFF#You read the tome and learn about ancient forgotten fire magic!") else who.talents_types_mastery["spell/fire"] = (who.talents_types_mastery["spell/fire"] or 1) + 0.1 + who.talents_types_mastery["spell/wildfire"] = (who.talents_types_mastery["spell/wildfire"] or 1) + 0.1 game.logPlayer(who, "#00FFFF#You read the tome and perfect your mastery of fire magic!") end @@ -59,3 +60,27 @@ newEntity{ base = "BASE_SCROLL", subtype="tome", return "destroy", true end} } + +-- Artifact, randomly dropped in Vor Pride, and only there +newEntity{ base = "BASE_SCROLL", subtype="tome", + name = "Tome of Uttercold", unided_name = "frozen book", unique=true, + color = colors.VIOLET, + level_range = {35, 45}, + rarity = 1, + cost = 100, + + use_simple = { name="learn the ancient secrets", use = function(self, who) + if not who:knowTalent(who.T_ICE_STORM) then + who:learnTalent(who.T_ICE_STORM, true, 3) + game.logPlayer(who, "#00FFFF#You read the tome and learn about ancient forgotten ice magic!") + else + who.talents_types_mastery["spell/water"] = (who.talents_types_mastery["spell/water"] or 1) + 0.1 + who.talents_types_mastery["spell/ice"] = (who.talents_types_mastery["spell/ice"] or 1) + 0.1 + game.logPlayer(who, "#00FFFF#You read the tome and perfect your mastery of ice magic!") + end + + game:setAllowedBuild("mage_cryomancer", true) + + return "destroy", true + end} +}