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

Many new creature sounds

git-svn-id: http://svn.net-core.org/repos/t-engine4@5465 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8266bfde
No related branches found
No related tags found
No related merge requests found
Showing
with 95 additions and 5 deletions
......@@ -3856,7 +3856,7 @@ function _M:removeEffectsFilter(t)
while #effs > 0 do
local eff = rng.tableRemove(effs)
self:removeEffect(eff)
end
end
end
--- Suffocate a bit, lose air
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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
require "engine.class"
local Map = require "engine.Map"
require "engine.Generator"
module(..., package.seeall, class.inherit(engine.Generator))
function _M:init(zone, map, level, data)
engine.Generator.init(self, zone, map, level)
self.data = data
self.grid_list = zone.grid_list
end
function _M:makePath(sx, sy, ex, ey, wd, excentricity, points)
local ln = 0
local path = core.noise.new(1)
local j = sy
local dir = true
for i = sx, ex do
for jj = j - wd, j + wd do if self.map:isBound(i, jj) then self.map(i, jj, Map.TERRAIN, self:resolve(".")) end end
points[#points+1] = {x=i, y=j}
if i < ex - 10 then
local n = path:fbm_perlin(150 * i / self.map.w, 4)
if ln < -excentricity or ln > excentricity then
if (ln > 0 and n < 0) or (ln < 0 and n > 0) then dir = not dir end
j = util.bound(j + (dir and -1 or 1), 0, self.map.h - 1)
end
ln = n
else
-- Close in on the exit
if j < ey then j = j + 1
elseif j > ey then j = j - 1
end
end
end
end
function _M:generate(lev, old_lev)
for i = 0, self.map.w - 1 do for j = 0, self.map.h - 1 do
self.map(i, j, Map.TERRAIN, self:resolve("#"))
end end
local points = {}
self:makePath(0, self.data.start, self.map.w - 1, self.data.stop, 1, 0.35, points)
for i = 1, 10 do
local sp, ep
repeat
sp = rng.table(points)
ep = rng.table(points)
until ep.x - sp.x > 80
self:makePath(sp.x, sp.y, ep.x, ep.y, 0, 0.25, points)
end
-- Make stairs
local spots = {}
local sx, sy, ex, ey = 0, math.floor(self.map.h/2), self.map.w-1, math.floor(self.map.h/2)
self.map(sx, sy, Map.TERRAIN, self:resolve("up"))
self.map(ex, ey, Map.TERRAIN, self:resolve("down"))
return sx, sy, ex, ey, spots
end
......@@ -106,7 +106,7 @@ newEntity{ base = "BASE_NPC_CANINE",
desc = [[The quick brown fox jumps over the lazy dog.]],
sound_moam = {"creatures/foxes/bark_hurt_%d", 1, 1},
sound_die = {"creatures/wolves/death_%d", 1, 1},
sound_random = {"creatures/wolves/_bark_%d", 1, 2},
sound_random = {"creatures/wolves/bark_%d", 1, 2},
level_range = {1, nil}, exp_worth = 1,
rarity = 3,
max_life = resolvers.rngavg(40,50),
......
......@@ -51,9 +51,12 @@ newEntity{ base = "BASE_NPC_COLD_DRAKE",
rank = 1, size_category = 2,
max_life = resolvers.rngavg(40,60),
combat_armor = 5, combat_def = 0,
combat = { dam=resolvers.levelup(resolvers.rngavg(25,40), 1, 0.6), atk=resolvers.rngavg(25,50), apr=25, dammod={str=1.1} },
combat = { dam=resolvers.levelup(resolvers.rngavg(25,40), 1, 0.6), atk=resolvers.rngavg(25,50), apr=25, dammod={str=1.1}, sound={"creatures/cold_drake/attack%d",1,2, vol=0.4} },
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(7, 2)},
sound_moam = {"creatures/cold_drake/on_hit%d", 1, 2, vol=0.4},
sound_die = {"creatures/cold_drake/death%d", 1, 1, vol=0.4},
make_escort = {
{type="dragon", subtype="cold", name="cold drake hatchling", number=3, no_subescort=true},
},
......@@ -66,10 +69,13 @@ newEntity{ base = "BASE_NPC_COLD_DRAKE", define_as = "NPC_COLD_DRAKE",
rarity = 3,
max_life = resolvers.rngavg(100,110),
combat_armor = 12, combat_def = 0,
combat = { dam=resolvers.levelup(resolvers.rngavg(25,70), 1, 1.2), atk=resolvers.rngavg(25,70), apr=25, dammod={str=1.1} },
combat = { dam=resolvers.levelup(resolvers.rngavg(25,70), 1, 1.2), atk=resolvers.rngavg(25,70), apr=25, dammod={str=1.1}, sound={"creatures/cold_drake/attack%d",1,2, vol=1} },
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(15, 10)},
lite = 1,
sound_moam = {"creatures/cold_drake/on_hit%d", 1, 2, vol=1},
sound_die = {"creatures/cold_drake/death%d", 1, 1, vol=1},
make_escort = {
{type="dragon", name="cold drake hatchling", number=1},
},
......@@ -89,12 +95,15 @@ newEntity{ base = "BASE_NPC_COLD_DRAKE",
rank = 3,
max_life = resolvers.rngavg(170,190),
combat_armor = 30, combat_def = 0,
combat = { dam=resolvers.levelup(resolvers.rngavg(25,110), 1, 2), atk=resolvers.rngavg(25,70), apr=25, dammod={str=1.1} },
combat = { dam=resolvers.levelup(resolvers.rngavg(25,110), 1, 2), atk=resolvers.rngavg(25,70), apr=25, dammod={str=1.1}, sound={"creatures/cold_drake/attack%d",1,2, vol=1.4} },
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(25, 10)},
lite = 1,
stun_immune = 0.8,
blind_immune = 0.8,
sound_moam = {"creatures/cold_drake/on_hit%d", 1, 2, vol=1.4},
sound_die = {"creatures/cold_drake/death%d", 1, 1, vol=1.4},
make_escort = {
{type="dragon", name="cold drake", number=1},
{type="dragon", name="cold drake", number=1, no_subescort=true},
......
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
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