Skip to content
Snippets Groups Projects
Commit 94b53f71 authored by dg's avatar dg
Browse files

gem powers for bombs

git-svn-id: http://svn.net-core.org/repos/t-engine4@904 51575b47-30f0-44d4-a5cc-537603b46e54
parent b87b4b33
No related branches found
No related tags found
No related merge requests found
......@@ -53,71 +53,71 @@ end
newGem("Diamond", 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_CUN] = 5, } },
{}
{ power=25 }
)
newGem("Pearl", 5, 18, "white", 40, 50, 5, 70,
{ resists = {all=10} },
{}
{ splash={type="LITE", dam=1} }
)
newGem("Moonstone", 5, 18, "white", 40, 50, 5, 70,
{ combat_def=10 },
{}
{ stun={chance=20, dur=3} }
)
newGem("Fire Opal", 5, 18, "red", 40, 50, 5, 70,
{ inc_damage = {all=10} },
{}
{ splash={type="FIRE", dam=40} }
)
newGem("Bloodstone", 5, 18, "red", 40, 50, 5, 70,
{ stun_immune=0.6 },
{}
{ leech=10 }
)
newGem("Ruby", 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_CUN] = 4, } },
{}
{ power=20 }
)
newGem("Amber", 4, 16, "yellow", 30, 40, 4, 65,
{ inc_damage = {all=8} },
{}
{ stun={chance=10, dur=2} }
)
newGem("Turquoise", 4, 16, "green", 30, 40, 4, 65,
{ see_invisible=10 },
{}
{ splash={type="ACID", dam=30} }
)
newGem("Jade", 4, 16, "green", 30, 40, 4, 65,
{ resists = {all=8} },
{}
{ splash={type="SLOW", dam=-1 + 1 / (1 + 0.20)} }
)
newGem("Sapphire", 4, 16, "blue", 30, 40, 4, 65,
{ combat_def=8 },
{}
{ splash={type="ICE", dam=30} }
)
newGem("Quartz", 3, 12, "white", 20, 30, 3, 50,
{ stun_immune=0.3 },
{}
{ splash={type="SPELLKNOCKBACK", dam=10} }
)
newGem("Emerald", 3, 12, "green", 20, 30, 3, 50,
{ resists = {all=6} },
{}
{ splash={type="POISON", dam=50} }
)
newGem("Lapis Lazuli", 3, 12, "blue", 20, 30, 3, 50,
{ combat_def=6 },
{}
{ mana=30 }
)
newGem("Garnets", 3, 12, "red", 20, 30, 3, 50,
{ inc_damage = {all=6} },
{}
{ leech=5 }
)
newGem("Onyx", 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_CUN] = 3, } },
{}
{ power=15 }
)
newGem("Amethyst", 2, 10, "violet", 10, 20, 2, 35,
{ inc_damage = {all=4} },
{}
{ splash={type="ARCANE", dam=10}}
)
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, } },
{}
{ power=10 }
)
newGem("Topaz", 2, 10, "blue", 10, 20, 2, 35,
{ combat_def=4 },
......@@ -125,7 +125,7 @@ newGem("Topaz", 2, 10, "blue", 10, 20, 2, 35,
)
newGem("Aquamarine", 2, 10, "blue", 10, 20, 2, 35,
{ resists = {all=4} },
{}
{ mana=20 }
)
newGem("Ametrine", 1, 8, "yellow", 1, 10, 1, 20,
{ inc_damage = {all=2} },
......@@ -133,17 +133,17 @@ newGem("Ametrine", 1, 8, "yellow", 1, 10, 1, 20,
)
newGem("Zircon", 1, 8, "yellow", 1, 10, 1, 20,
{ resists = {all=2} },
{}
{ daze={chance=20, dur=3} }
)
newGem("Spinel", 1, 8, "green", 1, 10, 1, 20,
{ combat_def=2 },
{}
{ mana=10 }
)
newGem("Citrine", 1, 8, "yellow", 1, 10, 1, 20,
{ lite=1 },
{}
{ range=1 }
)
newGem("Agate", 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_CUN] = 1, } },
{}
{ power=5 }
)
......@@ -34,7 +34,7 @@ newTalent{
if self:isTalentActive(self.T_ACID_INFUSION) then inc_dam = self:getTalentLevel(self.T_ACID_INFUSION) * 0.05; damtype = DamageType.ACID; particle = "ball_acid"
elseif self:isTalentActive(self.T_LIGHTNING_INFUSION) then inc_dam = self:getTalentLevel(self.T_LIGHTNING_INFUSION) * 0.05; damtype = DamageType.LIGHTNING; particle = "ball_lightning"
elseif self:isTalentActive(self.T_FROST_INFUSION) then inc_dam = self:getTalentLevel(self.T_FROST_INFUSION) * 0.05; damtype = DamageType.ICE; particle = "ball_ice"
else inc_dam = self:getTalentLevel(self.T_FIRE_INFUSION) * 0.05
else inc_dam = self:getTalentLevel(self.T_FIRE_INFUSION) * 0.05 + (ammo.alchemist_bomb.power or 0) / 100
end
local dam = self:combatTalentSpellDamage(t, 15, 150, (ammo.alchemist_power + self:combatSpellpower()) / 2)
dam = dam * (1 + inc_dam)
......@@ -47,7 +47,7 @@ newTalent{
return
end
local tg = {type="ball", range=self:getTalentRange(t), radius=1+self:getTalentLevelRaw(self.T_EXPLOSION_EXPERT), talent=t}
local tg = {type="ball", range=self:getTalentRange(t)+(ammo.alchemist_bomb.range or 0), radius=1+self:getTalentLevelRaw(self.T_EXPLOSION_EXPERT), talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
......@@ -56,14 +56,28 @@ newTalent{
local dam, damtype, particle = t.computeDamage(self, t, ammo)
local prot = self:getTalentLevelRaw(self.T_ALCHEMIST_PROTECTION) * 0.2
local dam_done = 0
local grids = self:project(tg, x, y, function(tx, ty)
-- Protect yourself
local d = dam
if tx == self.x and ty == self.y then d = dam * (1 - prot) end
DamageType:get(damtype).projector(self, tx, ty, damtype, self:spellCrit(d))
local target = game.level.map(tx, ty, Map.ACTOR)
if not target then return end
if ammo.alchemist_bomb.splash then
DamageType:get(DamageType[ammo.alchemist_bomb.splash.type]).projector(self, tx, ty, DamageType[ammo.alchemist_bomb.splash.type], ammo.alchemist_bomb.splash.dam)
end
if ammo.alchemist_bomb.stun and rng.percent(ammo.alchemist_bomb.stun.chance) and target:checkHit(self:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 5) and target:canBe("stun") then
target:setEffect(target.EFF_STUNNED, ammo.alchemist_bomb.stun.dur, {})
end
if ammo.alchemist_bomb.daze and rng.percent(ammo.alchemist_bomb.daze.chance) and target:checkHit(self:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 5) and target:canBe("stun") then
target:setEffect(target.EFF_DAZED, ammo.alchemist_bomb.daze.dur, {})
end
end)
if ammo.alchemist_bomb.leech then self:heal(math.min(self.max_life * ammo.alchemist_bomb.leech / 100, dam_done)) end
local _ _, x, y = self:canProject(tg, x, y)
-- Lightning ball gets a special treatment to make it look neat
if particle == "ball_lightning" then
......@@ -80,6 +94,8 @@ newTalent{
game.level.map:particleEmitter(x, y, tg.radius, particle, {radius=tg.radius, grids=grids, tx=x, ty=y})
end
if ammo.alchemist_bomb.mana then self:incMana(ammo.alchemist_bomb.mana) end
game:playSoundNear(self, "talents/arcane")
return true
end,
......
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