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

ncier water floor

git-svn-id: http://svn.net-core.org/repos/t-engine4@1013 51575b47-30f0-44d4-a5cc-537603b46e54
parent d9bb8f0b
No related branches found
No related tags found
No related merge requests found
Showing
with 319 additions and 3 deletions
......@@ -475,7 +475,7 @@ function _M:setupCommands()
self.player.esp.all = 1
self.player.esp.range = 50
self.player.inc_damage.all = 100000
self:changeLevel(2, "rak-shor-pride")
self:changeLevel(2, "caverns-osse")
-- self:changeLevel(1, "town-gates-of-morning")
-- self:changeLevel(1, "wilderness-arda-fareast")
-- game.memory_levels["wilderness-arda-fareast-1"] = game.level
......
......@@ -76,7 +76,6 @@ function _M:tooltip()
end
end
--- Generate sub entities to make nice trees
function _M:makeTrees(base, max)
local function makeTree(nb, z)
......@@ -105,6 +104,34 @@ function _M:makeTrees(base, max)
return tbl
end
--- Generate sub entities to make nice shells
function _M:makeShells(base, max)
local function makeShell(nb, z)
local inb = 4 - nb
return engine.Entity.new{
z = z,
display_scale = rng.float(0.1 + inb / 6, 0.2),
display_x = rng.range(-engine.Map.tile_w / 3 * nb / 3, engine.Map.tile_w / 3 * nb / 3),
display_y = rng.range(-engine.Map.tile_h / 3 * nb / 3, engine.Map.tile_h / 3 * nb / 3),
display_on_seen = true,
display_on_remember = true,
image = (base or "terrain/tree_alpha")..rng.range(1,max or 5)..".png",
}
end
local v = rng.range(0, 100)
local tbl
if v < 33 then
return nil
elseif v < 66 then
tbl = { makeShell(2, 2), makeShell(2, 3), }
else
tbl = { makeShell(1, 2), }
end
table.sort(tbl, function(a,b) return a.display_y < b.display_y end)
return tbl
end
--- Generate sub entities to make translucent water
function _M:makeWater(z)
return { engine.Entity.new{
......@@ -115,3 +142,14 @@ function _M:makeWater(z)
display_on_remember = true,
} }
end
--- Merge sub entities
function _M:mergeSubEntities(...)
local tbl = {}
for i, t in ipairs{...} do if t then
for j, e in ipairs(t) do
tbl[#tbl+1] = e
end
end end
return tbl
end
......@@ -28,6 +28,15 @@ newEntity{
add_displays = class:makeWater(true),
air_level = -5, air_condition="water",
}
for i = 2, 20 do
newEntity{
define_as = "WATER_FLOOR"..i,
name = "underwater", image = "terrain/water_floor.png",
display = '.', color=colors.LIGHT_BLUE, back_color=colors.DARK_BLUE,
add_displays = class:mergeSubEntities(class:makeWater(true), class:makeShells("terrain/shell")),
air_level = -5, air_condition="water",
}
end
newEntity{
define_as = "WATER_WALL",
......
game/modules/tome/data/gfx/terrain/shell1.png

3.31 KiB

game/modules/tome/data/gfx/terrain/shell2.png

3.18 KiB

game/modules/tome/data/gfx/terrain/shell3.png

3.56 KiB

game/modules/tome/data/gfx/terrain/shell4.png

2.86 KiB

game/modules/tome/data/gfx/terrain/shell5.png

2.86 KiB

game/modules/tome/data/gfx/terrain/shell6.png

4.08 KiB

game/modules/tome/data/gfx/terrain/shell6e.png

2.82 KiB

game/modules/tome/data/gfx/terrain/water_wall1.png

3.57 KiB

......@@ -37,7 +37,7 @@ return {
class = "engine.generator.map.Cavern",
zoom = 16,
min_floor = 1200,
floor = "WATER_FLOOR",
floor = {"WATER_FLOOR","WATER_FLOOR2","WATER_FLOOR3","WATER_FLOOR4","WATER_FLOOR5","WATER_FLOOR6","WATER_FLOOR7","WATER_FLOOR8","WATER_FLOOR9","WATER_FLOOR10","WATER_FLOOR11","WATER_FLOOR12","WATER_FLOOR13","WATER_FLOOR14","WATER_FLOOR15","WATER_FLOOR16","WATER_FLOOR17","WATER_FLOOR18","WATER_FLOOR19","WATER_FLOOR20",},
wall = "WATER_WALL",
up = "UP",
down = "DOWN",
......
-- 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
load("/data/general/grids/basic.lua")
load("/data/general/grids/forest.lua")
load("/data/general/grids/water.lua")
-- 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
load("/data/general/npcs/orc.lua", rarity(3))
load("/data/general/npcs/orc-vor.lua", rarity(0))
load("/data/general/npcs/all.lua", rarity(4, 35))
local Talents = require("engine.interface.ActorTalents")
newEntity{ base="BASE_NPC_ORC_VOR", define_as = "VOR",
name = "Vor, Grand Geomancer of the Pride", color=colors.VIOLET, unique = true,
desc = [[An old orc, wearing multi-colored robes. Ice shards fly around him, leaving a trail of fire and lightning bursts.]],
level_range = {40, 50}, exp_worth = 2,
rank = 5,
max_life = 250, life_rating = 19, fixed_rating = true,
infravision = 20,
stats = { str=12, dex=10, cun=12, mag=21, con=14 },
move_others=true,
combat_armor = 10, combat_def = 10,
open_door = true,
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar", },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, HEAD=1 },
resolvers.equip{
{type="weapon", subtype="staff", ego_change=100, autoreq=true},
{type="armor", subtype="cloth", ego_change=100, autoreq=true},
{type="armor", subtype="head", defined="CROWN_ELEMENTS", autoreq=true},
},
resolvers.drops{chance=100, nb=1, {defined="ORB_ELEMENTS"} },
resolvers.drops{chance=100, nb=5, {ego_chance=100} },
resolvers.talents{
[Talents.T_FLAME]=5,
[Talents.T_FLAMESHOCK]=5,
[Talents.T_FIREFLASH]=5,
[Talents.T_INFERNO]=5,
[Talents.T_BLASTWAVE]=5,
[Talents.T_DANCING_FIRES]=5,
[Talents.T_COMBUST]=5,
[Talents.T_FREEZE]=5,
[Talents.T_ICE_STORM]=5,
[Talents.T_TIDAL_WAVE]=5,
[Talents.T_ICE_SHARDS]=5,
[Talents.T_FROZEN_GROUND]=5,
[Talents.T_LIGHTNING]=5,
[Talents.T_CHAIN_LIGHTNING]=5,
[Talents.T_SPELL_SHAPING]=5,
[Talents.T_ESSENCE_OF_SPEED]=1,
},
resolvers.sustains_at_birth(),
on_die = function(self, who)
game.player:resolveSource():setQuestStatus("orc-pride", engine.Quest.COMPLETED, "vor")
if not game.player:hasQuest("pre-mount-doom") then
game.player:grantQuest("pre-mount-doom")
end
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
load("/data/general/objects/objects.lua")
local Stats = require"engine.interface.ActorStats"
newEntity{ base = "BASE_LEATHER_CAP",
define_as = "CROWN_ELEMENTS", rarity=false,
name = "Crown of the Elements", unique=true,
unided_name = "jeweled crown", color=colors.DARK_GREY,
desc = [[Jeweled crown]],
cost = 500,
material_level = 5,
wielder = {
inc_stats = { [Stats.STAT_CON] = 5, [Stats.STAT_WIL] = 3, },
resists={
[DamageType.FIRE] = 15,
[DamageType.COLD] = 15,
[DamageType.ACID] = 15,
[DamageType.LIGHTNING] = 15,
},
melee_project={
[DamageType.FIRE] = 10,
[DamageType.COLD] = 10,
[DamageType.ACID] = 10,
[DamageType.LIGHTNING] = 10,
},
see_invisible = 15,
combat_armor = 5,
fatigue = 5,
},
}
-- Artifact, randomly dropped in Vor Pride, and only there
newEntity{ base = "BASE_SCROLL", subtype="tome",
name = "Tome of Wildfire", unided_name = "burning book", unique=true,
color = colors.VIOLET,
level_range = {35, 45},
rarity = 200,
cost = 100,
use_simple = { name="learn the ancient secrets", use = function(self, who)
if not who:knowTalent(who.T_FLAME) then
who:learnTalent(who.T_FLAME, true, 3)
game.logPlayer(who, "#00FFFF#You read the tome and learn about ancient forgotten fire magic!")
else
who.talents_types_mastery["spell/fire"] = (who.talents_types_mastery["spell/fire"] or 1) + 0.1
who.talents_types_mastery["spell/wildfire"] = (who.talents_types_mastery["spell/wildfire"] or 1) + 0.1
game.logPlayer(who, "#00FFFF#You read the tome and perfect your mastery of fire magic!")
end
game:setAllowedBuild("mage_pyromancer", true)
return "destroy", true
end}
}
-- Artifact, randomly dropped in Vor Pride, and only there
newEntity{ base = "BASE_SCROLL", subtype="tome",
name = "Tome of Uttercold", unided_name = "frozen book", unique=true,
color = colors.VIOLET,
level_range = {35, 45},
rarity = 200,
cost = 100,
use_simple = { name="learn the ancient secrets", use = function(self, who)
if not who:knowTalent(who.T_ICE_STORM) then
who:learnTalent(who.T_ICE_STORM, true, 3)
game.logPlayer(who, "#00FFFF#You read the tome and learn about ancient forgotten ice magic!")
else
who.talents_types_mastery["spell/water"] = (who.talents_types_mastery["spell/water"] or 1) + 0.1
who.talents_types_mastery["spell/ice"] = (who.talents_types_mastery["spell/ice"] or 1) + 0.1
game.logPlayer(who, "#00FFFF#You read the tome and perfect your mastery of ice magic!")
end
game:setAllowedBuild("mage_cryomancer", true)
return "destroy", 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 {
name = "Gorbat Pride",
level_range = {35, 40},
level_scheme = "player",
max_level = 5,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 50, height = 50,
persistent = "zone",
-- all_remembered = true,
all_lited = true,
ambiant_music = "Breaking the siege.ogg",
generator = {
map = {
class = "engine.generator.map.Town",
building_chance = 70,
max_building_w = 8, max_building_h = 8,
edge_entrances = {6,4},
floor = "FLOOR",
external_floor = "FLOOR",
wall = "WALL",
up = "UP",
down = "DOWN",
door = "DOOR",
},
actor = {
class = "engine.generator.actor.Random",
nb_npc = {20, 30},
guardian = "GORBAT",
},
object = {
class = "engine.generator.object.Random",
nb_object = {3, 6},
},
},
post_process = function(level)
for uid, e in pairs(level.entities) do e.faction="orc-pride" end
end,
levels =
{
[1] = {
generator = { map = {
up = "UP_WILDERNESS_FAR_EAST",
}, },
},
},
}
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