diff --git a/game/modules/tome/data/talents/spells/air.lua b/game/modules/tome/data/talents/spells/air.lua index c417e0b47dbe7a70f1e337cc0882931ed26dd6e8..45985923c69352d538195fc55ac08234a11cd681 100644 --- a/game/modules/tome/data/talents/spells/air.lua +++ b/game/modules/tome/data/talents/spells/air.lua @@ -1,6 +1,7 @@ newTalent{ name = "Lightning", type = {"spell/air", 1}, + require = spells_req1, points = 5, mana = 10, cooldown = 3, @@ -15,7 +16,6 @@ newTalent{ self:project(tg, x, y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.8) * self:getTalentLevel(t)), 3), {type="lightning"}) return true end, - require = { stat = { mag=10 }, }, info = function(self, t) return ([[Conjures up mana into a powerful beam of lightning doing 1 to %0.2f damage The damage will increase with the Magic stat]]):format(20 + self:combatSpellpower(0.8) * self:getTalentLevel(t)) @@ -24,7 +24,8 @@ newTalent{ newTalent{ name = "Noxious Cloud", - type = {"spell/air",1}, + type = {"spell/air",2}, + require = spells_req2, points = 5, mana = 45, cooldown = 8, @@ -50,7 +51,6 @@ newTalent{ ) return true end, - require = { stat = { mag=16 }, }, info = function(self, t) return ([[Noxious fumes raises from the ground doing %0.2f nature damage in a radius of 3 each turns for %d turns. The damage and duration will increase with the Magic stat]]):format(4 + self:combatSpellpower(0.11) * self:getTalentLevel(t), self:getTalentLevel(t)) diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index 436a30e47b7e3cfb4c6811b50f603c281f6c0615..719212a4535984e981a35539952e40184536ad30 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -1,6 +1,7 @@ newTalent{ name = "Manathrust", type = {"spell/arcane", 1}, + require = spells_req1, points = 5, mana = 10, cooldown = 3, @@ -16,7 +17,6 @@ newTalent{ self:project(tg, x, y, DamageType.ARCANE, self:spellCrit(20 + self:combatSpellpower(0.5) * self:getTalentLevel(t)), {type="manathrust"}) return true end, - require = { stat = { mag=10 }, }, info = function(self, t) return ([[Conjures up mana into a powerful bolt doing %0.2f arcane damage At level 3 it becomes a beam. @@ -27,6 +27,7 @@ newTalent{ newTalent{ name = "Manaflow", type = {"spell/arcane", 2}, + require = spells_req2, points = 5, mana = 0, cooldown = 300, @@ -39,7 +40,6 @@ newTalent{ end return true end, - require = { stat = { mag=20 }, }, info = function(self, t) return ([[Engulf yourself into a surge of mana, quickly restoring %d mana every turns for 10 turns. The mana restored will increase with the Magic stat]]):format(5 + self:combatSpellpower(0.06) * self:getTalentLevel(t)) @@ -50,8 +50,8 @@ newTalent{ name = "Arcane Power", type = {"spell/arcane", 3}, mode = "passive", + require = spells_req3, points = 5, - require = { stat = { mag=28 }, }, on_learn = function(self, t) self.combat_spellpower = self.combat_spellpower + 5 end, @@ -66,6 +66,7 @@ newTalent{ newTalent{ name = "Disruption Shield", type = {"spell/arcane",4}, + require = spells_req4, points = 5, mode = "sustained", sustain_mana = 150, @@ -82,7 +83,6 @@ newTalent{ self:removeTemporaryValue("mana_shield", p.shield) return true end, - require = { stat = { mag=40 }, level=20 }, info = function(self, t) return ([[Uses mana instead of life to take damage. Uses %0.2f mana per damage taken. The damage to mana ratio increases with the Magic stat]]):format(3 - (self:combatSpellpower(1) * self:getTalentLevel(t)) / 280) diff --git a/game/modules/tome/data/talents/spells/conveyance.lua b/game/modules/tome/data/talents/spells/conveyance.lua index bd8b431125e414d76d94b1a10ec969ad8088ffc0..ed1b86b14f0b5f79424e6d8e98c133bb30505226 100644 --- a/game/modules/tome/data/talents/spells/conveyance.lua +++ b/game/modules/tome/data/talents/spells/conveyance.lua @@ -2,6 +2,7 @@ newTalent{ name = "Phase Door", type = {"spell/conveyance",1}, message = "@Source@ blinks.", + require = spells_req1, points = 5, mana = 10, cooldown = 8, @@ -31,7 +32,6 @@ newTalent{ end return true end, - require = { stat = { mag=15 }, }, info = function(self, t) return ([[Teleports you randomly on a small scale range (%d) At level 4 it allows to specify the target area. @@ -44,6 +44,7 @@ newTalent{ name = "Teleport", type = {"spell/conveyance",2}, message = "@Source@ teleports away.", + require = spells_req2, points = 5, mana = 20, cooldown = 30, @@ -73,7 +74,6 @@ newTalent{ end return true end, - require = { stat = { mag=24 }, }, info = function(self, t) return ([[Teleports you randomly on a small scale range (%d) At level 4 it allows to specify the target area. @@ -85,6 +85,7 @@ newTalent{ newTalent{ name = "Recall", type = {"spell/conveyance",3}, + require = spells_req3, points = 5, mana = 30, cooldown = 10, @@ -104,7 +105,6 @@ newTalent{ game.log("IMPLEMENT ME!") return true end, - require = { stat = { mag=34 }, }, info = function(self, t) return ([[Recalls you to your home town after a few turns.]]) end, @@ -114,6 +114,7 @@ newTalent{ name = "Probability Travel", type = {"spell/conveyance",4}, mode = "sustained", + require = spells_req4, points = 1, points = 2, cooldown = 40, @@ -129,7 +130,6 @@ newTalent{ self:attr("prob_travel", -1) return true end, - require = { stat = { mag=34 }, }, info = function(self, t) return ([[When you hit a solid surface this spell tears down the laws of probability to make you instantly appear on the other side.]]) end, diff --git a/game/modules/tome/data/talents/spells/earth.lua b/game/modules/tome/data/talents/spells/earth.lua index 744306c3b36da9dfb9acc6db8f568975c30e324c..ab6189d2ff34fdeab1e3dc4c9401bad89a113896 100644 --- a/game/modules/tome/data/talents/spells/earth.lua +++ b/game/modules/tome/data/talents/spells/earth.lua @@ -4,6 +4,7 @@ newTalent{ name = "Stone Skin", type = {"spell/earth", 1}, mode = "sustained", + require = spells_req1, points = 5, sustain_mana = 45, cooldown = 10, @@ -20,7 +21,6 @@ newTalent{ self:removeTemporaryValue("combat_armor", p.armor) return true end, - require = { stat = { mag=14 }, }, info = function(self, t) return ([[The caster skin grows as hard as stone, granting %d bonus to armor. The bonus to armor will increase with the Magic stat]]):format(4 + self:combatSpellpower(0.03) * self:getTalentLevel(t)) @@ -30,6 +30,7 @@ newTalent{ newTalent{ name = "Dig", type = {"spell/earth",2}, + require = spells_req2, points = 5, mana = 40, range = 20, @@ -42,7 +43,6 @@ newTalent{ end return true end, - require = { stat = { mag=24 } }, info = function(self, t) return ([[Digs up to %d grids into walls/trees/...]]):format(self:getTalentLevelRaw(t)) end, @@ -51,6 +51,7 @@ newTalent{ newTalent{ name = "Strike", type = {"spell/earth",3}, + require = spells_req3, points = 5, mana = 18, cooldown = 6, @@ -65,7 +66,6 @@ newTalent{ self:project(tg, x, y, DamageType.SPELLKNOCKBACK, self:spellCrit(8 + self:combatSpellpower(0.15) * self:getTalentLevel(t))) return true end, - require = { stat = { mag=24 }, }, info = function(self, t) return ([[Conjures up a fist of stone doing %0.2f physical damage and knocking the target back. The damage will increase with the Magic stat]]):format(8 + self:combatSpellpower(0.15) * self:getTalentLevel(t)) diff --git a/game/modules/tome/data/talents/spells/fire.lua b/game/modules/tome/data/talents/spells/fire.lua index b6600032661ebec4b9e768f608680b891a3c0d7b..04e6a5e3147dde0e4fa37d2ba9f9e853f801ad72 100644 --- a/game/modules/tome/data/talents/spells/fire.lua +++ b/game/modules/tome/data/talents/spells/fire.lua @@ -1,6 +1,7 @@ newTalent{ name = "Flame", type = {"spell/fire",1}, + require = spells_req1, points = 5, mana = 12, cooldown = 3, @@ -15,7 +16,6 @@ newTalent{ self:project(tg, x, y, DamageType.FIREBURN, self:spellCrit(25 + self:combatSpellpower(0.8) * self:getTalentLevel(t)), {type="flame"}) return true end, - require = { stat = { mag=10 }, }, info = function(self, t) return ([[Conjures up a bolt of fire setting the target ablaze and doing %0.2f fire damage over 3 turns. The damage will increase with the Magic stat]]):format(25 + self:combatSpellpower(0.8) * self:getTalentLevel(t)) @@ -25,6 +25,7 @@ newTalent{ newTalent{ name = "Globe of Light", type = {"spell/fire",2}, + require = spells_req2, points = 5, mana = 5, cooldown = 14, @@ -36,9 +37,9 @@ newTalent{ end return true end, - require = { stat = { mag=14 }, }, info = function(self, t) return ([[Creates a globe of pure light with a radius of %d that illuminates the area. + At level 3 it also blinds all who sees it (except the caster). The radius will increase with the Magic stat]]):format(5 + self:getTalentLevel(t)) end, } @@ -46,6 +47,7 @@ newTalent{ newTalent{ name = "Fireflash", type = {"spell/fire",3}, + require = spells_req3, points = 5, mana = 40, cooldown = 8, @@ -60,7 +62,6 @@ newTalent{ self:project(tg, x, y, DamageType.FIRE, self:spellCrit(28 + self:combatSpellpower(0.4) * self:getTalentLevel(t)), {type="flame"}) return true end, - require = { stat = { mag=20 } }, info = function(self, t) return ([[Conjures up a flash of fire doing %0.2f fire damage in a radius of %d. The damage will increase with the Magic stat]]):format(28 + self:combatSpellpower(0.4) * self:getTalentLevel(t), 1 + self:getTalentLevelRaw(t)) @@ -70,6 +71,7 @@ newTalent{ newTalent{ name = "Inferno", type = {"spell/fire",4}, + require = spells_req4, points = 5, mana = 200, cooldown = 30, @@ -95,7 +97,6 @@ newTalent{ ) return true end, - require = { stat = { mag=34 } }, info = function(self, t) return ([[Raging flames burn foes and allies alike doing %0.2f netherflame damage in a radius of 5 each turns for %d turns. The damage and duration will increase with the Magic stat]]):format(15 + self:combatSpellpower(0.15) * self:getTalentLevel(t), 5 + self:getTalentLevel(t)) diff --git a/game/modules/tome/data/talents/spells/nature.lua b/game/modules/tome/data/talents/spells/nature.lua index f26b95ff40639177a37d742f42e9d6f8db2204f1..3febae718372451a2354ef60735b32613981cab8 100644 --- a/game/modules/tome/data/talents/spells/nature.lua +++ b/game/modules/tome/data/talents/spells/nature.lua @@ -1,6 +1,7 @@ newTalent{ name = "Regeneration", type = {"spell/nature", 1}, + require = spells_req1, points = 5, mana = 30, cooldown = 10, @@ -11,7 +12,6 @@ newTalent{ self:setEffect(self.EFF_REGENERATION, 10, {power=5 + self:combatSpellpower(0.07) * self:getTalentLevel(t)}) return true end, - require = { stat = { mag=10 }, }, info = function(self, t) return ([[Call upon the forces of nature to regenerate your body for %d life every turns for 10 turns. The life healed will increase with the Magic stat]]):format(5 + self:combatSpellpower(0.07) * self:getTalentLevel(t)) @@ -21,6 +21,7 @@ newTalent{ newTalent{ name = "Heal", type = {"spell/nature", 2}, + require = spells_req2, points = 5, mana = 60, cooldown = 10, @@ -31,7 +32,6 @@ newTalent{ self:heal(self:spellCrit(10 + self:combatSpellpower(0.5) * self:getTalentLevel(t)), self) return true end, - require = { stat = { mag=20 }, }, info = function(self, t) return ([[Call upon the forces of nature to heal your body for %d life. The life healed will increase with the Magic stat]]):format(10 + self:combatSpellpower(0.5) * self:getTalentLevel(t)) diff --git a/game/modules/tome/data/talents/spells/spells.lua b/game/modules/tome/data/talents/spells/spells.lua index 0e5ea785c1921a68c1d1b6e1cfae7c2ac918c3e0..d76a9b6b9aed12a754e1b9d13012a5a8b5a0966c 100644 --- a/game/modules/tome/data/talents/spells/spells.lua +++ b/game/modules/tome/data/talents/spells/spells.lua @@ -12,6 +12,29 @@ newTalentType{ type="spell/temporal", name = "temporal", description = "Temporal newTalentType{ type="spell/mind", name = "mind", description = "Mind the caster to directly attack the mind of its foes." } newTalentType{ type="spell/necromancy", name = "necromancy", description = "Necromancy is a dark school of magic dealing with death, and undeath." } +-- Generic requires for spells based on talent level +-- +spells_req1 = { + stat = { mag=function(level) return 12 + (level-1) * 2 end }, + level = function(level) return 0 + (level-1) end, +} +spells_req2 = { + stat = { mag=function(level) return 20 + (level-1) * 2 end }, + level = function(level) return 4 + (level-1) end, +} +spells_req3 = { + stat = { mag=function(level) return 28 + (level-1) * 2 end }, + level = function(level) return 8 + (level-1) end, +} +spells_req4 = { + stat = { mag=function(level) return 36 + (level-1) * 2 end }, + level = function(level) return 12 + (level-1) end, +} +spells_req5 = { + stat = { mag=function(level) return 44 + (level-1) * 2 end }, + level = function(level) return 16 + (level-1) end, +} + load("/data/talents/spells/arcane.lua") load("/data/talents/spells/fire.lua") load("/data/talents/spells/earth.lua") diff --git a/game/modules/tome/data/talents/spells/water.lua b/game/modules/tome/data/talents/spells/water.lua index a6b95b5461f06399d051175aace61f81c4a61c32..e3e95e53398b9a0b8db5191e3b03ab1af206b602 100644 --- a/game/modules/tome/data/talents/spells/water.lua +++ b/game/modules/tome/data/talents/spells/water.lua @@ -1,21 +1,7 @@ -newTalent{ - name = "Ent-draught", - type = {"spell/water", 1}, - points = 5, - mana = 10, - cooldown = 100, - action = function(self, t) - return true - end, - require = { stat = { mag=10 }, }, - info = function(self, t) - return ([[Confures some Ent-draught to fill your stomach.]]) - end, -} - newTalent{ name = "Freeze", - type = {"spell/water", 2}, + type = {"spell/water", 1}, + require = spells_req1, points = 5, mana = 14, cooldown = 3, @@ -31,16 +17,31 @@ newTalent{ self:project(tg, x, y, DamageType.FREEZE, 3 + math.floor(self:getTalentLevel(t) / 3)) return true end, - require = { stat = { mag=14 }, }, info = function(self, t) return ([[Condenses ambiant water on a target, freezing it for a short while and damaging it for %0.2f. The damage will increase with the Magic stat]]):format(12 + self:combatSpellpower(0.25) * self:getTalentLevel(t)) end, } +newTalent{ + name = "Ent-draught", + type = {"spell/water", 2}, + require = spells_req2, + points = 5, + mana = 10, + cooldown = 100, + action = function(self, t) + return true + end, + info = function(self, t) + return ([[Confures some Ent-draught to fill your stomach.]]) + end, +} + newTalent{ name = "Tidal Wave", type = {"spell/water",3}, + require = spells_req3, points = 5, mana = 55, cooldown = 8, @@ -65,7 +66,6 @@ newTalent{ ) return true end, - require = { stat = { mag=24 }, }, info = function(self, t) return ([[A furious ice storm rages around the caster doing %0.2f cold damage in a radius of 3 each turns for %d turns. The damage and duration will increase with the Magic stat]]):format(5 + self:combatSpellpower(0.2) * self:getTalentLevel(t), 5 + self:combatSpellpower(0.01) * self:getTalentLevel(t)) @@ -75,6 +75,7 @@ newTalent{ newTalent{ name = "Ice Storm", type = {"spell/water",4}, + require = spells_req4, points = 5, mana = 100, cooldown = 30, @@ -100,7 +101,6 @@ newTalent{ ) return true end, - require = { stat = { mag=34 }, }, info = function(self, t) return ([[A furious ice storm rages around the caster doing %0.2f cold damage in a radius of 3 each turns for %d turns. It has 25%% chance to freeze damaged targets. diff --git a/ideas/spells.ods b/ideas/spells.ods index f6c8870614f04668f10f920137b3bcb47e76e9b2..a0cedd779c9b9ac0ea7b9265e29828e941018c95 100644 Binary files a/ideas/spells.ods and b/ideas/spells.ods differ