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

nwe display modes: ascii with color background

git-svn-id: http://svn.net-core.org/repos/t-engine4@631 51575b47-30f0-44d4-a5cc-537603b46e54
parent c6a6e28f
No related branches found
No related tags found
No related merge requests found
Showing
with 111 additions and 79 deletions
......@@ -67,11 +67,14 @@ function _M:init(t, no_default)
self.color_r = self.color.r
self.color_g = self.color.g
self.color_b = self.color.b
self.color_br = self.color.br
self.color_bg = self.color.bg
self.color_bb = self.color.bb
self.color = nil
end
if self.back_color then
self.color_br = self.back_color.r
self.color_bg = self.back_color.g
self.color_bb = self.back_color.b
self.back_color = nil
end
if self.tint then
self.tint_r = self.tint.r / 255
self.tint_g = self.tint.g / 255
......
......@@ -104,7 +104,8 @@ mm_blocks = {
-- @param tile_h height of a single tile
-- @param fontname font parameters, can be nil
-- @param fontsize font parameters, can be nil
function _M:setViewPort(x, y, w, h, tile_w, tile_h, fontname, fontsize, multidisplay)
function _M:setViewPort(x, y, w, h, tile_w, tile_h, fontname, fontsize, multidisplay, allow_backcolor)
self.allow_backcolor = allow_backcolor
self.multidisplay = multidisplay
self.display_x, self.display_y = math.floor(x), math.floor(y)
self.viewport = {width=math.floor(w), height=math.floor(h), mwidth=math.floor(w/tile_w), mheight=math.floor(h/tile_h)}
......@@ -131,8 +132,8 @@ end
--- Create the tile repositories
function _M:resetTiles()
self.tiles = Tiles.new(self.tile_w, self.tile_h, self.fontname, self.fontsize, true)
self.tilesSurface = Tiles.new(self.tile_w, self.tile_h, self.fontname, self.fontsize, false)
self.tiles = Tiles.new(self.tile_w, self.tile_h, self.fontname, self.fontsize, true, self.allow_backcolor)
self.tilesSurface = Tiles.new(self.tile_w, self.tile_h, self.fontname, self.fontsize, false, true)
end
--- Defines the faction of the person seeing the map
......@@ -307,7 +308,7 @@ function _M:updateMap(x, y)
mm = mm + (g:check("block_move") and MM_BLOCK or 0)
mm = mm + (g:check("change_level") and MM_LEVEL_CHANGE or 0)
g_r, g_g, g_b = g.tint_r, g.tint_g, g.tint_b
g = self.tiles:get(g.display, g.color_r, g.color_g, g.color_b, g.color_br, g.color_bg, g.color_bb, g.image)
g = self.tiles:get(g.display, g.color_r, g.color_g, g.color_b, g.color_br, g.color_bg, g.color_bb, g.image, 255)
end
if t then
-- Handles invisibility and telepathy and other such things
......
......@@ -26,7 +26,8 @@ module(..., package.seeall, class.make)
prefix = "/data/gfx/"
use_images = true
function _M:init(w, h, fontname, fontsize, texture)
function _M:init(w, h, fontname, fontsize, texture, allow_backcolor)
self.allow_backcolor = allow_backcolor
self.texture = texture
self.w, self.h = w, h
self.font = core.display.newFont(fontname or "/data/font/VeraMoBd.ttf", fontsize or 14)
......@@ -66,9 +67,10 @@ function _M:get(char, fr, fg, fb, br, bg, bb, image, alpha)
s:drawString(self.font, char, (self.w - w) / 2, (self.h - h) / 2, fr, fg, fb)
]]
if br < 0 then br = nil end
if bg < 0 then bg = nil end
if bb < 0 then bb = nil end
if not self.allow_backcolor or br < 0 then br = nil end
if not self.allow_backcolor or bg < 0 then bg = nil end
if not self.allow_backcolor or bb < 0 then bb = nil end
if not self.allow_backcolor then alpha = 0 end
s = core.display.newTile(self.w, self.h, self.font, dochar, (self.w - w) / 2, (self.h - h) / 2, fr, fg, fb, br or 0, bg or 0, bb or 0, alpha, self.use_images)
-- s = core.display.drawStringNewSurface(self.font, char, fr, fg, fb)
end
......
......@@ -38,6 +38,10 @@ defineColor('LIGHT_RED', 0xFF, 0x00, 0x68)
defineColor('LIGHT_GREEN', 0x00, 0xFF, 0x00)
defineColor('LIGHT_BLUE', 0x51, 0xDD, 0xFF)
defineColor('LIGHT_UMBER', 0xD7, 0x8E, 0x45)
defineColor('DARK_UMBER', 0x57, 0x5E, 0x25)
defineColor('DARK_GREY', 67, 67, 67)
defineColor('GREY', 127, 127, 127)
defineColor('ROYAL_BLUE', 65, 105, 225)
defineColor('AQUAMARINE', 127, 255, 212)
......@@ -45,6 +49,7 @@ defineColor('CADET_BLUE', 95, 158, 160)
defineColor('STEEL_BLUE', 70, 130, 180)
defineColor('TEAL', 0, 128, 128)
defineColor('LIGHT_STEEL_BLUE', 176, 196, 222)
defineColor('DARK_BLUE', 0x00, 0x00, 0x93)
defineColor('PINK', 255, 192, 203)
defineColor('GOLD', 255, 215, 0)
......@@ -63,6 +68,7 @@ defineColor('PURPLE', 128, 0, 139)
defineColor('CHOCOLATE', 210, 105, 30)
defineColor('DARK_KHAKI', 189, 183, 107)
defineColor('TAN', 210, 180, 140)
defineColor('DARK_TAN', 110, 80, 40)
defineColor('HONEYDEW', 240, 255, 240)
defineColor('ANTIQUE_WHITE', 250, 235, 215)
......
......@@ -178,7 +178,9 @@ function _M:move(x, y, force)
-- Never move but tries to attack ? ok
elseif not force and self:attr("never_move") then
-- A bit weird, but this simple asks the collision code to detect an attack
game.level.map:checkAllEntities(x, y, "block_move", self, true)
if not game.level.map:checkAllEntities(x, y, "block_move", self, true) then
game.logPlayer(self, "You are unable to move!")
end
else
moved = engine.Actor.move(self, x, y, force)
end
......
......@@ -154,18 +154,33 @@ end
function _M:setupDisplayMode()
self.gfxmode = self.gfxmode or (config.settings.tome and config.settings.tome.gfxmode) or 1
if self.gfxmode == 1 then
print("[DISPLAY MODE] 32x32")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 32, 32, nil, 20, true)
print("[DISPLAY MODE] 32x32 GFX")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 32, 32, nil, 22, true, true)
Map:resetTiles()
Map.tiles.use_images = true
elseif self.gfxmode == 2 then
print("[DISPLAY MODE] 16x16")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 16, 16, nil, 14, true)
print("[DISPLAY MODE] 16x16 GFX")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 16, 16, nil, 14, true, true)
Map:resetTiles()
Map.tiles.use_images = true
elseif self.gfxmode == 3 then
print("[DISPLAY MODE] ASCII")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 16, 16, nil, 14, false)
print("[DISPLAY MODE] 32x32 ASCII")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 32, 32, nil, 22, true, false)
Map:resetTiles()
Map.tiles.use_images = false
elseif self.gfxmode == 4 then
print("[DISPLAY MODE] 16x16 ASCII")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 16, 16, nil, 14, false, false)
Map:resetTiles()
Map.tiles.use_images = false
elseif self.gfxmode == 5 then
print("[DISPLAY MODE] 32x32 ASCII/background")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 32, 32, nil, 22, true, true)
Map:resetTiles()
Map.tiles.use_images = false
elseif self.gfxmode == 6 then
print("[DISPLAY MODE] 16x16 ASCII/background")
Map:setViewPort(200, 20, self.w - 200, math.floor(self.h * 0.80) - 20, 16, 16, nil, 14, false, true)
Map:resetTiles()
Map.tiles.use_images = false
else
......@@ -626,7 +641,7 @@ function _M:setupCommands()
-- Switch gfx modes
SWITCH_GFX = function()
self.gfxmode = self.gfxmode or 1
self.gfxmode = util.boundWrap(self.gfxmode + 1, 1, 3)
self.gfxmode = util.boundWrap(self.gfxmode + 1, 1, 6)
self:setupDisplayMode()
end,
......
......@@ -48,13 +48,13 @@ newEntity{
newEntity{
define_as = "FLOOR",
name = "floor", image = "terrain/marble_floor.png",
display = '.', color_r=255, color_g=255, color_b=255,
display = '.', color_r=255, color_g=255, color_b=255, back_color=colors.DARK_GREY,
}
newEntity{
define_as = "WALL",
name = "wall", image = "terrain/granite_wall1.png",
display = '#', color_r=255, color_g=255, color_b=255,
display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY,
always_remember = true,
does_block_move = true,
can_pass = {pass_wall=1},
......@@ -66,7 +66,7 @@ newEntity{
newEntity{
define_as = "DOOR",
name = "door", image = "terrain/granite_door1.png",
display = '+', color_r=238, color_g=154, color_b=77,
display = '+', color_r=238, color_g=154, color_b=77, back_color=colors.DARK_UMBER,
notice = true,
always_remember = true,
block_sight = true,
......@@ -77,7 +77,7 @@ newEntity{
newEntity{
define_as = "DOOR_OPEN",
name = "open door", image = "terrain/granite_door1_open.png",
display = "'", color_r=238, color_g=154, color_b=77,
display = "'", color_r=238, color_g=154, color_b=77, back_color=colors.DARK_GREY,
always_remember = true,
door_closed = "DOOR",
}
......@@ -85,12 +85,12 @@ newEntity{
newEntity{
define_as = "OLD_FLOOR",
name = "floor", image = "terrain/maze_floor.png",
display = '.', color_r=255, color_g=255, color_b=255,
display = '.', color_r=255, color_g=255, color_b=255, back_color=colors.DARK_GREY,
}
newEntity{
define_as = "OLD_WALL",
name = "wall", image = "terrain/granite_wall_lichen.png",
name = "wall", image = "terrain/granite_wall_lichen.png", back_color=colors.GREY,
display = '#', color_r=255, color_g=255, color_b=255,
always_remember = true,
does_block_move = true,
......
......@@ -20,13 +20,13 @@
newEntity{
define_as = "GRASS",
name = "grass", image = "terrain/grass.png",
display = '.', color=colors.LIGHT_GREEN,
display = '.', color=colors.LIGHT_GREEN, back_color={r=44,g=95,b=43},
}
newEntity{
define_as = "TREE",
name = "tree", image = "terrain/tree.png",
display = '#', color=colors.LIGHT_GREEN,
display = '#', color=colors.LIGHT_GREEN, back_color={r=44,g=95,b=43},
always_remember = true,
can_pass = {pass_tree=1},
does_block_move = true,
......@@ -37,13 +37,13 @@ newEntity{
newEntity{
define_as = "GRASS_DARK1",
name = "grass", image = "terrain/grass_dark1.png",
display = '.', color=colors.GREEN,
display = '.', color=colors.GREEN, back_color={r=44,g=95,b=43},
}
newEntity{
define_as = "TREE_DARK1",
name = "tree", image = "terrain/tree_dark1.png",
display = '#', color=colors.GREEN,
display = '#', color=colors.GREEN, back_color={r=44,g=95,b=43},
always_remember = true,
can_pass = {pass_tree=1},
does_block_move = true,
......@@ -54,5 +54,5 @@ newEntity{
newEntity{
define_as = "FLOWER",
name = "flower", image = "terrain/grass_flower3.png",
display = ';', color=colors.YELLOW,
display = ';', color=colors.YELLOW, back_color={r=44,g=95,b=43},
}
......@@ -20,13 +20,13 @@
newEntity{
define_as = "SAND",
name = "sand", image = "terrain/sand.png",
display = '.', color={r=203,g=189,b=72},
display = '.', color={r=203,g=189,b=72}, back_color={r=93,g=79,b=22},
}
newEntity{
define_as = "SANDWALL",
name = "sandwall", image = "terrain/sandwall.png",
display = '#', color={r=203,g=189,b=72},
display = '#', color={r=203,g=189,b=72}, back_color={r=93,g=79,b=22},
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
......@@ -36,7 +36,7 @@ newEntity{
dig = function(src, x, y, old)
local sand = require("engine.Object").new{
name = "unstable sand tunnel", image = "terrain/sand.png",
display = '.', color={r=203,g=189,b=72},
display = '.', color={r=203,g=189,b=72}, back_color={r=93,g=79,b=22},
canAct = false,
act = function(self)
self:useEnergy()
......
......@@ -20,14 +20,14 @@
newEntity{
define_as = "WATER_FLOOR",
name = "underwater", image = "terrain/water_floor.png",
display = '.', color=colors.LIGHT_BLUE,
display = '.', color=colors.LIGHT_BLUE, back_color=colors.DARK_BLUE,
air_level = -5, air_condition="water",
}
newEntity{
define_as = "WATER_WALL",
name = "wall", image = "terrain/water_wall.png",
display = '#', color=colors.AQUAMARINE,
display = '#', color=colors.AQUAMARINE, back_color=colors.DARK_BLUE,
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
......
......@@ -19,18 +19,18 @@
-- The far east on Arda
quickEntity('w', {always_remember = true, show_tooltip=true, name='Sun Wall', display='^', color=colors.GOLD, image="terrain/mountain.png", tint=colors.GOLD, block_move=true})
quickEntity('=', {always_remember = true, show_tooltip=true, name='the great sea', display='~', color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity(' ', {always_remember = true, show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('~', {always_remember = true, show_tooltip=true, name='river', display='~', color={r=0, g=80, b=255}, image="terrain/river.png", can_encounter=true, equilibrium_level=-10})
quickEntity('s', {always_remember = true, show_tooltip=true, name='desert', display='.', color={r=203,g=189,b=72}, image="terrain/sand.png", can_encounter=true, equilibrium_level=-10})
quickEntity('t', {always_remember = true, show_tooltip=true, name='forest', display='#', color=colors.LIGHT_GREEN, image="terrain/tree.png", block_move=true})
quickEntity('m', {always_remember = true, show_tooltip=true, name='mountains', display='^', color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('h', {always_remember = true, show_tooltip=true, name='low hills', display='^', color=colors.GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10})
quickEntity('w', {always_remember = true, show_tooltip=true, name='Sun Wall', display='^', color=colors.GOLD, back_color=colors.CRIMSON, image="terrain/mountain.png", tint=colors.GOLD, block_move=true})
quickEntity('=', {always_remember = true, show_tooltip=true, name='the great sea', display='~', color=colors.DARK_BLUE, back_color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity(' ', {always_remember = true, show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('~', {always_remember = true, show_tooltip=true, name='river', display='~', color={r=0, g=80, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10})
quickEntity('s', {always_remember = true, show_tooltip=true, name='desert', display='.', color={r=203,g=189,b=72}, back_color={r=163,g=149,b=42}, image="terrain/sand.png", can_encounter=true, equilibrium_level=-10})
quickEntity('t', {always_remember = true, show_tooltip=true, name='forest', display='#', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/tree.png", block_move=true})
quickEntity('m', {always_remember = true, show_tooltip=true, name='mountains', display='^', color=colors.LIGHT_UMBER, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('h', {always_remember = true, show_tooltip=true, name='low hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10})
--quickEntity('A', {always_remember = true, show_tooltip=true, name="Caves below the tower of Amon Sûl", display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="tower-amon-sul"})
quickEntity('1', {always_remember = true, show_tooltip=true, name="Gates of Morning", desc="A massive hole in the Sun Wall", display='*', color=colors.GOLD, image="terrain/gate-morning.png", tint=colors.GOLD, notice = true, change_level=1, change_zone="town-gates-of-morning"})
quickEntity('1', {always_remember = true, show_tooltip=true, name="Gates of Morning", desc="A massive hole in the Sun Wall", display='*', color=colors.GOLD, back_color=colors.CRIMSON, image="terrain/gate-morning.png", tint=colors.GOLD, notice = true, change_level=1, change_zone="town-gates-of-morning"})
--quickEntity('2', {always_remember = true, show_tooltip=true, name="Minas Tirith (Town)", desc="Captical city of the Reunited-Kingdom and Gondor ruled by High King Eldarion", display='*', color={r=255, g=255, b=255}, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-minas-tirith"})
-- Load encounters for this map
......
......@@ -19,30 +19,30 @@
-- The western parts of Middle-earth on Arda
quickEntity('a', {show_tooltip=true, name='Ephel Duath', display='^', color=colors.LIGHT_DARK, image="terrain/mountain.png", block_move=true})
quickEntity('d', {show_tooltip=true, name='Haradwaith', display='.', color={r=203,g=189,b=72}, image="terrain/sand.png", block_move=true})
quickEntity('b', {show_tooltip=true, name='blue mountains', display='^', color=colors.LIGHT_BLUE, image="terrain/mountain.png", block_move=true})
quickEntity('m', {show_tooltip=true, name='misty mountains', display='^', color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('f', {show_tooltip=true, name='grey mountains', display='^', color=colors.SLATE, image="terrain/mountain.png", block_move=true})
quickEntity('u', {show_tooltip=true, name='deep forest', display='#', color=colors.GREEN, image="terrain/tree.png", block_move=true})
quickEntity('t', {show_tooltip=true, name='forest', display='#', color=colors.LIGHT_GREEN, image="terrain/tree.png", block_move=true})
quickEntity('v', {show_tooltip=true, name='old forest', display='#', color=colors.GREEN, image="terrain/tree_dark1.png", block_move=true})
quickEntity('i', {show_tooltip=true, name='iron mountains', display='^', color=colors.SLATE, image="terrain/mountain.png", block_move=true})
quickEntity('=', {show_tooltip=true, name='the great sea', display='~', color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity('.', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('g', {show_tooltip=true, name='Forodwaith, the cold lands', display='.', color=colors.LIGHT_BLUE, can_encounter=true, equilibrium_level=-10})
quickEntity('q', {show_tooltip=true, name='Icebay of Forochel', display=';', color=colors.LIGHT_BLUE, can_encounter=true, equilibrium_level=-10})
quickEntity('w', {show_tooltip=true, name='ash', display='.', color=colors.WHITE, image="terrain/ash1.png", can_encounter=true})
quickEntity('&', {show_tooltip=true, name='hills', display='^', color=colors.GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10})
quickEntity('h', {show_tooltip=true, name='low hills', display='^', color=colors.GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10})
quickEntity(' ', {show_tooltip=true, name='sea of Rhun', display='~', color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity('_', {show_tooltip=true, name='river', display='~', color={r=0, g=80, b=255}, image="terrain/river.png", can_encounter=true, equilibrium_level=-10})
quickEntity('~', {show_tooltip=true, name='Anduin river', display='~', color={r=0, g=30, b=255}, image="terrain/river.png", can_encounter=true, equilibrium_level=-10})
quickEntity('-', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('|', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('x', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('s', {show_tooltip=true, name='dead marches', display='~', color=colors.DARK_GREEN, can_encounter=true})
quickEntity('"', {show_tooltip=true, name='the valley of Nurn', display='.', color=colors.WHITE, image="terrain/ash1.png", can_encounter=true})
quickEntity('a', {show_tooltip=true, name='Ephel Duath', display='^', color=colors.LIGHT_DARK, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('d', {show_tooltip=true, name='Haradwaith', display='.', color={r=203,g=189,b=72}, back_color={r=163,g=149,b=42}, image="terrain/sand.png", block_move=true})
quickEntity('b', {show_tooltip=true, name='blue mountains', display='^', color=colors.LIGHT_BLUE, back_color=colors.BLUE, image="terrain/mountain.png", block_move=true})
quickEntity('m', {show_tooltip=true, name='misty mountains', display='^', color=colors.LIGHT_UMBER, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('f', {show_tooltip=true, name='grey mountains', display='^', color=colors.SLATE, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('u', {show_tooltip=true, name='deep forest', display='#', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/tree.png", block_move=true})
quickEntity('t', {show_tooltip=true, name='forest', display='#', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/tree.png", block_move=true})
quickEntity('v', {show_tooltip=true, name='old forest', display='#', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/tree_dark1.png", block_move=true})
quickEntity('i', {show_tooltip=true, name='iron mountains', display='^', color=colors.SLATE, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true})
quickEntity('=', {show_tooltip=true, name='the great sea', display='~', color=colors.DARK_BLUE, back_color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity('.', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('g', {show_tooltip=true, name='Forodwaith, the cold lands', display='.', color=colors.LIGHT_BLUE, back_color=colors.BLUE, can_encounter=true, equilibrium_level=-10})
quickEntity('q', {show_tooltip=true, name='Icebay of Forochel', display=';', color=colors.LIGHT_BLUE, back_color=colors.BLUE, can_encounter=true, equilibrium_level=-10})
quickEntity('w', {show_tooltip=true, name='ash', display='.', color=colors.WHITE, back_color=colors.LIGHT_DARK, image="terrain/ash1.png", can_encounter=true})
quickEntity('&', {show_tooltip=true, name='hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10})
quickEntity('h', {show_tooltip=true, name='low hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10})
quickEntity(' ', {show_tooltip=true, name='sea of Rhun', display='~', color=colors.BLUE, back_color=colors.BLUE, image="terrain/river.png", block_move=true})
quickEntity('_', {show_tooltip=true, name='river', display='~', color={r=0, g=80, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10})
quickEntity('~', {show_tooltip=true, name='Anduin river', display='~', color={r=0, g=30, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10})
quickEntity('-', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('|', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('x', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10})
quickEntity('s', {show_tooltip=true, name='dead marches', display='~', color=colors.DARK_GREEN, back_color=colors.DARK_GREEN, can_encounter=true})
quickEntity('"', {show_tooltip=true, name='the valley of Nurn', display='.', color=colors.WHITE, back_color=colors.LIGHT_DARK, image="terrain/ash1.png", can_encounter=true})
quickEntity('A', {show_tooltip=true, name="Caves below the tower of Amon Sûl", display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="tower-amon-sul"})
quickEntity('B', {show_tooltip=true, name="Passageway into the Trollshaws", display='>', color={r=0, g=255, b=0}, notice = true, change_level=1, change_zone="trollshaws"})
......@@ -51,12 +51,12 @@ quickEntity('D', {show_tooltip=true, name="A path into the Old Forest", displa
quickEntity('E', {show_tooltip=true, name="A mysterious hole in the beach", display='>', color={r=200, g=255, b=55}, notice = true, change_level=1, change_zone="sandworm-lair"})
quickEntity('F', {show_tooltip=true, name="The entry to the old tower of Tol Falas",display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="tol-falas"})
quickEntity('1', {show_tooltip=true, name="Bree (Town)", desc="A quiet town at the crossroads of the north", display='*', color={r=255, g=255, b=255}, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-bree"})
quickEntity('2', {show_tooltip=true, name="Minas Tirith (Town)", desc="Captical city of the Reunited-Kingdom and Gondor ruled by High King Eldarion", display='*', color={r=255, g=255, b=255}, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-minas-tirith"})
quickEntity('1', {show_tooltip=true, name="Bree (Town)", desc="A quiet town at the crossroads of the north", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-bree"})
quickEntity('2', {show_tooltip=true, name="Minas Tirith (Town)", desc="Captical city of the Reunited-Kingdom and Gondor ruled by High King Eldarion", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-minas-tirith"})
-- Angolwen is only know from the start to mages
if game.player.descriptor.class == "Mage" then
quickEntity('3', {show_tooltip=true, name="Angolwen, the hidden city of magic", desc="Secret place of magic, set apart from the world to protect it.", display='*', color=colors.WHITE, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-angolwen"})
quickEntity('3', {show_tooltip=true, name="Angolwen, the hidden city of magic", desc="Secret place of magic, set apart from the world to protect it.", display='*', color=colors.WHITE, back_color=colors.UMBER, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-angolwen"})
else
quickEntity('3', 'b')
end
......
......@@ -89,7 +89,7 @@ newTalent{
local e = Object.new{
old_feat = game.level.map(x, y, Map.TERRAIN),
name = "summoned ice wall",
display = '#', color=colors.LIGHT_BLUE,
display = '#', color=colors.LIGHT_BLUE, back_color=colors.BLUE,
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
......
......@@ -122,7 +122,7 @@ newTalent{
local e = Object.new{
old_feat = game.level.map(x + i, y + j, Map.TERRAIN),
name = "summoned wall", image = "terrain/granite_wall1.png",
display = '#', color_r=255, color_g=255, color_b=255,
display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY,
always_remember = true,
can_pass = {pass_wall=1},
block_move = true,
......
......@@ -100,7 +100,7 @@ newTalent{
points = 5,
mode = "sustained",
cooldown = 10,
sustain_mana = 40,
sustain_mana = 75,
tactical = {
DEFEND = 10,
},
......
......@@ -22,7 +22,7 @@ load("/data/general/grids/basic.lua")
newEntity{
define_as = "FAR_EAST_PORTAL",
name = "Farportal: the Far East",
display = '&', color_r=255, color_g=0, color_b=220,
display = '&', color_r=255, color_g=0, color_b=220, back_color=colors.VIOLET,
notice = true,
always_remember = true,
show_tooltip = true,
......
......@@ -62,9 +62,12 @@ end
function _M:generateList()
local list = {
{name="32x32 Graphical", mode=1},
{name="16x16 Graphical", mode=2},
{name="16x16 ASCII", mode=3},
{name="32x32 Graphical", mode=1},
{name="16x16 Graphical", mode=2},
{name="32x32 ASCII", mode=3},
{name="16x16 ASCII", mode=4},
{name="32x32 ASCII with background", mode=5},
{name="16x16 ASCII with background", mode=6},
}
self.list = list
end
......
......@@ -551,7 +551,7 @@ static int sdl_new_tile(lua_State *L)
if (txt)
{
SDL_SetAlpha(txt, 0, 0);
if (!alpha) SDL_SetAlpha(txt, 0, 0);
sdlDrawImage(*s, txt, x, y);
SDL_FreeSurface(txt);
}
......
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