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

Can not read scrolls while blinded

git-svn-id: http://svn.net-core.org/repos/t-engine4@952 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1927dbf4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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),
......
......@@ -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}
}
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