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

New painted lore for game win

git-svn-id: http://svn.net-core.org/repos/t-engine4@4217 51575b47-30f0-44d4-a5cc-537603b46e54
parent c6ffc58a
No related branches found
No related tags found
No related merge requests found
......@@ -922,6 +922,18 @@ dir_sides =
[9] = {left=8, right=6},
}
opposed_dir = {
[1] = 9,
[2] = 8,
[3] = 7,
[4] = 6,
[5] = 5,
[6] = 4,
[7] = 3,
[8] = 2,
[9] = 1,
}
util = {}
function util.getDir(x1, y1, x2, y2)
......
......@@ -1069,11 +1069,11 @@ function _M:setupCommands()
end end
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
local list = mod.class.NPC:loadList("/data/general/npcs/humanoid_random_boss.lua")
local b = list[3]
local m = self.state:createRandomBoss(b, {level=self.player.level, nb_classes=0, force_classes={Rogue=true}, rank=5})
m:resolve() m:resolve(nil, true)
self.zone:addEntity(self.level, m, "actor", self.player.x + 1, self.player.y)
local list = mod.class.Trap:loadList("/data/general/traps/complex.lua")
local b = list[2]:clone()
b:resolve() b:resolve(nil, true)
self.zone:addEntity(self.level, b, "trap", self.player.x + 1, self.player.y)
end end,
[{"_f","ctrl"}] = function() if config.settings.cheat then
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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_COMPLEX",
type = "complex", id_by_type=true, unided_name = "trap",
display = '^',
triggered = function(self, x, y, who)
return true
end,
}
newEntity{ base = "TRAP_COMPLEX",
subtype = "boulder",
name = "giant boulder trap", image = "trap/trap_pressure_plate_01.png",
detect_power = 6, disarm_power = 6,
rarity = 3, level_range = {1, 30},
color_r=40, color_g=220, color_b=0,
message = "@Target@ walks on a trap, there is a loud noise.",
on_added = function(self, level, x, y)
local walls = {}
for i, dir in ipairs{4,6,8,2} do
local i, j = x, y
local g
repeat
i, j = util.coordAddDir(i, j, dir)
g = game.level.map(i, j, engine.Map.TERRAIN)
until not g or g:check("block_move")
if g and not g.is_door and core.fov.distance(x, y, i, j) >= 2 then
i, j = util.coordAddDir(i, j, opposed_dir[dir])
walls[#walls+1] = {x=i, y=j}
end
end
if #walls == 0 then game.level.map:remove(i, j, engine.Map.TRAP) return end
local spot = rng.table(walls)
local l = line.new(spot.x, spot.y, x, y)
self.spawn_x, self.spawn_y = l()
print("Boulder trap spawn", self.spawn_x, self.spawn_y)
self.x, self.y = x, y
end,
str = resolvers.mbonus(200, 30),
dam = resolvers.mbonus_level(300, 5),
combatAttackStr = function(self) return self.str end,
triggered = function(self, x, y, who)
if not self.spawn_x then return end
local tg = {name="huge boulder", type="bolt", range=5, x=self.spawn_x, y=self.spawn_y, speed=2, display={image="trap/trap_big_boulder_01.png"}}
self:projectile(tg, x, y, engine.DamageType.PHYSKNOCKBACK, {dam=self.dam, dist=3})
return true
end,
}
game/modules/tome/data/gfx/lore/closing_farportal.png

296 KiB

-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
newLore{
id = "closing-farportal",
category = "high peak",
name = "closing the void farportal", always_pop = true,
image = "closing_farportal.png",
lore = [[The void farportal is closed, preventing untold horrors from assaulting Eyal.]],
}
......@@ -43,4 +43,5 @@ load("/data/lore/age-allure.lua")
load("/data/lore/age-pyre.lua")
load("/data/lore/fearscape.lua")
load("/data/lore/misc.lua")
load("/data/lore/high-peak.lua")
load("/data/lore/arena.lua")
......@@ -113,6 +113,7 @@ end
function win(self, how)
game:playAndStopMusic("Lords of the Sky.ogg")
game.player:learnLore("closing-farportal")
if how == "full" then world:gainAchievement("WIN_FULL", game.player)
elseif how == "aeryn-sacrifice" then world:gainAchievement("WIN_AERYN", game.player)
......
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