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

Removed the Pyromancer, Cryomancer, Geomancer and Tempest classes; instead...

Removed the Pyromancer, Cryomancer, Geomancer and Tempest classes; instead unlocking them will grant all new Archmages access to the corresponding trees (which are bumped to level 10 trees)


git-svn-id: http://svn.net-core.org/repos/t-engine4@2229 51575b47-30f0-44d4-a5cc-537603b46e54
parent 93c3cabb
No related branches found
No related tags found
No related merge requests found
Showing
with 160 additions and 134 deletions
......@@ -244,3 +244,45 @@ function load(str, delayloading)
end
return obj
end
--- "Reloads" a cloneFull result object
-- This will make sure each object and subobject method :loaded() is called
function _M:cloneReloaded()
local delay_load = {}
local seen = {}
local function reload(obj)
-- print("setting obj class", obj.__CLASSNAME)
setmetatable(obj, {__index=require(obj.__CLASSNAME)})
if obj.loaded then
-- print("loader found for class", obj, obj.__CLASSNAME)
if not obj.loadNoDelay then
delay_load[#delay_load+1] = obj
else
obj:loaded()
end
end
end
local function recurs(t)
if seen[t] then return end
seen[t] = true
for k, e in pairs(t) do
if type(k) == "table" then
recurs(k)
if k.__CLASSNAME then reload(k) end
end
if type(e) == "table" then
recurs(e)
if e.__CLASSNAME then reload(e) end
end
end
end
-- Start reloading
recurs(self)
reload(self)
-- Computed delayed loads
for i = 1, #delay_load do delay_load[i]:loaded() end
end
......@@ -541,6 +541,8 @@ function _M:changeLevel(lev, zone, keep_old_lev, force_down)
-- Autosave
if config.settings.tome.autosave and left_zone and left_zone.short_name ~= "wilderness" and left_zone.short_name ~= self.zone.short_name then self:saveGame() end
self.player:onEnterLevelEnd(self.zone, self.level)
end
function _M:getPlayer()
......
......@@ -122,6 +122,20 @@ function _M:onEnterLevel(zone, level)
for i, eff_id in ipairs(effs) do self:removeEffect(eff_id) end
end
function _M:onEnterLevelEnd(zone, level)
-- Clone level when they are made, for chronomancy
if self:attr("level_cloning") then
local d = Dialog:simplePopup("Chronomancy", "Folding the space time structure...")
d.__showup = nil
core.display.forceRedraw()
local clone = level:cloneFull()
level.backup = clone
game:unregisterDialog(d)
end
end
function _M:onLeaveLevel(zone, level)
-- Fail past escort quests
local eid = "escort-duty-"..zone.short_name.."-"..level.level
......
......@@ -30,11 +30,11 @@ newBirthDescriptor{
__ALL__ = "disallow",
Archmage = function() return profile.mod.allow_build.mage and "allow" or "disallow" end,
Alchemist = "allow",
Pyromancer = function() return profile.mod.allow_build.mage_pyromancer and "allow" or "disallow" end,
Cryomancer = function() return profile.mod.allow_build.mage_cryomancer and "allow" or "disallow" end,
Tempest = function() return profile.mod.allow_build.mage_tempest and "allow" or "disallow" end,
Geomancer = function() return profile.mod.allow_build.mage_geomancer and "allow" or "disallow" end,
Maelstrom = function() return profile.mod.allow_build.mage_maelstrom and "allow" or "disallow" end,
-- Pyromancer = function() return profile.mod.allow_build.mage_pyromancer and "allow" or "disallow" end,
-- Cryomancer = function() return profile.mod.allow_build.mage_cryomancer and "allow" or "disallow" end,
-- Tempest = function() return profile.mod.allow_build.mage_tempest and "allow" or "disallow" end,
-- Geomancer = function() return profile.mod.allow_build.mage_geomancer and "allow" or "disallow" end,
-- Maelstrom = function() return profile.mod.allow_build.mage_maelstrom and "allow" or "disallow" end,
},
},
copy = {
......@@ -87,6 +87,12 @@ newBirthDescriptor{
{type="weapon", subtype="staff", name="elm staff", autoreq=true},
{type="armor", subtype="cloth", name="linen robe", autoreq=true},
},
resolvers.generic(function(self)
if profile.mod.allow_build.mage_pyromancer then self:learnTalentType("spell/wildfire", false, 1.3) end
if profile.mod.allow_build.mage_cryomancer then self:learnTalentType("spell/ice", false, 1.3) end
if profile.mod.allow_build.mage_geomancer then self:learnTalentType("spell/stone", false, 1.3) end
if profile.mod.allow_build.mage_tempest then self:learnTalentType("spell/storm", false, 1.3) end
end),
},
copy_add = {
life_rating = -4,
......
......@@ -17,7 +17,7 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalent{
name = "Backtrack",
type = {"chronomancy/timetravel", 1},
......@@ -122,53 +122,39 @@ newTalent{
type = {"chronomancy/timetravel", 4},
require = chrono_req4,
points = 5,
mode = "sustained",
sustain_mana = 170,
cooldown = 15,
tactical = {
ATTACKAREA = 10,
},
range = 5,
do_storm = function(self, t)
if self:getMana() <= 0 then
local old = self.energy.value
self.energy.value = 100000
self:useTalent(self.T_THUNDERSTORM)
self.energy.value = old
return
paradox = 100,
cooldown = 100,
no_npc_use = true,
on_learn = function(self, t)
self:attr("level_cloning", 1)
end,
on_unlearn = function(self, t)
self:attr("level_cloning", -1)
end,
action = function(self, t)
if not game.level.backup then
game.logSeen(self, "#LIGHT_RED#The spell fizzles.")
end
local tgts = {}
local grids = core.fov.circle_grids(self.x, self.y, 5, true)
for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
local a = game.level.map(x, y, Map.ACTOR)
if a and self:reactionToward(a) < 0 then
tgts[#tgts+1] = a
end
end end
game:onTickEnd(function()
local level = game.level.backup
level:cloneReloaded()
-- Look for the "old" player
for uid, e in pairs(level.entities) do
if e.game_ender then
game.level = level
game.player:replaceWith(e)
game.player:move(game.player.x, game.player.y, true)
game.logPlayer(game.player, "#LIGHT_BLUE#You unfold the space time continuum to a previous state!")
-- Randomly take targets
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
for i = 1, math.floor(self:getTalentLevel(t)) do
if #tgts <= 0 then break end
local a, id = rng.table(tgts)
table.remove(tgts, id)
-- Manualy start the cooldown of the "old player"
game.player:startTalentCooldown(t)
return
end
end
self:project(tg, a.x, a.y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(self:combatTalentSpellDamage(t, 15, 80)), 3))
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(a.x-self.x), math.abs(a.y-self.y)), "lightning", {tx=a.x-self.x, ty=a.y-self.y})
game:playSoundNear(self, "talents/lightning")
end
end,
activate = function(self, t)
game:playSoundNear(self, "talents/thunderstorm")
game.logSeen(self, "#0080FF#A furious lightning storm forms around %s!", self.name)
return {
drain = self:addTemporaryValue("mana_regen", -3 * self:getTalentLevelRaw(t)),
}
end,
deactivate = function(self, t, p)
game.logSeen(self, "#0080FF#The furious lightning storm around %s calms down and disappears.", self.name)
self:removeTemporaryValue("mana_regen", p.drain)
game.logPlayer(self, "#LIGHT_RED#The space time continuum seems to be too disturted to use.")
end)
return true
end,
info = function(self, t)
......
......@@ -20,7 +20,7 @@
newTalent{
name = "Ice Shards",
type = {"spell/ice",1},
require = spells_req1,
require = spells_req_high1,
points = 5,
mana = 12,
cooldown = 3,
......@@ -58,7 +58,7 @@ newTalent{
newTalent{
name = "Frozen Ground",
type = {"spell/ice",2},
require = spells_req2,
require = spells_req_high2,
points = 5,
mana = 25,
cooldown = 10,
......@@ -85,7 +85,7 @@ newTalent{
newTalent{
name = "Shatter",
type = {"spell/ice",3},
require = spells_req3,
require = spells_req_high3,
points = 5,
mana = 25,
cooldown = 15,
......@@ -142,7 +142,7 @@ newTalent{
newTalent{
name = "Uttercold",
type = {"spell/ice",4},
require = spells_req4,
require = spells_req_high4,
points = 5,
mode = "sustained",
sustain_mana = 50,
......
......@@ -20,7 +20,7 @@
newTalent{
name = "Earthen Missiles",
type = {"spell/stone",1},
require = spells_req1,
require = spells_req_high1,
points = 5,
random_ego = "attack",
mana = 10,
......@@ -63,7 +63,7 @@ newTalent{
local count = 2
if self:getTalentLevel(t) >= 5 then
count = count + 1
end
end
local damage = t.getDamage(self, t)
return ([[Conjures %d missile shaped rocks that you target individually at any target or targets in range. Each missile deals %0.2f physical damage and an additional %0.2f bleeding damage every turn for 5 turns.
At talent level 5 you can conjure one additional missle.
......@@ -74,7 +74,7 @@ newTalent{
newTalent{
name = "Body of Stone",
type = {"spell/stone",2},
require = spells_req2,
require = spells_req_high2,
points = 5,
mode = "sustained",
sustain_mana = 70,
......@@ -129,7 +129,7 @@ newTalent{
newTalent{
name = "Earthquake",
type = {"spell/stone",3},
require = spells_req3,
require = spells_req_high3,
points = 5,
random_ego = "attack",
mana = 50,
......@@ -175,7 +175,7 @@ newTalent{
newTalent{
name = "Crystalline Focus",
type = {"spell/stone",4},
require = spells_req4,
require = spells_req_high4,
points = 5,
mode = "sustained",
sustain_mana = 50,
......
......@@ -20,7 +20,7 @@
newTalent{
name = "Nova",
type = {"spell/storm",1},
require = spells_req1,
require = spells_req_high1,
points = 5,
mana = 12,
cooldown = 8,
......@@ -34,7 +34,7 @@ newTalent{
action = function(self, t)
local tg = {type="ball", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
local dam = self:spellCrit(t.getDamage(self, t))
self:project(tg, self.x, self.y, DamageType.LIGHTNING_DAZE, rng.avg(dam / 3, dam, 3))
self:project(tg, self.x, self.y, DamageType.LIGHTNING_DAZE, {daze=75, rng.avg(dam / 3, dam, 3)})
local x, y = self.x, self.y
-- Lightning ball gets a special treatment to make it look neat
local sradius = (tg.radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
......@@ -52,7 +52,7 @@ newTalent{
end,
info = function(self, t)
local dam = damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t))
return ([[A lightning emanates from you in a circual wave, doing %0.2f to %0.2f lightning damage and possibly dazing them.
return ([[A lightning emanates from you in a circual wave, doing %0.2f to %0.2f lightning damage and possibly dazing them (75%% chance).
The damage will increase with the Magic stat]]):format(dam / 3, dam)
end,
}
......@@ -60,7 +60,7 @@ newTalent{
newTalent{
name = "Shock",
type = {"spell/storm",2},
require = spells_req2,
require = spells_req_high2,
points = 5,
mana = 8,
cooldown = 3,
......@@ -90,7 +90,7 @@ newTalent{
newTalent{
name = "Hurricane",
type = {"spell/storm",3},
require = spells_req3,
require = spells_req_high3,
points = 5,
mode = "sustained",
sustain_mana = 100,
......@@ -102,7 +102,7 @@ newTalent{
direct_hit = true,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 25, 150) end,
getChance = function(self, t) return 30 + self:getTalentLevel(t) * 5 end,
getRadius = function(self, t)
getRadius = function(self, t)
local radius = 2
if self:getTalentLevel(t) >= 3 then radius = 3 end
return radius
......@@ -122,7 +122,7 @@ newTalent{
info = function(self, t)
local damage = t.getDamage(self, t)
local chance = t.getChance(self, t)
local radius = t.getRadius(self, t)
local radius = t.getRadius(self, t)
return ([[Each time one of your lightning spell dazes a target it has %d%% chances to creates a chain reaction that summons a mighty Hurricane that last for 10 turns around the target with radius of %d.
Each turn all creatures around it will take %0.2f to %0.2f lightning damage.
Only 2 hurricanes can exist at the same time.
......@@ -133,7 +133,7 @@ newTalent{
newTalent{
name = "Tempest",
type = {"spell/storm",4},
require = spells_req4,
require = spells_req_high4,
points = 5,
mode = "sustained",
sustain_mana = 50,
......
......@@ -20,7 +20,7 @@
newTalent{
name = "Blastwave",
type = {"spell/wildfire",1},
require = spells_req1,
require = spells_req_high1,
points = 5,
mana = 12,
cooldown = 5,
......@@ -48,7 +48,7 @@ newTalent{
newTalent{
name = "Dancing Fires",
type = {"spell/wildfire",2},
require = spells_req2,
require = spells_req_high2,
points = 5,
mana = 35,
cooldown = 16,
......@@ -85,7 +85,7 @@ newTalent{
newTalent{
name = "Combust",
type = {"spell/wildfire",3},
require = spells_req3,
require = spells_req_high3,
points = 5,
mana = 40,
cooldown = 14,
......@@ -131,7 +131,7 @@ newTalent{
newTalent{
name = "Wildfire",
type = {"spell/wildfire",4},
require = spells_req4,
require = spells_req_high4,
points = 5,
mode = "sustained",
sustain_mana = 50,
......
......@@ -17,22 +17,16 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return "New Class: #LIGHT_GREEN#Cryomancer",
[[
Magic has not disappeared from Maj'Eyal with the end of the Spellhunt.
return "New Talent Category: #LIGHT_GREEN#Ice",
[[Since the dawn of time mages have experimented with the elements.
While most mages are content using the Water school, a few of them took their research deeper and created Ice magic.
At its core lies the Uttercold, a cold so cold it can even damage creatures normaly immune.
During the Age of Dusk, as the Spellhunt was nearing its end, a powerful mage of the Kar'Krul, Linaniil, created a safe haven for the few remaining mages of all races.
This place is Angolwen, the City of Magic, and for over two thousands years has taught magic to preserve and expand it.
You have mastered ice magic and can now create new Archmage characters that can learn the #LIGHT_GREEN#Ice talents#WHITE#.
You have uncovered the secrets of the ice magic and can now create new characters with the #LIGHT_GREEN#Cryomancer class#WHITE#.
Cryomancers are specialized archmagi, attuned to the magical properties of ice.
Class features:#YELLOW#
- Cast potent ice spells to freeze your foes.
- Freeze your foes and make them shatter into pieces.
- Learn to master the Uttercold, a cold so deep it can pierce even those resistant to normal cold.
- Manipulate the forces of magic themselves#WHITE#
All mages use mana to cast their spells.
It slowly replenishes over time.
Talents:
- #YELLOW#Ice Shards: #WHITE#Fires slow moving ice crystals at a target area, each hit has a chance to freeze
- #YELLOW#Frozen Ground: #WHITE#Unleash a nova of ice on the ground, stopping the movements of anything caught inside
- #YELLOW#Shatter: #WHITE#Shatters all frozen creatures in your sight, dealing increased damage or even killing them
- #YELLOW#Uttercold: #WHITE#Master the Uttercold and pierce even through cold immunities
]]
......@@ -17,22 +17,16 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return "New Class: #LIGHT_GREEN#Geomancer",
[[
Magic has not disappeared from Maj'Eyal with the end of the Spellhunt.
return "New Talent Category: #LIGHT_GREEN#Stone",
[[Since the dawn of time mages have experimented with the elements.
While most mages are content using the Earth school, a few of them took their research deeper and created Stone magic.
At its core lies the Crystalline Focus, which can create attacks so sharp they can cut throught physical immunity.
During the Age of Dusk, as the Spellhunt was nearing its end, a powerful mage of the Kar'Krul, Linaniil, created a safe haven for the few remaining mages of all races.
This place is Angolwen, the City of Magic, and for over two thousands years has taught magic to preserve and expand it.
You have mastered stone magic and can now create new Archmage characters that can learn the #LIGHT_GREEN#Stone talents#WHITE#.
You have uncovered the secrets of the stone magic by killing the earth elemental Harkor'Zun and can now create new characters with the #LIGHT_GREEN#Geomancer class#WHITE#.
Geomancers are specialized archmagi, attuned to the magical properties of stone.
Class features:#YELLOW#
- Turn your body into stone, making you immovable but providing many benefits.
- Unleash earthquakes on your foes.
- Learn to master the Crystalline Focus, making your physical attacks so powerful they can damage even those resistant to normal physical damage.
- Manipulate the forces of magic themselves#WHITE#
All mages use mana to cast their spells.
It slowly replenishes over time.
Talents:
- #YELLOW#Earthen Missiles: #WHITE#Fires multiple missiles of stone indepentanly to targets
- #YELLOW#Body of Stone: #WHITE#Turn into stone, reducing the cooldown of many stone/earth talents
- #YELLOW#Earthquake: #WHITE#Create a localized earthquake, stunning all in the area
- #YELLOW#Crystalline Focus: #WHITE#Master the Stone and pierce even through physical immunities
]]
......@@ -17,22 +17,16 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return "New Class: #LIGHT_GREEN#Pyromancer",
[[
Magic has not disappeared from Maj'Eyal with the end of the Spellhunt.
return "New Talent Category: #LIGHT_GREEN#Wildfire",
[[Since the dawn of time mages have experimented with the elements.
While most mages are content using the Fire school, a few of them took their research deeper and created Wildfire magic.
At its core lies the Wildfire, a fire so hot it can even damage creatures normaly immune.
During the Age of Dusk, as the Spellhunt was nearing its end, a powerful mage of the Kar'Krul, Linaniil, created a safe haven for the few remaining mages of all races.
This place is Angolwen, the City of Magic, and for over two thousands years has taught magic to preserve and expand it.
You have mastered wildfire magic and can now create new Archmage characters that can learn the #LIGHT_GREEN#Wildfire talents#WHITE#.
You have uncovered the secrets of the fire magic and can now create new characters with the #LIGHT_GREEN#Pyromancer class#WHITE#.
Pyromancers are specialized archmagi, attuned to the magical properties of fire.
Class features:#YELLOW#
- Cast potent fire spells to burn your foes to ashes.
- Set all your foes ablaze and make the fire consume them.
- Learn to master the Wildfire, a fire so hot it can burn even those resistant to normal fire.
- Manipulate the forces of magic themselves#WHITE#
All mages use mana to cast their spells.
It slowly replenishes over time.
Talents:
- #YELLOW#Blastwave: #WHITE#Unleash a fire nova around you, damaging and knocking back anything caught inside
- #YELLOW#Dancing Fires: #WHITE#Project your inner fire to all creatures in your line of sight, setting them ablaze
- #YELLOW#Combust: #WHITE#Disrupt normal burning effects and make them combust at once
- #YELLOW#Wildfire: #WHITE#Master the Wildfire and pierce even through fire immunities
]]
......@@ -17,22 +17,16 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return "New Class: #LIGHT_GREEN#Tempest",
[[
Magic has not disappeared from Maj'Eyal with the end of the Spellhunt.
return "New Talent Category: #LIGHT_GREEN#Storm",
[[Since the dawn of time mages have experimented with the elements.
While most mages are content using the Air school, a few of them took their research deeper and created Storm magic.
At its core lies the Tempest, a storm so powerful it can even damage creatures normaly immune.
During the Age of Dusk, as the Spellhunt was nearing its end, a powerful mage of the Kar'Krul, Linaniil, created a safe haven for the few remaining mages of all races.
This place is Angolwen, the City of Magic, and for over two thousands years has taught magic to preserve and expand it.
You have mastered storm magic and can now create new Archmage characters that can learn the #LIGHT_GREEN#Storm talents#WHITE#.
You have uncovered the secrets of the storm magic and can now create new characters with the #LIGHT_GREEN#Tempest class#WHITE#.
Tempests are specialized archmagi, attuned to the magical properties of lightning.
Class features:#YELLOW#
- Cast potent lightning spells to zap your foes to death.
- Unleash hurricanes and novas on your foes, making them all explode.
- Learn to master the Tempest, a lightning so powerful it can damage even those resistant to normal lightning.
- Manipulate the forces of magic themselves#WHITE#
All mages use mana to cast their spells.
It slowly replenishes over time.
Talents:
- #YELLOW#Nova: #WHITE#Unleash of lightning nova around you, dazing and damaging creatures caught inside
- #YELLOW#Shock: #WHITE#Fire a fast bolt of lightning, dazing the target
- #YELLOW#Hurricane: #WHITE#Call down a Hurricane on any creature you daze, creating a lightning storm around each of them
- #YELLOW#Tempest: #WHITE#Master the Tempest and pierce even through lightning immunities
]]
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