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

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@1944 51575b47-30f0-44d4-a5cc-537603b46e54
parent d708cc01
No related branches found
No related tags found
No related merge requests found
...@@ -92,14 +92,14 @@ function _M:addWorldArtifact(o) ...@@ -92,14 +92,14 @@ function _M:addWorldArtifact(o)
self.world_artifacts_pool[o.define_as] = o self.world_artifacts_pool[o.define_as] = o
end end
--- Load all refused boss artifacts --- Load all added artifacts
-- This is caleld from the world-artifacts.lua file -- This is called from the world-artifacts.lua file
function _M:getWorldArtifacts() function _M:getWorldArtifacts()
return self.world_artifacts_pool return self.world_artifacts_pool
end end
local randart_name_rules = { local randart_name_rules = {
male = { default2 = {
phonemesVocals = "a, e, i, o, u, y", phonemesVocals = "a, e, i, o, u, y",
phonemesConsonants = "b, c, ch, ck, cz, d, dh, f, g, gh, h, j, k, kh, l, m, n, p, ph, q, r, rh, s, sh, t, th, ts, tz, v, w, x, z, zh", phonemesConsonants = "b, c, ch, ck, cz, d, dh, f, g, gh, h, j, k, kh, l, m, n, p, ph, q, r, rh, s, sh, t, th, ts, tz, v, w, x, z, zh",
syllablesStart = "Aer, Al, Am, An, Ar, Arm, Arth, B, Bal, Bar, Be, Bel, Ber, Bok, Bor, Bran, Breg, Bren, Brod, Cam, Chal, Cham, Ch, Cuth, Dag, Daim, Dair, Del, Dr, Dur, Duv, Ear, Elen, Er, Erel, Erem, Fal, Ful, Gal, G, Get, Gil, Gor, Grin, Gun, H, Hal, Han, Har, Hath, Hett, Hur, Iss, Khel, K, Kor, Lel, Lor, M, Mal, Man, Mard, N, Ol, Radh, Rag, Relg, Rh, Run, Sam, Tarr, T, Tor, Tul, Tur, Ul, Ulf, Unr, Ur, Urth, Yar, Z, Zan, Zer", syllablesStart = "Aer, Al, Am, An, Ar, Arm, Arth, B, Bal, Bar, Be, Bel, Ber, Bok, Bor, Bran, Breg, Bren, Brod, Cam, Chal, Cham, Ch, Cuth, Dag, Daim, Dair, Del, Dr, Dur, Duv, Ear, Elen, Er, Erel, Erem, Fal, Ful, Gal, G, Get, Gil, Gor, Grin, Gun, H, Hal, Han, Har, Hath, Hett, Hur, Iss, Khel, K, Kor, Lel, Lor, M, Mal, Man, Mard, N, Ol, Radh, Rag, Relg, Rh, Run, Sam, Tarr, T, Tor, Tul, Tur, Ul, Ulf, Unr, Ur, Urth, Yar, Z, Zan, Zer",
...@@ -107,7 +107,7 @@ local randart_name_rules = { ...@@ -107,7 +107,7 @@ local randart_name_rules = {
syllablesEnd = "bar, bers, blek, chak, chik, dan, dar, das, dig, dil, din, dir, dor, dur, fang, fast, gar, gas, gen, gorn, grim, gund, had, hek, hell, hir, hor, kan, kath, khad, kor, lach, lar, ldil, ldir, leg, len, lin, mas, mnir, ndil, ndur, neg, nik, ntir, rab, rach, rain, rak, ran, rand, rath, rek, rig, rim, rin, rion, sin, sta, stir, sus, tar, thad, thel, tir, von, vor, yon, zor", syllablesEnd = "bar, bers, blek, chak, chik, dan, dar, das, dig, dil, din, dir, dor, dur, fang, fast, gar, gas, gen, gorn, grim, gund, had, hek, hell, hir, hor, kan, kath, khad, kor, lach, lar, ldil, ldir, leg, len, lin, mas, mnir, ndil, ndur, neg, nik, ntir, rab, rach, rain, rak, ran, rand, rath, rek, rig, rim, rin, rion, sin, sta, stir, sus, tar, thad, thel, tir, von, vor, yon, zor",
rules = "$s$v$35m$10m$e", rules = "$s$v$35m$10m$e",
}, },
female = { default = {
phonemesVocals = "a, e, i, o, u, y", phonemesVocals = "a, e, i, o, u, y",
syllablesStart = "Ad, Aer, Ar, Bel, Bet, Beth, Ce'N, Cyr, Eilin, El, Em, Emel, G, Gl, Glor, Is, Isl, Iv, Lay, Lis, May, Ner, Pol, Por, Sal, Sil, Vel, Vor, X, Xan, Xer, Yv, Zub", syllablesStart = "Ad, Aer, Ar, Bel, Bet, Beth, Ce'N, Cyr, Eilin, El, Em, Emel, G, Gl, Glor, Is, Isl, Iv, Lay, Lis, May, Ner, Pol, Por, Sal, Sil, Vel, Vor, X, Xan, Xer, Yv, Zub",
syllablesMiddle = "bre, da, dhe, ga, lda, le, lra, mi, ra, ri, ria, re, se, ya", syllablesMiddle = "bre, da, dhe, ga, lda, le, lra, mi, ra, ri, ria, re, se, ya",
...@@ -133,17 +133,6 @@ function _M:generateRandart(add, base, lev) ...@@ -133,17 +133,6 @@ function _M:generateRandart(add, base, lev)
if not base then game.level.level = oldlev return end if not base then game.level.level = oldlev return end
local o = base:cloneFull() local o = base:cloneFull()
-- Make up a name
local ng = NameGenerator.new(randart_name_rules.female)
local name = o.name.." '"..ng:generate().."'"
o.define_as = name:upper():gsub("[^A-Z]", "_")
o.unided_name = "glowing "..o.unided_name
o.unique = name
o.randart = true
o.no_unique_lore = true
o.rarity = rng.range(200, 290)
local allthemes = {'misc','psionic','sorcerous','nature','brawny','lightning','arcane','light','physical','def','tireless','unyielding','dark','nimble','spell','cold','fire','venom','attack'} local allthemes = {'misc','psionic','sorcerous','nature','brawny','lightning','arcane','light','physical','def','tireless','unyielding','dark','nimble','spell','cold','fire','venom','attack'}
local pthemes = table.listify(o.randart_able) local pthemes = table.listify(o.randart_able)
local themes = {[rng.table(allthemes)] = true} local themes = {[rng.table(allthemes)] = true}
...@@ -153,6 +142,25 @@ function _M:generateRandart(add, base, lev) ...@@ -153,6 +142,25 @@ function _M:generateRandart(add, base, lev)
return false return false
end end
-- Make up a name
local ng = NameGenerator.new(randart_name_rules[rng.table(table.listify(themes))] or (rng.chance(2) and randart_name_rules.default or randart_name_rules.default2))
local name
local namescheme = rng.range(1, 3)
if namescheme == 1 then
name = o.name.." '"..ng:generate().."'"
elseif namescheme == 2 then
name = ng:generate().." the "..o.name
else
name = ng:generate()
end
o.define_as = name:upper():gsub("[^A-Z]", "_")
o.unided_name = "glowing "..o.unided_name
o.unique = name
o.randart = true
o.no_unique_lore = true
o.rarity = rng.range(200, 290)
-- Determine power -- Determine power
local points = lev * 0.7 + rng.range(5, 15) local points = lev * 0.7 + rng.range(5, 15)
local nb_powers = 2 + rng.dice(math.max(1, lev / 10), 2) local nb_powers = 2 + rng.dice(math.max(1, lev / 10), 2)
......
...@@ -448,11 +448,6 @@ function _M:getTextualDesc() ...@@ -448,11 +448,6 @@ function _M:getTextualDesc()
if a.leech then desc:add(("Life regen %d%% of max life"):format(a.leech), true) end if a.leech then desc:add(("Life regen %d%% of max life"):format(a.leech), true) end
end end
if self.mana_consume then
desc:add({"color","YELLOW"}, "When consumed:", {"color", "LAST"}, true)
desc:add(("Restores at least %d mana."):format(self.mana_consume), true)
end
if self.inscription_data and self.inscription_talent then if self.inscription_data and self.inscription_talent then
game.player.__inscription_data_fake = self.inscription_data game.player.__inscription_data_fake = self.inscription_data
local t = self:getTalentFromId("T_"..self.inscription_talent.."_1") local t = self:getTalentFromId("T_"..self.inscription_talent.."_1")
......
...@@ -40,14 +40,7 @@ newBirthDescriptor{ ...@@ -40,14 +40,7 @@ newBirthDescriptor{
copy = { copy = {
mana_regen = 0.5, mana_regen = 0.5,
mana_rating = 7, mana_rating = 7,
resolvers.generic(function(e) resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=80}),
e.hotkey[10] = {"inventory", "agate"}
end),
resolvers.inventory{ id=true,
{type="gem", name="agate"},
{type="gem", name="agate"},
{type="gem", name="agate"},
},
}, },
} }
......
...@@ -112,13 +112,6 @@ newBirthDescriptor{ ...@@ -112,13 +112,6 @@ newBirthDescriptor{
[ActorTalents.T_LETHALITY] = 1, [ActorTalents.T_LETHALITY] = 1,
}, },
copy = { copy = {
resolvers.generic(function(e) resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=80}),
e.hotkey[10] = {"inventory", "agate"}
end),
resolvers.inventory{ id=true,
{type="gem", name="agate"},
{type="gem", name="agate"},
{type="gem", name="agate"},
},
}, },
} }
...@@ -167,14 +167,7 @@ newBirthDescriptor{ ...@@ -167,14 +167,7 @@ newBirthDescriptor{
{type="weapon", subtype="greatsword", name="iron greatsword", autoreq=true}, {type="weapon", subtype="greatsword", name="iron greatsword", autoreq=true},
{type="armor", subtype="light", name="rough leather armour", autoreq=true}, {type="armor", subtype="light", name="rough leather armour", autoreq=true},
}, },
resolvers.generic(function(e) resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=80}),
e.hotkey[10] = {"inventory", "agate"}
end),
resolvers.inventory{ id=true,
{type="gem", name="agate"},
{type="gem", name="agate"},
{type="gem", name="agate"},
},
}, },
copy_add = { copy_add = {
life_rating = 2, life_rating = 2,
......
...@@ -29,22 +29,15 @@ newEntity{ ...@@ -29,22 +29,15 @@ newEntity{
desc = [[Gems can be sold for money or used in arcane rituals.]], desc = [[Gems can be sold for money or used in arcane rituals.]],
} }
local function newGem(name, image, cost, rarity, color, min_level, max_level, tier, power, imbue, bomb, mana_consume) local function newGem(name, image, cost, rarity, color, min_level, max_level, tier, power, imbue, bomb)
-- Gems, randomly lootable -- Gems, randomly lootable
newEntity{ base = "BASE_GEM", define_as = "GEM_"..name:upper(), newEntity{ base = "BASE_GEM", define_as = "GEM_"..name:upper(),
name = name:lower(), subtype = color, name = name:lower(), subtype = color,
color = colors[color:upper()], image=image, color = colors[color:upper()], image=image,
level_range = {min_level, max_level}, level_range = {min_level, max_level},
rarity = rarity, cost = cost, rarity = rarity, cost = cost,
mana_consume = mana_consume,
material_level = tier, material_level = tier,
imbue_powers = imbue, imbue_powers = imbue,
use_simple = { name="restore mana over 5 turns", use = function(self, who)
who:setEffect(who.EFF_MANAFLOW, 5, {power=(self.mana_consume + who:getMag()) / 5})
game.logSeen(who, "%s crushs a %s to regain mana!", who.name:capitalize(), self:getName{no_count=true})
return "destroy", true
end},
} }
-- Alchemist gems, not lootable, only created by talents -- Alchemist gems, not lootable, only created by talents
newEntity{ base = "BASE_GEM", define_as = "ALCHEMIST_GEM_"..name:upper(), newEntity{ base = "BASE_GEM", define_as = "ALCHEMIST_GEM_"..name:upper(),
...@@ -60,121 +53,97 @@ end ...@@ -60,121 +53,97 @@ end
newGem("Diamond", "object/diamond.png",5, 18, "white", 40, 50, 5, 70, newGem("Diamond", "object/diamond.png",5, 18, "white", 40, 50, 5, 70,
{ inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_DEX] = 5, [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 5, [Stats.STAT_CON] = 5, } }, { inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_DEX] = 5, [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 5, [Stats.STAT_CON] = 5, } },
{ power=25 }, { power=25 }
300
) )
newGem("Pearl", "object/pearl.png", 5, 18, "white", 40, 50, 5, 70, newGem("Pearl", "object/pearl.png", 5, 18, "white", 40, 50, 5, 70,
{ resists = {all=10} }, { resists = {all=10} },
{ splash={type="LITE", dam=1} }, { splash={type="LITE", dam=1} }
300
) )
newGem("Moonstone", "object/moonstone.png",5, 18, "white", 40, 50, 5, 70, newGem("Moonstone", "object/moonstone.png",5, 18, "white", 40, 50, 5, 70,
{ combat_def=10 }, { combat_def=10 },
{ stun={chance=20, dur=3} }, { stun={chance=20, dur=3} }
300
) )
newGem("Fire Opal", "object/fireopal.png",5, 18, "red", 40, 50, 5, 70, newGem("Fire Opal", "object/fireopal.png",5, 18, "red", 40, 50, 5, 70,
{ inc_damage = {all=10} }, { inc_damage = {all=10} },
{ splash={type="FIRE", dam=40} }, { splash={type="FIRE", dam=40} }
300
) )
newGem("Bloodstone", "object/bloodstone.png",5, 18, "red", 40, 50, 5, 70, newGem("Bloodstone", "object/bloodstone.png",5, 18, "red", 40, 50, 5, 70,
{ stun_immune=0.6 }, { stun_immune=0.6 },
{ leech=10 }, { leech=10 }
300
) )
newGem("Ruby", "object/ruby.png", 4, 16, "red", 30, 40, 4, 65, newGem("Ruby", "object/ruby.png", 4, 16, "red", 30, 40, 4, 65,
{ inc_stats = { [Stats.STAT_STR] = 4, [Stats.STAT_DEX] = 4, [Stats.STAT_MAG] = 4, [Stats.STAT_WIL] = 4, [Stats.STAT_CUN] = 4, [Stats.STAT_CON] = 4, } }, { inc_stats = { [Stats.STAT_STR] = 4, [Stats.STAT_DEX] = 4, [Stats.STAT_MAG] = 4, [Stats.STAT_WIL] = 4, [Stats.STAT_CUN] = 4, [Stats.STAT_CON] = 4, } },
{ power=20 }, { power=20 }
250
) )
newGem("Amber", "object/amber.png", 4, 16, "yellow", 30, 40, 4, 65, newGem("Amber", "object/amber.png", 4, 16, "yellow", 30, 40, 4, 65,
{ inc_damage = {all=8} }, { inc_damage = {all=8} },
{ stun={chance=10, dur=2} }, { stun={chance=10, dur=2} }
250
) )
newGem("Turquoise", "object/turquoise.png",4, 16, "green", 30, 40, 4, 65, newGem("Turquoise", "object/turquoise.png",4, 16, "green", 30, 40, 4, 65,
{ see_invisible=10 }, { see_invisible=10 },
{ splash={type="ACID", dam=30} }, { splash={type="ACID", dam=30} }
250
) )
newGem("Jade", "object/jade.png", 4, 16, "green", 30, 40, 4, 65, newGem("Jade", "object/jade.png", 4, 16, "green", 30, 40, 4, 65,
{ resists = {all=8} }, { resists = {all=8} },
{ splash={type="SLOW", dam=-1 + 1 / (1 + 0.20)} }, { splash={type="SLOW", dam=-1 + 1 / (1 + 0.20)} }
250
) )
newGem("Sapphire", "object/garnet.png",4, 16, "blue", 30, 40, 4, 65, newGem("Sapphire", "object/garnet.png",4, 16, "blue", 30, 40, 4, 65,
{ combat_def=8 }, { combat_def=8 },
{ splash={type="ICE", dam=30} }, { splash={type="ICE", dam=30} }
250
) )
newGem("Quartz", "object/quartz.png",3, 12, "white", 20, 30, 3, 50, newGem("Quartz", "object/quartz.png",3, 12, "white", 20, 30, 3, 50,
{ stun_immune=0.3 }, { stun_immune=0.3 },
{ splash={type="SPELLKNOCKBACK", dam=10} }, { splash={type="SPELLKNOCKBACK", dam=10} }
200
) )
newGem("Emerald", "object/emerald.png",3, 12, "green", 20, 30, 3, 50, newGem("Emerald", "object/emerald.png",3, 12, "green", 20, 30, 3, 50,
{ resists = {all=6} }, { resists = {all=6} },
{ splash={type="POISON", dam=50} }, { splash={type="POISON", dam=50} }
200
) )
newGem("Lapis Lazuli", "object/lapis_lazuli.png",3, 12, "blue", 20, 30, 3, 50, newGem("Lapis Lazuli", "object/lapis_lazuli.png",3, 12, "blue", 20, 30, 3, 50,
{ combat_def=6 }, { combat_def=6 },
{ mana=30 }, { mana=30 }
200
) )
newGem("Garnets", "object/garnet.png",3, 12, "red", 20, 30, 3, 50, newGem("Garnets", "object/garnet.png",3, 12, "red", 20, 30, 3, 50,
{ inc_damage = {all=6} }, { inc_damage = {all=6} },
{ leech=5 }, { leech=5 }
200
) )
newGem("Onyx", "object/.png", 3, 12, "black", 20, 30, 3, 50, newGem("Onyx", "object/.png", 3, 12, "black", 20, 30, 3, 50,
{ inc_stats = { [Stats.STAT_STR] = 3, [Stats.STAT_DEX] = 3, [Stats.STAT_MAG] = 3, [Stats.STAT_WIL] = 3, [Stats.STAT_CUN] = 3, [Stats.STAT_CON] = 3, } }, { inc_stats = { [Stats.STAT_STR] = 3, [Stats.STAT_DEX] = 3, [Stats.STAT_MAG] = 3, [Stats.STAT_WIL] = 3, [Stats.STAT_CUN] = 3, [Stats.STAT_CON] = 3, } },
{ power=15 }, { power=15 }
200
) )
newGem("Amethyst", "object/.png",2, 10, "violet", 10, 20, 2, 35, newGem("Amethyst", "object/.png",2, 10, "violet", 10, 20, 2, 35,
{ inc_damage = {all=4} }, { inc_damage = {all=4} },
{ splash={type="ARCANE", dam=25}}, { splash={type="ARCANE", dam=25}}
150
) )
newGem("Opal", "object/.png", 2, 10, "blue", 10, 20, 2, 35, newGem("Opal", "object/.png", 2, 10, "blue", 10, 20, 2, 35,
{ inc_stats = { [Stats.STAT_STR] = 2, [Stats.STAT_DEX] = 2, [Stats.STAT_MAG] = 2, [Stats.STAT_WIL] = 2, [Stats.STAT_CUN] = 2, [Stats.STAT_CON] = 2, } }, { inc_stats = { [Stats.STAT_STR] = 2, [Stats.STAT_DEX] = 2, [Stats.STAT_MAG] = 2, [Stats.STAT_WIL] = 2, [Stats.STAT_CUN] = 2, [Stats.STAT_CON] = 2, } },
{ power=10 }, { power=10 }
150
) )
newGem("Topaz", "object/.png", 2, 10, "blue", 10, 20, 2, 35, newGem("Topaz", "object/.png", 2, 10, "blue", 10, 20, 2, 35,
{ combat_def=4 }, { combat_def=4 },
{ range=3 }, { range=3 }
150
) )
newGem("Aquamarine", "object/.png",2, 10, "blue", 10, 20, 2, 35, newGem("Aquamarine", "object/.png",2, 10, "blue", 10, 20, 2, 35,
{ resists = {all=4} }, { resists = {all=4} },
{ mana=20 }, { mana=20 }
150
) )
newGem("Ametrine", "object/.png",1, 8, "yellow", 1, 10, 1, 20, newGem("Ametrine", "object/.png",1, 8, "yellow", 1, 10, 1, 20,
{ inc_damage = {all=2} }, { inc_damage = {all=2} },
{ splash={type="LITE", dam=1} }, { splash={type="LITE", dam=1} }
100
) )
newGem("Zircon", "object/.png",1, 8, "yellow", 1, 10, 1, 20, newGem("Zircon", "object/.png",1, 8, "yellow", 1, 10, 1, 20,
{ resists = {all=2} }, { resists = {all=2} },
{ daze={chance=20, dur=3} }, { daze={chance=20, dur=3} }
100
) )
newGem("Spinel", "object/.png",1, 8, "green", 1, 10, 1, 20, newGem("Spinel", "object/.png",1, 8, "green", 1, 10, 1, 20,
{ combat_def=2 }, { combat_def=2 },
{ mana=10 }, { mana=10 }
100
) )
newGem("Citrine", "object/.png",1, 8, "yellow", 1, 10, 1, 20, newGem("Citrine", "object/.png",1, 8, "yellow", 1, 10, 1, 20,
{ lite=1 }, { lite=1 },
{ range=1 }, { range=1 }
100
) )
newGem("Agate", "object/.png", 1, 8, "black", 1, 10, 1, 20, newGem("Agate", "object/.png", 1, 8, "black", 1, 10, 1, 20,
{ inc_stats = { [Stats.STAT_STR] = 1, [Stats.STAT_DEX] = 1, [Stats.STAT_MAG] = 1, [Stats.STAT_WIL] = 1, [Stats.STAT_CUN] = 1, [Stats.STAT_CON] = 1, } }, { inc_stats = { [Stats.STAT_STR] = 1, [Stats.STAT_DEX] = 1, [Stats.STAT_MAG] = 1, [Stats.STAT_WIL] = 1, [Stats.STAT_CUN] = 1, [Stats.STAT_CON] = 1, } },
{ power=5 }, { power=5 }
100
) )
...@@ -379,3 +379,19 @@ newEntity{ base = "BASE_RUNE", ...@@ -379,3 +379,19 @@ newEntity{ base = "BASE_RUNE",
}, },
inscription_talent = "RUNE:_LIGHTNING", inscription_talent = "RUNE:_LIGHTNING",
} }
newEntity{ base = "BASE_RUNE",
name = "manasurge rune",
level_range = {1, 50},
rarity = 22,
cost = 10,
material_level = 1,
inscription_data = {
cooldown = resolvers.rngrange(20, 30),
dur = 10,
mana = resolvers.mbonus(180, 60, function(e, v) return v * 0.09 end),
use_stat_mod = 1.8,
},
inscription_talent = "RUNE:_MANASURGE",
}
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
-- darkgod@te4.org -- darkgod@te4.org
local newInscription = function(t) local newInscription = function(t)
for i = 1, 10 do -- Warning, up that if more than 5 inscriptions are ever allowed
for i = 1, 5 do
local tt = table.clone(t) local tt = table.clone(t)
tt.short_name = tt.name:upper():gsub("[ ]", "_").."_"..i tt.short_name = tt.name:upper():gsub("[ ]", "_").."_"..i
tt.display_name = function(self, t) tt.display_name = function(self, t)
...@@ -420,3 +421,19 @@ newInscription{ ...@@ -420,3 +421,19 @@ newInscription{
return ([[Activate the rune to fire a beam of lightning, doing %0.2f to %0.2f lightning damage.]]):format(dam / 3, dam) return ([[Activate the rune to fire a beam of lightning, doing %0.2f to %0.2f lightning damage.]]):format(dam / 3, dam)
end, end,
} }
newInscription{
name = "Rune: Manasurge",
type = {"inscriptions/runes", 1},
points = 1,
is_spell = true,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
self:setEffect(self.EFF_MANASURGE, data.dur, {power=(data.mana + data.inc_stat) / data.dur})
return true
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Activate the rune to unleash a manasurge upon yourself, regenerating %d mana over %d turns.]]):format(data.mana + data.inc_stat, data.dur)
end,
}
...@@ -88,7 +88,7 @@ newTalent{ ...@@ -88,7 +88,7 @@ newTalent{
points = 5, points = 5,
random_ego = "utility", random_ego = "utility",
mana = 0, mana = 0,
cooldown = 300, cooldown = 40,
tactical = { tactical = {
MANA = 20, MANA = 20,
}, },
......
...@@ -45,7 +45,7 @@ newEffect{ ...@@ -45,7 +45,7 @@ newEffect{
newEffect{ newEffect{
name = "MANAFLOW", name = "MANAFLOW",
desc = "Surging mana", desc = "Manaflow",
long_desc = function(self, eff) return ("The mana surge engulfs the target, regenerating %0.2f mana per turn."):format(eff.power) end, long_desc = function(self, eff) return ("The mana surge engulfs the target, regenerating %0.2f mana per turn."):format(eff.power) end,
type = "magical", type = "magical",
status = "beneficial", status = "beneficial",
...@@ -72,6 +72,35 @@ newEffect{ ...@@ -72,6 +72,35 @@ newEffect{
end, end,
} }
newEffect{
name = "MANASURGE",
desc = "Surging mana",
long_desc = function(self, eff) return ("The mana surge engulfs the target, regenerating %0.2f mana per turn."):format(eff.power) end,
type = "magical",
status = "beneficial",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# starts to surge mana.", "+Manasurge" end,
on_lose = function(self, err) return "#Target# stops surging mana.", "-Manasurge" end,
on_merge = function(self, old_eff, new_eff)
-- Merge the mana
local olddam = old_eff.power * old_eff.dur
local newdam = new_eff.power * new_eff.dur
local dur = math.ceil((old_eff.dur + new_eff.dur) / 2)
old_eff.dur = dur
old_eff.power = (olddam + newdam) / dur
self:removeTemporaryValue("mana_regen", old_eff.tmpid)
old_eff.tmpid = self:addTemporaryValue("mana_regen", old_eff.power)
return old_eff
end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("mana_regen", eff.power)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("mana_regen", eff.tmpid)
end,
}
newEffect{ newEffect{
name = "REGENERATION", name = "REGENERATION",
desc = "Regeneration", desc = "Regeneration",
......
...@@ -26,7 +26,7 @@ local Talents = require("engine.interface.ActorTalents") ...@@ -26,7 +26,7 @@ local Talents = require("engine.interface.ActorTalents")
-- For the corruptors attack -- For the corruptors attack
load("/data/general/npcs/elven-caster.lua", function(e) if e.rarity then e.rarity, e.corruptor_rarity = nil, e.rarity end end) load("/data/general/npcs/elven-caster.lua", function(e) if e.rarity then e.rarity, e.corruptor_rarity = nil, e.rarity end end)
newEntity{ base = "BASE_NPC_ELVEN_CASTER", define_as = "GRAND_CORRUPTOR", newEntity{ base = "BASE_NPC_ELVEN_CASTER", define_as = "GRAND_CORRUPTOR",
name = "Grand Corruptor", color=colors.VIOLET, unique = true, name = "Grand Corruptor", color=colors.VIOLET, unique = "Grand Corruptor Zigur",
desc = [[An elven corruptor, drawn to these blighted lands.]], desc = [[An elven corruptor, drawn to these blighted lands.]],
level_range = {30, nil}, exp_worth = 1, level_range = {30, nil}, exp_worth = 1,
rank = 3.5, rank = 3.5,
......
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