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

ego inscriptions

git-svn-id: http://svn.net-core.org/repos/t-engine4@1910 51575b47-30f0-44d4-a5cc-537603b46e54
parent b0ec4f10
No related branches found
No related tags found
No related merge requests found
......@@ -669,7 +669,7 @@ function _M:setupCommands()
if config.settings.tome.cheat then
self.player:incStat("str", 100) self.player:incStat("dex", 100) self.player:incStat("mag", 100) self.player:incStat("wil", 100) self.player:incStat("cun", 100) self.player:incStat("con", 100)
self.player:learnTalent(self.player.T_HEAVY_ARMOUR_TRAINING, true) self.player:learnTalent(self.player.T_MASSIVE_ARMOUR_TRAINING, true)
-- [[
--[[
for i, e in ipairs(self.zone.object_list) do
if e.unique and e.define_as ~= "VOICE_SARUMAN" and e.define_as ~= "ORB_MANY_WAYS_DEMON" then
local a = self.zone:finishEntity(self.level, "object", e)
......@@ -679,9 +679,9 @@ function _M:setupCommands()
end
end
--]]
--[[
-- [[
for i = 1, 50 do
local a = self.zone:makeEntity(self.level, "object", {type="ammo"}, nil, true)
local a = self.zone:makeEntity(self.level, "object", {type="scroll", ego_chance=100, add_levels=50}, nil, true)
if a then
a:identify(true)
self.zone:addEntity(self.level, a, "object", self.player.x, self.player.y)
......
......@@ -437,6 +437,16 @@ function _M:getTextualDesc()
desc:add(("Restores at least %d mana."):format(self.mana_consume), true)
end
if self.inscription_data and self.inscription_talent then
game.player.__inscription_data_fake = self.inscription_data
local t = self:getTalentFromId("T_"..self.inscription_talent.."_1")
local tdesc = game.player:getTalentFullDescription(t)
game.player.__inscription_data_fake = nil
desc:add({"color","YELLOW"}, "When inscribed on your body:", {"color", "LAST"}, true)
desc:merge(tdesc)
desc:add(true)
end
local use_desc = self:getUseDesc()
if use_desc then desc:add(use_desc) end
......
......@@ -76,8 +76,9 @@ function _M:setInscription(id, name, data, cooldown, vocal, src)
end
function _M:getInscriptionData(name)
assert(self.inscriptions_data[name], "unknown inscription "..name)
local d = table.clone(self.inscriptions_data[name])
local fake = self.__inscription_data_fake
assert(fake or self.inscriptions_data[name], "unknown inscription "..name)
local d = table.clone(fake or self.inscriptions_data[name])
d.inc_stat = 0
if d.use_stat and d.use_stat_mod then d.inc_stat = self:getStat(d.use_stat) * d.use_stat_mod end
return d
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newEntity{
name = "brawler's ", prefix=true,
level_range = {1, 50},
rarity = 4,
cost = 10,
inscription_data = { use_stat = "str" },
}
newEntity{
name = "duelist's ", prefix=true,
level_range = {1, 50},
rarity = 4,
cost = 10,
inscription_data = { use_stat = "dex" },
}
newEntity{
name = "wizard's ", prefix=true,
level_range = {1, 50},
rarity = 4,
cost = 10,
inscription_data = { use_stat = "mag" },
}
newEntity{
name = "psychic's ", prefix=true,
level_range = {1, 50},
rarity = 4,
cost = 10,
inscription_data = { use_stat = "wil" },
}
newEntity{
name = "sneak's ", prefix=true,
level_range = {1, 50},
rarity = 4,
cost = 10,
inscription_data = { use_stat = "cun" },
}
newEntity{
name = "titan's ", prefix=true,
level_range = {1, 50},
rarity = 4,
cost = 10,
inscription_data = { use_stat = "con" },
}
......@@ -46,7 +46,13 @@ newEntity{
is_magic_device = true,
fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}},
desc = [[Natural infusions allow you to inscribe an infusion onto your body, granting you an on-demand ability.]],
egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(10, 5),
egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5),
use_simple = { name="inscribe your skin with the infusion.", use = function(self, who, inven, item)
if who:setInscription(nil, self.inscription_talent, self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
}
newEntity{
......@@ -61,7 +67,13 @@ newEntity{
is_magic_device = true,
fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}},
desc = [[Magical runes allow you to inscribe a rune onto your body, granting you an on-demand ability.]],
egos = "/data/general/objects/egos/runes.lua", egos_chance = resolvers.mbonus(10, 5),
egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5),
use_simple = { name="inscribe your skin with the rune.", use = function(self, who, inven, item)
if who:setInscription(nil, self.inscription_talent, self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
}
newEntity{
......@@ -85,12 +97,7 @@ newEntity{ base = "BASE_INFUSION",
heal = resolvers.mbonus(300, 40),
use_stat_mod = 2,
},
use_simple = { name="inscribe your skin with an infusion that allows you to instantly heal your wounds.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_HEALING", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_HEALING",
}
newEntity{ base = "BASE_INFUSION",
......@@ -106,12 +113,7 @@ newEntity{ base = "BASE_INFUSION",
heal = resolvers.mbonus(500, 60),
use_stat_mod = 2.1,
},
use_simple = { name="inscribe your skin with an infusion that allows you to regenerate your wounds over a few turns.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_REGENERATION", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_REGENERATION",
}
newEntity{ base = "BASE_INFUSION",
......@@ -124,8 +126,8 @@ newEntity{ base = "BASE_INFUSION",
inscription_data = resolvers.generic(function(e)
return {
cooldown = rng.range(10, 15),
dur = rng.mbonus(4, 4, resolvers.mbonus_max_level),
power = rng.mbonus(30, 20, resolvers.mbonus_max_level),
dur = rng.mbonus(4, resolvers.current_level, resolvers.mbonus_max_level) + 4,
power = rng.mbonus(30, resolvers.current_level, resolvers.mbonus_max_level) + 20,
use_stat_mod = 0.1,
what = {
poison = true,
......@@ -138,12 +140,7 @@ newEntity{ base = "BASE_INFUSION",
}
}
end),
use_simple = { name="inscribe your skin with an infusion that allows you to cure yourself and reduce damage taken for a few turns.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_WILD", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_WILD",
}
newEntity{ base = "BASE_INFUSION",
......@@ -158,12 +155,7 @@ newEntity{ base = "BASE_INFUSION",
dur = resolvers.mbonus(5, 2),
use_stat_mod = 0.05,
},
use_simple = { name="inscribe your skin with an infusion that allows you to become immune to movement imparing effects.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_MOVEMENT", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_MOVEMENT",
}
newEntity{ base = "BASE_INFUSION",
......@@ -178,12 +170,7 @@ newEntity{ base = "BASE_INFUSION",
range = resolvers.mbonus(5, 5),
use_stat_mod = 0.05,
},
use_simple = { name="inscribe your skin with an infusion that allows you to channel the power of the sun to light the surrounding area and reveal stealthed creatures.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_SUN", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_SUN",
}
newEntity{ base = "BASE_INFUSION",
......@@ -199,12 +186,7 @@ newEntity{ base = "BASE_INFUSION",
power = resolvers.mbonus(4, 4),
use_stat_mod = 0.04,
},
use_simple = { name="inscribe your skin with an infusion that allows you to improve your physical stats for some turns.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_STRENGTH", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_STRENGTH",
}
newEntity{ base = "BASE_INFUSION",
......@@ -220,12 +202,7 @@ newEntity{ base = "BASE_INFUSION",
power = resolvers.mbonus(4, 4),
use_stat_mod = 0.04,
},
use_simple = { name="inscribe your skin with an infusion that allows you to improve your mental stats for some turns.", use = function(self, who, inven, item)
if who:setInscription(nil, "INFUSION:_WILL", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "INFUSION:_WILL",
}
newEntity{ base = "BASE_RUNE",
......@@ -240,12 +217,7 @@ newEntity{ base = "BASE_RUNE",
range = resolvers.mbonus(10, 5),
use_stat_mod = 0.07,
},
use_simple = { name="inscribe your skin with a rune that allows you to randomly teleport.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_PHASE_DOOR", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_PHASE_DOOR",
}
newEntity{ base = "BASE_RUNE",
......@@ -260,12 +232,7 @@ newEntity{ base = "BASE_RUNE",
range = resolvers.mbonus(6, 5),
use_stat_mod = 0.05,
},
use_simple = { name="inscribe your skin with a rune that allows you to teleport in a directed manner over a short range.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_CONTROLLED_PHASE_DOOR", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_CONTROLLED_PHASE_DOOR",
}
newEntity{ base = "BASE_RUNE",
......@@ -280,12 +247,7 @@ newEntity{ base = "BASE_RUNE",
range = resolvers.mbonus(100, 20),
use_stat_mod = 1,
},
use_simple = { name="inscribe your skin with a rune that allows you to randomly teleport on a big range.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_TELEPORTATION", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_TELEPORTATION",
}
newEntity{ base = "BASE_RUNE",
......@@ -301,12 +263,7 @@ newEntity{ base = "BASE_RUNE",
power = resolvers.mbonus(400, 50),
use_stat_mod = 2.3,
},
use_simple = { name="inscribe your skin with a rune that allows you to summon a protective shield.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_SHIELDING", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_SHIELDING",
}
newEntity{ base = "BASE_RUNE",
......@@ -323,12 +280,7 @@ newEntity{ base = "BASE_RUNE",
use_stat_mod = 0.08,
nb_uses = resolvers.mbonus(7, 4),
},
use_simple = { name="inscribe your skin with a rune that allows you to become invisible for a few turns.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_INVISIBILITY", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_INVISIBILITY",
}
newEntity{ base = "BASE_RUNE",
......@@ -345,12 +297,7 @@ newEntity{ base = "BASE_RUNE",
use_stat_mod = 0.3,
nb_uses = resolvers.mbonus(7, 4),
},
use_simple = { name="inscribe your skin with a rune that allows you to increase your global speed for a few turns.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_SPEED", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_SPEED",
}
newEntity{ base = "BASE_RUNE",
......@@ -367,10 +314,5 @@ newEntity{ base = "BASE_RUNE",
power = resolvers.mbonus(20, 10),
use_stat_mod = 0.14,
},
use_simple = { name="inscribe your skin with a rune that allows you to see invisible a some turns and map the area surrounding you.", use = function(self, who, inven, item)
if who:setInscription(nil, "RUNE:_VISION", self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
inscription_talent = "RUNE:_VISION",
}
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