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

flesh out the flooded cave

git-svn-id: http://svn.net-core.org/repos/t-engine4@566 51575b47-30f0-44d4-a5cc-537603b46e54
parent 07c201c4
No related branches found
No related tags found
No related merge requests found
Showing
with 420 additions and 47 deletions
......@@ -153,6 +153,19 @@ newDamageType{
end
end,
}
newDamageType{
name = "blinding ink", type = "BLINDING_INK",
projector = function(src, x, y, type, dam)
local target = game.level.map(x, y, Map.ACTOR)
if target then
if target:checkHit(src:combatAttackStr(), target:combatMentalResist(), 0, 95, 15) and target:canBe("blind") then
target:setEffect(target.EFF_BLINDED, math.ceil(dam), {})
else
game.logSeen(target, "%s resists the blinding light!", target.name:capitalize())
end
end
end,
}
-- Fire damage + DOT
newDamageType{
......@@ -388,6 +401,22 @@ newDamageType{
end,
}
-- Physical + Pinned
newDamageType{
name = "pinning", type = "PINNING",
projector = function(src, x, y, type, 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) then
target:setEffect(target.EFF_PINNED, dam.dur, {})
else
game.logSeen(target, "%s resists!", target.name:capitalize())
end
end
end,
}
-- Drain Exp
newDamageType{
name = "drain experience", type = "DRAINEXP",
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newEntity{
define_as = "WATER_FLOOR",
name = "underwater", image = "terrain/water_floor.png",
display = '.', color=colors.LIGHT_BLUE,
air_level = -5, air_condition="water",
}
newEntity{
define_as = "WATER_WALL",
name = "wall", image = "terrain/water_wall.png",
display = '#', color=colors.AQUAMARINE,
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
block_sight = true,
air_level = -20,
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- last updated: 10:46 AM 2/3/2010
local Talents = require("engine.interface.ActorTalents")
newEntity{
define_as = "BASE_NPC_AQUATIC_CRITTER",
type = "aquatic", subtype = "critter",
display = "A", color=colors.WHITE,
body = { INVEN = 10 },
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { str=12, dex=10, mag=3, con=13 },
energy = { mod=1 },
combat_armor = 1, combat_def = 1,
combat = { dam=5, atk=15, apr=7, dammod={str=0.6} },
max_life = resolvers.rngavg(10,20), life_rating = 6,
rank = 1,
size_category = 2,
can_breath={water=1},
resists = { [DamageType.COLD] = 25, },
}
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "giant eel", color=colors.CADET_BLUE,
desc = "A snake like being moving toward you.",
level_range = {1, 50}, exp_worth = 1,
rarity = 4,
}
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "electric eel", color=colors.STEEL_BLUE,
desc = "A snake-like being, radiating electricity.",
level_range = {1, 50}, exp_worth = 1,
rarity = 7,
autolevel = "warriormage",
combat = {damtype=DamageType.LIGHTNING},
resolvers.talents{ [Talents.T_CHAIN_LIGHTNING]=3, [Talents.T_LIGHTNING]=3 },
}
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "dragon turtle", color=colors.DARK_SEA_GREEN,
desc = "A snake-like being, radiating electricity.",
level_range = {1, 50}, exp_worth = 1,
rarity = 5,
rank = 2,
stats = { str=22, dex=10, mag=3, con=13 },
resists = { [DamageType.PHYSICAL] = 50, },
}
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "ancient dragon turtle", color=colors.DARK_SEA_GREEN,
desc = "A snake-like being, radiating electricity.",
level_range = {20, 50}, exp_worth = 1,
rarity = 10,
rank = 3,
autolevel = "warriormage",
resists = { [DamageType.PHYSICAL] = 60, },
resolvers.talents{ [Talents.T_TIDAL_WAVE]=3, [Talents.T_FREEZE]=3 },
}
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "squid", color=colors.TEAL,
desc = "Darting its many tentacles toward you it tries to lock you down.",
level_range = {1, 50}, exp_worth = 1,
rarity = 4,
resolvers.talents{ [Talents.T_GRAB]=3, },
}
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "ink squid", color=colors.LIGHT_STEEL_BLUE,
desc = "Darting its many tentacles toward you it tries to lock you down.",
level_range = {1, 50}, exp_worth = 1,
rarity = 5,
stats = { mag=30, },
resolvers.talents{ [Talents.T_GRAB]=3, [Talents.T_BLINDING_INK]=3, },
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- last updated: 10:46 AM 2/3/2010
local Talents = require("engine.interface.ActorTalents")
newEntity{
define_as = "BASE_NPC_AQUATIC_DEMON",
type = "aquatic", subtype = "demon",
display = "U", color=colors.WHITE,
body = { INVEN = 10 },
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { str=12, dex=10, mag=3, con=13 },
energy = { mod=1 },
combat_armor = 1, combat_def = 1,
combat = { dam=5, atk=15, apr=7, dammod={str=0.6} },
max_life = resolvers.rngavg(100,120),
rank = 2,
size_category = 3,
can_breath={water=1},
}
newEntity{ base = "BASE_NPC_AQUATIC_DEMON",
name = "water imp", color=colors.YELLOW_GREEN, unique=true,
desc = "A small water demon, lobbing spells at you.",
level_range = {10, 50}, exp_worth = 1,
rarity = 6,
rank = 2,
size_category = 1,
autolevel = "caster",
combat_armor = 1, combat_def = 0,
combat = {damtype=DamageType.ICE},
resists={[DamageType.COLD] = resolvers.mbonus(12, 5)},
resolvers.talents{ [Talents.T_WATER_BOLT]=3, [Talents.T_PHASE_DOOR]=2, },
drops = resolvers.drops{chance=100, nb=4, {ego_chance=100} },
}
newEntity{ base = "BASE_NPC_AQUATIC_DEMON",
name = "Walrog", color=colors.DARK_SEA_GREEN, unique=true,
desc = "Walrog, the lord of Water",
level_range = {20, 30}, exp_worth = 1,
rarity = 1,
rank = 4,
life_rating = 16,
autolevel = "warriormage",
combat_armor = 45, combat_def = 0,
combat_dam = 55,
combat = {damtype=DamageType.ICE},
resists={[DamageType.COLD] = resolvers.mbonus(50, 30)},
resolvers.talents{ [Talents.T_TIDAL_WAVE]=4, [Talents.T_FREEZE]=5 },
drops = resolvers.drops{chance=100, nb=4, {ego_chance=100} },
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newEntity{ define_as = "TRAP_WATER",
type = "natural", subtype="water", id_by_type=true, unided_name = "trap",
display = '^',
triggered = function(self, x, y, who)
self:project({type="hit",x=x,y=y}, x, y, self.damtype, self.dam, self.particles and {type=self.particles})
return true, self.auto_disarm
end,
}
newEntity{ base = "TRAP_WATER",
name = "water jet", auto_id = true,
detect_power = 6, disarm_power = 16,
rarity = 3, level_range = {1, 50},
color=colors.LIGHT_BLUE,
message = "@Target@ triggers a water jet!",
dam = resolvers.mbonus(150, 15), damtype = DamageType.PHYSICAL,
auto_disarm = true,
}
newEntity{ base = "TRAP_WATER",
name = "water siphon", auto_id = true,
detect_power = 8, disarm_power = 2,
rarity = 3, level_range = {1, 50},
color=colors.BLUE,
message = "@Target@ is caught into a water siphon!",
dam = resolvers.mbonus(90, 15),
combatAttackStr = function(self) return self.disarm_power * 2 end,
triggered = function(self, x, y, who)
self:project({type="ball",radius=2,x=x,y=y}, x, y, DamageType.PINNING, {dam=self.dam,dur=4})
return true
end,
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return {
base = 1000,
angle = { 0, 360 }, anglev = { 2000, 4000 }, anglea = { 20, 60 },
life = { 5, 10 },
size = { 4, 7 }, sizev = {0, 0}, sizea = {0, 0},
r = {0, 40}, rv = {0, 0}, ra = {0, 0},
g = {0, 40}, gv = {0, 0}, ga = {0, 0},
b = {0, 40}, bv = {0, 0}, ba = {0, 0},
a = {225, 255}, av = {0, 0}, aa = {0, 0},
}, function(self)
self.nb = (self.nb or 0) + 1
if self.nb < 6 then
self.ps:emit(100)
end
end
......@@ -373,3 +373,83 @@ newTalent{
return ([[Try to confuse the target's mind fr a while.]])
end,
}
newTalent{
name = "Water Bolt",
type = {"spell/other", },
points = 5,
mana = 10,
cooldown = 3,
tactical = {
ATTACK = 10,
},
range = 20,
reflectable = true,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.COLD, self:spellCrit(12 + self:combatSpellpower(0.25) * self:getTalentLevel(t)), {type="freeze"})
game:playSoundNear(self, "talents/ice")
return true
end,
info = function(self, t)
return ([[Condenses ambient water on a target, damaging it for %0.2f.
The damage will increase with the Magic stat]]):format(12 + self:combatSpellpower(0.25) * self:getTalentLevel(t))
end,
}
newTalent{
name = "Grab",
type = {"technique/other", 1},
points = 5,
cooldown = 6,
stamina = 8,
require = { stat = { str=12 }, },
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
local hit = self:attackTarget(target, nil, 0.8 + self:getTalentLevel(t) / 7, true)
-- Try to stun !
if hit then
if target:checkHit(self:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("stun") then
target:setEffect(target.EFF_PINNED, 1 + self:getTalentLevel(t), {})
else
game.logSeen(target, "%s resists the grab!", target.name:capitalize())
end
end
return true
end,
info = function(self, t)
return ([[Hits the target doing %d%% damage, if the attack hits, the target is pinned tp the ground.]]):format(100 * (0.8 + self:getTalentLevel(t) / 7))
end,
}
newTalent{
name = "Blinding Ink",
type = {"wild-gift/other", 1},
points = 5,
equilibrium = 12,
cooldown = 12,
message = "@Source@ projects ink!",
tactical = {
ATTACKAREA = 10,
DEFEND = 5,
},
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.BLINDING_INK, 2+self:getTalentLevelRaw(t), {type="dark"})
game:playSoundNear(self, "talents/breath")
return true
end,
info = function(self, t)
return ([[You project thick black ink, blinding your targets for %d turns.]]):format(2+self:getTalentLevelRaw(t))
end,
}
......@@ -75,7 +75,7 @@ newTalent{
self:project({type="ball", friendlyfire=false, x=dx, y=dy, radius=10, range=0}, dx, dy, function(bx, by)
local actor = game.level.map(bx, by, Map.ACTOR)
if actor and not affected[actor] then
if actor and not affected[actor] and self:reactionToward(actor) < 0 then
fork(bx, by, dx, dy)
return true
end
......
......@@ -18,21 +18,4 @@
-- darkgod@te4.org
load("/data/general/grids/basic.lua")
newEntity{
define_as = "WATER_FLOOR",
name = "underwater", image = "terrain/water_floor.png",
display = '.', color=colors.LIGHT_BLUE,
air_level = -5, air_condition="water",
}
newEntity{
define_as = "WATER_WALL",
name = "wall", image = "terrain/water_wall.png",
display = '#', color=colors.AQUAMARINE,
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
block_sight = true,
air_level = -20,
}
load("/data/general/grids/water.lua")
......@@ -17,44 +17,32 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/npcs/rodent.lua")
load("/data/general/npcs/vermin.lua")
load("/data/general/npcs/canine.lua")
load("/data/general/npcs/troll.lua")
load("/data/general/npcs/snake.lua")
load("/data/general/npcs/plant.lua")
load("/data/general/npcs/swarm.lua")
load("/data/general/npcs/bear.lua")
load("/data/general/npcs/aquatic_critter.lua")
load("/data/general/npcs/aquatic_demon.lua")
local Talents = require("engine.interface.ActorTalents")
-- The boss of trollshaws, no "rarity" field means it will not be randomly generated
newEntity{ define_as = "TROLL_BILL",
type = "giant", subtype = "troll", unique = true,
name = "Bill the Stone Troll",
display = "T", color=colors.VIOLET,
desc = [[Big, brawny, powerful and with a taste for hobbit. He has friends called Bert and Tom.
He is wielding a small tree trunk and towering toward you.
He should have turned to stone long ago, how could he still walk?!]],
level_range = {7, 20}, exp_worth = 2,
newEntity{ define_as = "UKLLMSWWIK",
type = "dragon", subtype = "water", unique = true,
name = "Ukllmswwik the wise",
display = "D", color=colors.VIOLET,
desc = [[It looks like a cross between a shark and a dragon, only nastier.]],
level_range = {3, 40}, exp_worth = 2,
max_life = 250, life_rating = 17, fixed_rating = true,
max_stamina = 85,
stats = { str=25, dex=10, cun=8, mag=10, con=20 },
rank = 4,
size_category = 4,
can_breath={water=1},
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
equipment = resolvers.equip{ {type="weapon", subtype="greatmaul", defined="GREATMAUL_BILL_TRUNK"}, },
drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} },
resolvers.talents{
[Talents.T_STAMINA_POOL]=1, [Talents.T_STUN]=2, [Talents.T_KNOCKBACK]=1,
[Talents.T_STUN]=2, [Talents.T_KNOCKBACK]=1,
},
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { talent_in=4, },
on_die = function(self, who)
who:resolveSource():setQuestStatus("start-dunadan", engine.Quest.COMPLETED, "trollshaws")
end,
}
......@@ -17,4 +17,4 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/traps/natural_forest.lua")
load("/data/general/traps/water.lua")
......@@ -46,9 +46,8 @@ return {
},
actor = {
class = "engine.generator.actor.Random",
-- nb_npc = {20, 30},
nb_npc = {0, 0},
-- guardian = "TROLL_BILL",
nb_npc = {20, 30},
guardian = "UKLLMSWWIK",
},
object = {
class = "engine.generator.object.Random",
......@@ -57,8 +56,7 @@ return {
},
trap = {
class = "engine.generator.trap.Random",
-- nb_object = {6, 9},
nb_trap = {0, 0},
nb_object = {6, 9},
},
},
levels =
......
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