Skip to content
Snippets Groups Projects
Commit 50b9fcd7 authored by dg's avatar dg
Browse files

drake talents

git-svn-id: http://svn.net-core.org/repos/t-engine4@455 51575b47-30f0-44d4-a5cc-537603b46e54
parent 4f722ecc
No related branches found
No related tags found
No related merge requests found
Showing
with 244 additions and 33 deletions
......@@ -178,6 +178,6 @@ function _M:canProject(t, x, y)
-- Ok if we are at the end reset lx and ly for the next code
if not lx and not ly then lx, ly = x, y end
if lx == x and ly == y then return true end
return false
if lx == x and ly == y then return true, lx, ly end
return false, lx, ly
end
......@@ -11,7 +11,7 @@ newBirthDescriptor{
{
__ALL__ = "never",
Summoner = "allow",
["Drake-touched"] = "allow",
Wyrmic = "allow",
},
},
copy = {
......@@ -22,25 +22,27 @@ newBirthDescriptor{
type = "subclass",
name = "Summoner",
desc = {
"",
"Their most important stats are: Willpower",
"Summoners never fight alone, they are always ready to invoke one of their many summons to fight at their side.",
"Summons can range from a combat hound to a fire drake.",
"Their most important stats are: Willpower and Constitution",
},
stats = { wil=3, mag=2, cun=1, },
stats = { wil=3, con=2, cun=1, },
talents_types = {
["wild-gift/call"]={true, 0.1},
["wild-gift/call"]={true, 0.2},
["wild-gift/summon-melee"]={true, 0.3},
["wild-gift/summon-distance"]={true, 0.3},
["wild-gift/summon-utility"]={true, 0.3},
["wild-gift/summon-augmentation"]={true, 0.3},
["cunning/survival"]={false, 0},
["wild-gift/summon-augmentation"]={false, 0.3},
["cunning/survival"]={true, 0},
["technique/combat-techniques-active"]={false, 0},
["technique/combat-techniques-passive"]={false, 0},
["technique/combat-training"]={true, 0},
["technique/combat-training"]={false, 0},
},
talents = {
[ActorTalents.T_WAR_HOUND] = 1,
[ActorTalents.T_FIRE_IMP] = 1,
[ActorTalents.T_MEDITATION] = 1,
[ActorTalents.T_TRAP_DETECTION] = 1,
},
copy = {
max_life = 90,
......@@ -54,29 +56,37 @@ newBirthDescriptor{
newBirthDescriptor{
type = "subclass",
name = "Drake-touched",
name = "Wyrmic",
desc = {
"",
"Their most important stats are: Willpower",
"Wyrmics are fighters who have learnt how to mimic some of the aspects of the dragons.",
"They have access to talents normaly belonging to the various kind of drakes.",
"Their most important stats are: Strength and Willpower",
},
stats = { wil=3, mag=2, cun=1, },
stats = { str=3, wil=2, dex=1, },
talents_types = {
["wild-gift/call"]={true, 0.1},
["wild-gift/call"]={true, 0.2},
["wild-gift/sand-drake"]={true, 0.3},
["wild-gift/fire-drake"]={true, 0.3},
["wild-gift/cold-drake"]={true, 0.3},
["cunning/survival"]={false, 0},
["technique/shield-offense"]={false, -0.1},
["technique/2hweapon-offense"]={false, -0.1},
["technique/combat-techniques-active"]={false, 0},
["technique/combat-techniques-passive"]={false, 0},
["technique/combat-techniques-passive"]={true, 0},
["technique/combat-training"]={true, 0},
},
talents = {
[ActorTalents.T_ICE_CLAW] = 1,
[ActorTalents.T_BELLOWING_ROAR] = 1,
[ActorTalents.T_MEDITATION] = 1,
[ActorTalents.T_AXE_MASTERY] = 1,
},
copy = {
max_life = 110,
life_rating = 12,
resolvers.equip{ id=true,
{type="weapon", subtype="longsword", autoreq=true},
{type="weapon", subtype="battleaxe", name="iron battleaxe", autoreq=true},
{type="armor", subtype="light", name="rough leather armour", autoreq=true}
},
},
}
newTalent{
name = "Ice Claw",
type = {"wild-gift/cold-drake", 1},
require = gifts_req1,
points = 5,
equilibrium = 3,
cooldown = 7,
range = 1,
tactical = {
ATTACK = 10,
},
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
self:attackTargetWith(target, DamageType.COLD, 1.4 + self:getTalentLevel(t) / 8, true)
return true
end,
info = function(self, t)
return ([[You call upon the mighty claw of a cold drake, doing %d%% weapon damage as cold damage.]]):format(100 * (1.4 + self:getTalentLevel(t) / 8))
end,
}
newTalent{
name = "Icy Skin",
type = {"wild-gift/cold-drake", 2},
require = gifts_req2,
mode = "sustained",
points = 5,
sustain_equilibrium = 30,
cooldown = 10,
range = 20,
tactical = {
DEFEND = 10,
},
activate = function(self, t)
return {
onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.COLD]=5 * self:getTalentLevel(t)}),
armor = self:addTemporaryValue("combat_armor", 4 * self:getTalentLevel(t)),
}
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("on_melee_hit", p.onhit)
self:removeTemporaryValue("combat_armor", p.armor)
return true
end,
info = function(self, t)
return ([[Your skin forms icy scales, damaging all that hits your for %d cold damage and increasing your armor by %d.]]):format(5 * self:getTalentLevel(t), 4 * self:getTalentLevel(t))
end,
}
newTalent{
name = "Ice Wall",
type = {"wild-gift/cold-drake", 3},
require = gifts_req3,
points = 5,
equilibrium = 10,
cooldown = 30,
range = 20,
action = function(self, t)
return true
end,
info = function(self, t)
return ([[You slam your foot onto the ground, shaking the area around you in a radius of %d, damage and knocking back your foes.
The damage will increase with the Strength stat]]):format(2 + self:getTalentLevel(t) / 2)
end,
}
newTalent{
name = "Ice Breath",
type = {"wild-gift/cold-drake", 4},
require = gifts_req4,
points = 5,
equilibrium = 12,
cooldown = 12,
message = "@Source@ breathes ice!",
tactical = {
ATTACKAREA = 10,
},
range = 4,
action = function(self, t)
local tg = {type="cone", range=0, radius=4 + self:getTalentLevelRaw(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.ICE, 10 + self:getStr() * 0.3 * self:getTalentLevel(t), {type="freeze"})
return true
end,
info = function(self, t)
return ([[You breath ice in a frontal cone. Any target caught in the area will take %0.2f cold damage and can be frozen for a few turns.
The damage will increase with the Strength stat]]):format(10 + self:getStr() * 0.3 * self:getTalentLevel(t), 2+self:getTalentLevelRaw(t))
end,
}
newTalent{
name = "Bellowing Roar",
type = {"wild-gift/fire-drake", 1},
require = gifts_req1,
points = 5,
message = "@Source@ burrows into the ground!",
equilibrium = 3,
cooldown = 20,
range = 5,
tactical = {
DEFEND = 10,
},
action = function(self, t)
local tg = {type="ball", range=0, radius=2 + self:getTalentLevelRaw(t), friendlyfire=false, talent=t}
self:project(tg, self.x, self.y, DamageType.CONFUSION, {dur=3, dam=40 + 6 * self:getTalentLevel(t)}, {type="flame"})
return true
end,
info = function(self, t)
return ([[You let out a powerful roar that sends your foes into utter confusion for 3 turns in a radius of %d.]]):format(2 + self:getTalentLevelRaw(t))
end,
}
newTalent{
name = "Wing Buffet",
type = {"wild-gift/fire-drake", 2},
require = gifts_req2,
points = 5,
equilibrium = 7,
cooldown = 10,
range = 5,
tactical = {
DEFEND = 10,
},
action = function(self, t)
local tg = {type="cone", range=0, radius=4 + self:getTalentLevelRaw(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, self.x, self.y, DamageType.PHYSKNOCKBACK, {dam=15 + self:getStr() * 0.1 * self:getTalentLevel(t), dist=4})
return true
end,
info = function(self, t)
return ([[You summon a powerful gust of wind, knocking back your foes and damaging them for %d.]]):format(15 + self:getStr() * 0.1 * self:getTalentLevel(t))
end,
}
newTalent{
name = "Devouring Flame",
type = {"wild-gift/fire-drake", 3},
require = gifts_req3,
points = 5,
equilibrium = 10,
cooldown = 35,
tactical = {
ATTACKAREA = 10,
},
range = 20,
action = function(self, t)
local duration = 2 + self:getTalentLevelRaw(t)
local radius = 2
local dam = 10 + self:getWil() * 0.2 * self:getTalentLevel(t)
local tg = {type="ball", range=self:getTalentRange(t), radius=radius}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y)
-- Add a lasting map effect
game.level.map:addEffect(self,
x, y, duration,
DamageType.FIRE, dam,
radius,
5, nil,
engine.Entity.new{alpha=100, display='', color_br=180, color_bg=30, color_bb=60},
nil, true
)
return true
end,
info = function(self, t)
return ([[Spit a cloud of flames doing %0.2f fire damage in a radius of 2 each turn for %d turns.
The damage will increase with the Willpower stat]]):format(10 + self:getWil() * 0.2 * self:getTalentLevel(t), 2 + self:getTalentLevelRaw(t))
end,
}
newTalent{
name = "Fire Breath",
type = {"wild-gift/fire-drake", 4},
require = gifts_req4,
points = 5,
equilibrium = 12,
cooldown = 12,
message = "@Source@ breathes fire!",
tactical = {
ATTACKAREA = 10,
},
range = 4,
action = function(self, t)
local tg = {type="cone", range=0, radius=4 + self:getTalentLevelRaw(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.FIREBURN, 10 + self:getStr() * 0.3 * self:getTalentLevel(t), {type="flame"})
return true
end,
info = function(self, t)
return ([[You breath fire in a frontal cone. Any target caught in the area will take %0.2f fire damage over 3 turns.
The damage will increase with the Strength stat]]):format(10 + self:getStr() * 0.3 * self:getTalentLevel(t))
end,
}
......@@ -34,7 +34,9 @@ gifts_req5 = {
load("/data/talents/gifts/call.lua")
load("/data/talents/gifts/slime.lua")
load("/data/talents/gifts/sand.lua")
load("/data/talents/gifts/sand-drake.lua")
load("/data/talents/gifts/fire-drake.lua")
load("/data/talents/gifts/cold-drake.lua")
load("/data/talents/gifts/summon-melee.lua")
load("/data/talents/gifts/summon-distance.lua")
load("/data/talents/gifts/summon-utility.lua")
......
......@@ -93,7 +93,7 @@ newTalent{
if not x then return nil end
-- Target code doesnot restrict the self coordinates to the range, it lets the poject function do it
-- but we cant ...
x, y = game.target:pointAtRange(self.x, self.y, x, y, 20 + self:getTalentLevel(t))
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(self.x, self.y, 1, "slime")
self:teleportRandom(x, y, 7 - self:getTalentLevel(t))
game.level.map:particleEmitter(self.x, self.y, 1, "slime")
......
......@@ -106,7 +106,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......@@ -169,7 +169,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......@@ -222,11 +222,11 @@ newTalent{
}
newTalent{
name = "???",
name = "Warper",
type = {"wild-gift/summon-distance", 3},
require = gifts_req3,
points = 5,
message = "@Source@ summons a Fire Imp!",
message = "@Source@ summons a Warper!",
equilibrium = 2,
cooldown = 10,
range = 20,
......@@ -234,7 +234,8 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......@@ -299,7 +300,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......
......@@ -11,7 +11,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......@@ -69,7 +69,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......@@ -130,7 +130,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......@@ -197,7 +197,7 @@ newTalent{
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
tx, ty = game.target:pointAtRange(self.x, self.y, tx, ty, self:getTalentRange(t))
local _ _, tx, ty = self:canProject(tg, tx, ty)
if target == self then target = nil end
-- Find space
......
......@@ -41,7 +41,7 @@ newTalent{
local tg = {type="ball", range=self:getTalentRange(t), radius=radius}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
x, y = game.target:pointAtRange(self.x, self.y, x, y, 15)
local _ _, x, y = self:canProject(tg, x, y)
-- Add a lasting map effect
game.level.map:addEffect(self,
x, y, duration,
......
......@@ -24,7 +24,7 @@ newTalent{
if not x then return nil end
-- Target code doesnot restrict the target coordinates to the range, it lets the poject function do it
-- but we cant ...
x, y = game.target:pointAtRange(self.x, self.y, x, y, 10 + self:combatSpellpower(0.1))
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(target.x, target.y, 1, "teleport")
target:teleportRandom(x, y, 7 - self:getTalentLevel(t))
game.level.map:particleEmitter(target.x, target.y, 1, "teleport")
......@@ -69,7 +69,7 @@ newTalent{
if not x then return nil end
-- Target code doesnot restrict the target coordinates to the range, it lets the poject function do it
-- but we cant ...
x, y = game.target:pointAtRange(self.x, self.y, x, y, 100 + self:combatSpellpower(0.1))
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(target.x, target.y, 1, "teleport")
target:teleportRandom(x, y, 20 - self:getTalentLevel(t))
game.level.map:particleEmitter(target.x, target.y, 1, "teleport")
......
......@@ -89,7 +89,7 @@ newTalent{
local tg = {type="ball", range=self:getTalentRange(t), radius=radius}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
x, y = game.target:pointAtRange(self.x, self.y, x, y, 15)
local _ _, x, y = self:canProject(tg, x, y)
-- Add a lasting map effect
game.level.map:addEffect(self,
x, y, duration,
......
No preview for this file type
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