-- ToME - Tales of Maj'Eyal -- 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 . -- -- Nicolas Casalini "DarkGod" -- darkgod@te4.org load("/data/general/grids/basic.lua") load("/data/general/grids/water.lua") newEntity{ define_as = "FOUL_WATER", name = "foul water", image = "terrain/water_floor.png", display = '~', color=colors.DARK_SEA_GREEN, back_color=colors.YELLOW_GREEN, add_displays = class:makeWater(true, "poison_"), always_remember = false, air_level = -5, air_condition="water", mindam = resolvers.mbonus(20, 50), maxdam = resolvers.mbonus(40, 100), on_stand = function(self, x, y, who) local DT = engine.DamageType local dam = DT:get(DT.BLIGHT).projector(self, x, y, DT.BLIGHT, rng.range(self.mindam, self.maxdam)) if dam > 0 then game.logPlayer(who, "The foul water stings you!") end end, } newEntity{ define_as = "DARK_FLOOR", type = "floor", subtype = "floor", name = "floor", image = "terrain/marble_floor.png", display = '.', color_r=70, color_g=70, color_b=70, back_color={0,0,0}, grow = "DARK_WALL", } newEntity{ define_as = "WOODEN_PLANK", type = "floor", subtype = "floor", name = "wooden plank", image = "terrain/marble_floor.png", display = '.', color_r=140, color_g=50, color_b=30, back_color={100,20,0}, grow = "DARK_WALL", } newEntity{ define_as = "DARK_WALL", type = "wall", subtype = "floor", name = "wall", image = "terrain/granite_wall1.png", display = '#', color_r=70, color_g=70, color_b=70, back_color=colors.GREY, nice_tiler = { method="wall3d", inner={"DARK_WALL", 100, 1, 5}, north={"DARK_WALL_NORTH", 100, 1, 5}, south={"DARK_WALL_SOUTH", 10, 1, 17}, north_south="DARK_WALL_NORTH_SOUTH", small_pillar="DARK_WALL_SMALL_PILLAR", pillar_2="DARK_WALL_PILLAR_2", pillar_8={"DARK_WALL_PILLAR_8", 100, 1, 5}, pillar_4="DARK_WALL_PILLAR_4", pillar_6="DARK_WALL_PILLAR_6" }, always_remember = true, does_block_move = true, can_pass = {pass_wall=1}, block_sight = true, air_level = -20, dig = "DARK_FLOOR", } for i = 1, 5 do newEntity{ base = "DARK_WALL", define_as = "DARK_WALL"..i, image = "terrain/granite_wall1_"..i..".png"} newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_NORTH"..i, image = "terrain/granite_wall1_"..i..".png", add_displays = {class.new{image="terrain/granite_wall3.png", z=18, display_y=-1}}} newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_PILLAR_8"..i, image = "terrain/granite_wall1_"..i..".png", add_displays = {class.new{image="terrain/granite_wall_pillar_8.png", z=18, display_y=-1}}} end newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_NORTH_SOUTH", image = "terrain/granite_wall2.png", add_displays = {class.new{image="terrain/granite_wall3.png", z=18, display_y=-1}}} newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_SOUTH", image = "terrain/granite_wall2.png"} for i = 1, 17 do newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_SOUTH"..i, image = "terrain/granite_wall2_"..i..".png"} end newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_SMALL_PILLAR", image = "terrain/marble_floor.png", add_displays = {class.new{image="terrain/granite_wall_pillar_small.png"}, class.new{image="terrain/granite_wall_pillar_small_top.png", z=18, display_y=-1}}} newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_PILLAR_6", image = "terrain/marble_floor.png", add_displays = {class.new{image="terrain/granite_wall_pillar_3.png"}, class.new{image="terrain/granite_wall_pillar_9.png", z=18, display_y=-1}}} newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_PILLAR_4", image = "terrain/marble_floor.png", add_displays = {class.new{image="terrain/granite_wall_pillar_1.png"}, class.new{image="terrain/granite_wall_pillar_7.png", z=18, display_y=-1}}} newEntity{ base = "DARK_WALL", define_as = "DARK_WALL_PILLAR_2", image = "terrain/marble_floor.png", add_displays = {class.new{image="terrain/granite_wall_pillar_2.png"}}}