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

Added wands of conjuration

All wands now have a spell inside


git-svn-id: http://svn.net-core.org/repos/t-engine4@1739 51575b47-30f0-44d4-a5cc-537603b46e54
parent b4648c1a
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,7 @@ function _M:finishEntity(level, type, e, ego_filter)
if _G.type(e.egos_chance) == "number" then e.egos_chance = {e.egos_chance} end
-- Pick an ego, then an other and so until we get no more
local picked_etype = {}
local etype = rng.tableIndex(e.egos_chance, picked_etype)
local etype = e.ego_first_type and e.ego_first_type or rng.tableIndex(e.egos_chance, picked_etype)
local echance = etype and e.egos_chance[etype]
while etype and rng.percent(util.bound(echance + (ego_chance or 0), 0, 100)) do
picked_etype[etype] = true
......
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
newChat{ id="welcome",
text = [[#LIGHT_GREEN#*A tall elven woman stands before you, her fair skin radiates incredible power throught her white robe.*#WHITE#
text = [[#LIGHT_GREEN#*A tall woman stands before you, her fair skin radiates incredible power throught her white robe.*#WHITE#
I am Linaniil of the Kar'Krul. Welcome to our city, @playerdescriptor.subclass@. What may I do for you?]],
answers = {
{"I require all the help I can get, not for my sake but for the town of Derth, in the north east of here.", jump="save-derth", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("saved-derth") and not q:isCompleted("tempest-located") end},
......
......@@ -147,6 +147,32 @@ newEntity{
end}
}
newEntity{
name = " of conjuration", suffix=true, instant_resolve=true,
level_range = {10, 50},
rarity = 6,
cost_per_charge = 0.5,
use_power = { name = "fire a bolt of a random element", power = 6, use = function(self, who)
local tg = {type="bolt", range=10 + who:getMag(10)}
local x, y = who:getTarget(tg)
if not x or not y then return nil end
local dam = (45 + who:getMag(25)) * self.material_level
local elem = rng.table{
{engine.DamageType.FIRE, "flame"},
{engine.DamageType.COLD, "freeze"},
{engine.DamageType.LIGHTNING, "lightning_explosion"},
{engine.DamageType.ACID, "acid"},
{engine.DamageType.NATURE, "slime"},
{engine.DamageType.BLIGHT, "slime"},
}
who:project(tg, x, y, elem[1], rng.avg(dam / 2, dam, 3), {type=elem[2]})
game:playSoundNear(who, "talents/fire")
game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_count=true})
return nil, true
end}
}
newEntity{
name = " of healing", suffix=true, instant_resolve=true,
level_range = {25, 50},
......
......@@ -29,7 +29,7 @@ newEntity{
is_magic_device = true,
elec_destroy = {{20,1}, {30,2}, {60,5}, {90,10}, {170,20}},
desc = [[Magical wands are made by powerful alchemists and archmages to store spells. Anybody can use them to release the spells.]],
egos = "/data/general/objects/egos/wands.lua", egos_chance = { prefix=resolvers.mbonus(20, 5), suffix=100 },
egos = "/data/general/objects/egos/wands.lua", egos_chance = { prefix=resolvers.mbonus(20, 5), suffix=100 }, ego_first_type = "suffix",
}
newEntity{ base = "BASE_WAND",
......
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