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

sandpower

git-svn-id: http://svn.net-core.org/repos/t-engine4@327 51575b47-30f0-44d4-a5cc-537603b46e54
parent 51dc02bb
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,10 @@ function _M:act()
local air_level = game.level.map:checkEntity(self.x, self.y, Map.TERRAIN, "air_level")
if air_level then self:suffocate(-air_level, self) end
-- Regain natural balance?
local equilibrium_level = game.level.map:checkEntity(self.x, self.y, Map.TERRAIN, "equilibrium_level")
if equilibrium_level then self:incEquilibrium(equilibrium_level) end
-- Still enough energy to act ?
if self.energy.value < game.energy_to_act then return false end
......@@ -271,7 +275,7 @@ function _M:levelup()
if not self.fixed_rating then
rating = rng.range(math.floor(self.life_rating * 0.5), math.floor(self.life_rating * 1.5))
end
self.max_life = self.max_life + rating + 5
self.max_life = self.max_life + rating + 1 -- + 5
+ (self:knowTalent(self.T_IMPROVED_HEALTH_I) and 1 or 0)
+ (self:knowTalent(self.T_IMPROVED_HEALTH_II) and 1 or 0)
+ (self:knowTalent(self.T_IMPROVED_HEALTH_III) and 1 or 0)
......
......@@ -314,7 +314,7 @@ newDamageType{
newDamageType{
name = "sand", type = "SAND",
projector = function(src, x, y, type, dam)
DamageType:get(DamageType.PHYSICAL).projector(src, x, y, DamageType.PHYSICAL, dam)
DamageType:get(DamageType.PHYSICAL).projector(src, x, y, DamageType.PHYSICAL, dam.dam)
local target = game.level.map(x, y, Map.ACTOR)
if target then
if target:checkHit(src:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("blind") then
......
......@@ -6,15 +6,15 @@ quickEntity('t', {name='forest', display='#', color=colors.LIGHT_GREEN, image="t
quickEntity('v', {name='old forest', display='#', color=colors.GREEN, image="terrain/tree_dark1.png", block_move=true})
quickEntity('i', {name='iron mountains', display='^', color=colors.SLATE, image="terrain/mountain.png", block_move=true})
quickEntity('=', {name='the great sea', display='~', color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity('.', {name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"})
quickEntity('g', {name='Forodwaith, the cold lands', display='.', color=colors.LIGHT_BLUE})
quickEntity('q', {name='Icebay of Forochel', display=';', color=colors.LIGHT_BLUE})
quickEntity('.', {name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png", equilibrium_level=-10})
quickEntity('g', {name='Forodwaith, the cold lands', display='.', color=colors.LIGHT_BLUE, equilibrium_level=-10})
quickEntity('q', {name='Icebay of Forochel', display=';', color=colors.LIGHT_BLUE, equilibrium_level=-10})
quickEntity('w', {name='ash', display='.', color=colors.WHITE})
quickEntity('&', {name='hills', display='^', color=colors.GREEN, image="terrain/hills.png"})
quickEntity('h', {name='low hills', display='^', color=colors.GREEN, image="terrain/hills.png"})
quickEntity('&', {name='hills', display='^', color=colors.GREEN, image="terrain/hills.png", equilibrium_level=-10})
quickEntity('h', {name='low hills', display='^', color=colors.GREEN, image="terrain/hills.png", equilibrium_level=-10})
quickEntity(' ', {name='sea of Rhun', display='~', color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity('_', {name='river', display='~', color={r=0, g=80, b=255}, image="terrain/river.png"})
quickEntity('~', {name='Anduin river', display='~', color={r=0, g=30, b=255}, image="terrain/river.png"})
quickEntity('_', {name='river', display='~', color={r=0, g=80, b=255}, image="terrain/river.png", equilibrium_level=-10})
quickEntity('~', {name='Anduin river', display='~', color={r=0, g=30, b=255}, image="terrain/river.png", equilibrium_level=-10})
quickEntity('A', {name="Caves below the tower of Amon Sûl", display='>', color={r=0, g=255, b=255}, change_level=1, change_zone="tower-amon-sul"})
quickEntity('B', {name="Passageway into the Trollshaws", display='>', color={r=0, g=255, b=0}, change_level=1, change_zone="trollshaws"})
......
-- Wild Gifts
newTalentType{ type="gift/slime", name = "slime powers", description = "Through dedicated consumption of slime mold juice you have gained an affinity with slime molds." }
newTalentType{ type="gift/sand", name = "sand powers", description = "After consuming the heart of the Sandworm Queen you begin to gain command over the sand." }
-- Generic requires for gifts based on talent level
gifts_req1 = {
......@@ -24,3 +25,4 @@ gifts_req5 = {
}
load("/data/talents/gifts/slime.lua")
load("/data/talents/gifts/sand.lua")
newTalent{
name = "Burrow",
type = {"gift/sand", 1},
require = gifts_req1,
points = 5,
message = "@Source@ burrows into the ground!",
equilibrium = 10,
cooldown = 150,
range = 20,
tactical = {
DEFEND = 10,
},
action = function(self, t)
return true
end,
info = function(self, t)
return ([[Burrows into the ground to protect yourself and regenerate life.]]):format(100 * (1.5 + self:getTalentLevel(t) / 4))
end,
}
newTalent{
name = "????",
type = {"gift/sand", 2},
require = gifts_req2,
points = 5,
mode = "sustained",
message = "The skin of @Source@ starts dripping acid.",
sustain_equilibrium = 25,
cooldown = 10,
range = 1,
tactical = {
DEFEND = 10,
},
activate = function(self, t)
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("on_melee_hit", p.onhit)
return true
end,
info = function(self, t)
return ([[Your skin drips with acid, damaging all that hits your for %d acid damage.]]):format(10 + 5 * self:getTalentLevel(t))
end,
}
newTalent{
name = "???????",
type = {"gift/sand", 3},
require = gifts_req3,
points = 5,
equilibrium = 4,
cooldown = 30,
tactical = {
ATTACK = 10,
},
range = 20,
action = function(self, t)
end,
info = function(self, t)
return ([[Spit slime at your target doing %0.2f nature damage and slowing it down for 3 turns.
The damage will increase with the Dexterity stat]]):format(20 + (self:getDex() * self:getTalentLevel(t)) * 0.3)
end,
}
newTalent{
name = "Sand Breath",
type = {"gift/sand", 4},
require = gifts_req4,
points = 5,
equilibrium = 12,
cooldown = 12,
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.SAND, {dur=2+self:getTalentLevelRaw(t), dam=10 + self:getStr() * 0.3 * self:getTalentLevel(t)}, {type="flame"})
return true
end,
info = function(self, t)
return ([[You breath sand in a frontal cone. Any target caught in the area will take %0.2f physical damage and be blinded over %d turns.
The damage will increase with the Strength stat]]):format(10 + self:getStr() * 0.3 * self:getTalentLevel(t), 2+self:getTalentLevelRaw(t))
end,
}
......@@ -246,25 +246,3 @@ newTalent{
return ([[Summon allies.]])
end,
}
newTalent{
name = "Sand Breath",
type = {"other/other",1},
points = 5,
cooldown = 4,
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.SAND, {dur=2+self:getTalentLevelRaw(t), dam=10 + self:getStr() * 0.3 * self:getTalentLevel(t)}, {type="flame"})
return true
end,
info = function(self, t)
return ([[You breath sand in a frontal cone. Any target caught in the area will take %0.2f physical damage and be blinded over %d turns.
The damage will increase with the Strength stat]]):format(10 + self:getStr() * 0.3 * self:getTalentLevel(t), 2+self:getTalentLevelRaw(t))
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