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

New class: Alchemists, mage subclass, available from start

git-svn-id: http://svn.net-core.org/repos/t-engine4@907 51575b47-30f0-44d4-a5cc-537603b46e54
parent 5c45fdb7
No related branches found
No related tags found
No related merge requests found
......@@ -571,7 +571,7 @@ function _M:die(src)
if src and src.resolveSource and src:resolveSource().player then
-- Achievements
local p = src:resolveSource()
if math.floor(p.life) <= 1 then world:gainAchievement("THAT_WAS_CLOSE", p) end
if math.floor(p.life) <= 1 and not p.dead then world:gainAchievement("THAT_WAS_CLOSE", p) end
world:gainAchievement("EXTERMINATOR", p, self)
world:gainAchievement("PEST_CONTROL", p, self)
......
......@@ -175,7 +175,7 @@ function _M:getTextualDesc()
desc[#desc+1] = ""
end
local w = self.wielder or {}
local desc_wielder = function(w)
if w.combat_atk or w.combat_dam or w.combat_apr then desc[#desc+1] = ("Attack %d, Armor Penetration %d, Physical Crit %d%%, Physical power %d"):format(w.combat_atk or 0, w.combat_apr or 0, w.combat_physcrit or 0, w.combat_dam or 0) end
if w.combat_armor or w.combat_def then desc[#desc+1] = ("Armor %d, Defense %d"):format(w.combat_armor or 0, w.combat_def or 0) end
if w.fatigue then desc[#desc+1] = ("Fatigue %d%%"):format(w.fatigue) end
......@@ -274,6 +274,26 @@ function _M:getTextualDesc()
if w.see_invisible then desc[#desc+1] = ("See invisible: %d"):format(w.see_invisible) end
if w.invisible then desc[#desc+1] = ("Invisibility: %d"):format(w.invisible) end
end
desc_wielder(self.wielder or {})
if self.imbue_powers then
desc[#desc+1] = "When used to imbue an armour:"
desc_wielder(self.imbue_powers)
end
if self.alchemist_bomb then
local a = self.alchemist_bomb
desc[#desc+1] = "When used as an alchemist bomb:"
if a.power then desc[#desc+1] = ("Bomb damage +%d%%"):format(a.power) end
if a.range then desc[#desc+1] = ("Bomb thrown range +%d"):format(a.range) end
if a.mana then desc[#desc+1] = ("Mana regain %d"):format(a.mana) end
if a.daze then desc[#desc+1] = ("%d%% chance to daze for %d turns"):format(a.daze.chance, a.daze.dur) end
if a.stun then desc[#desc+1] = ("%d%% chance to stun for %d turns"):format(a.stun.chance, a.stun.dur) end
if a.splash then desc[#desc+1] = ("Additional %d %s damage"):format(a.splash.dam, DamageType:get(DamageType[a.splash.type]).name) end
if a.leech then desc[#desc+1] = ("Life regen %d%% of max life"):format(a.leech) end
end
local use_desc = self:getUseDesc()
if use_desc then desc[#desc+1] = use_desc end
......
......@@ -113,7 +113,7 @@ newGem("Onyx", 3, 12, "black", 20, 30, 3, 50,
)
newGem("Amethyst", 2, 10, "violet", 10, 20, 2, 35,
{ inc_damage = {all=4} },
{ splash={type="ARCANE", dam=10}}
{ splash={type="ARCANE", dam=25}}
)
newGem("Opal", 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_CUN] = 2, } },
......@@ -121,7 +121,7 @@ newGem("Opal", 2, 10, "blue", 10, 20, 2, 35,
)
newGem("Topaz", 2, 10, "blue", 10, 20, 2, 35,
{ combat_def=4 },
{}
{ range=3 }
)
newGem("Aquamarine", 2, 10, "blue", 10, 20, 2, 35,
{ resists = {all=4} },
......@@ -129,7 +129,7 @@ newGem("Aquamarine", 2, 10, "blue", 10, 20, 2, 35,
)
newGem("Ametrine", 1, 8, "yellow", 1, 10, 1, 20,
{ inc_damage = {all=2} },
{}
{ splash={type="LITE", dam=1} }
)
newGem("Zircon", 1, 8, "yellow", 1, 10, 1, 20,
{ resists = {all=2} },
......
......@@ -84,6 +84,15 @@ newTalent{
self.alchemy_golem.name = "golem (servant of "..self.name..")"
self.alchemy_golem.summoner = self
self.alchemy_golem.summoner_gain_exp = true
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 5, true, {[Map.ACTOR]=true})
if not x then
game.logPlayer(self, "Not enough space to refit!")
return
end
game.zone:addEntity(game.level, self.alchemy_golem, "actor", x, y)
return
end
local wait = function()
......
No preview for this file type
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