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

It is possible to drop objets on the world map to destroy them

New zone: the High Peak where the final end game battle will take place!


git-svn-id: http://svn.net-core.org/repos/t-engine4@1031 51575b47-30f0-44d4-a5cc-537603b46e54
parent 979875da
No related branches found
No related tags found
No related merge requests found
......@@ -503,7 +503,8 @@ function _M:setupCommands()
end,
[{"_g","ctrl"}] = function()
if config.settings.tome.cheat then
self:changeLevel(1, "slime-tunnels")
self:changeLevel(15, "high-peak")
self.player:grantQuest("high-peak")
end
end,
}
......@@ -601,9 +602,9 @@ function _M:setupCommands()
PICKUP_FLOOR = not_wild(function()
self.player:playerPickup()
end),
DROP_FLOOR = not_wild(function()
DROP_FLOOR = function()
self.player:playerDrop()
end),
end,
SHOW_INVENTORY = function()
local d
local titleupdator = self.player:getEncumberTitleUpdator("Inventory")
......
......@@ -393,7 +393,18 @@ function _M:runMoved()
end
function _M:doDrop(inven, item)
if game.zone.wilderness then game.logPlayer(self, "You can not drop on the world map.") return end
if game.zone.wilderness then
Dialog:yesnoLongPopup("Warning", "You can not drop items on the world map.\nIf you drop it it will be lost forever.", 300, function(ret)
-- The test is reversed because the buttons are reversed, to prevent mistakes
if not ret then
local o = self:removeObject(inven, item, true)
game.logPlayer(self, "You destroy %s.", o:getName{do_colour=true, do_count=true})
self:sortInven()
self:useEnergy()
end
end, "Cancel", "Destroy")
return
end
self:dropFloor(inven, item, true, true)
self:sortInven()
self:useEnergy()
......@@ -545,12 +556,18 @@ end
--- Use a portal with the orb of many ways
function _M:useOrbPortal(portal)
if portal.change_wilderness then
self.current_wilderness = portal.change_wilderness.name
self.wild_x = portal.change_wilderness.x or 0
self.wild_y = portal.change_wilderness.y or 0
if portal.teleport_level then
local x, y = util.findFreeGrid(portal.teleport_level.x, portal.teleport_level.y, 2, true, {[Map.ACTOR]=true})
if x and y then self:move(x, y, true) end
else
if portal.change_wilderness then
self.current_wilderness = portal.change_wilderness.name
self.wild_x = portal.change_wilderness.x or 0
self.wild_y = portal.change_wilderness.y or 0
end
game:changeLevel(portal.change_level, portal.change_zone)
end
game:changeLevel(portal.change_level, portal.change_zone)
if portal.message then game.logPlayer(self, portal.message) end
if portal.on_use then portal:on_use(self) end
end
......
......@@ -19,28 +19,94 @@
defineTile('<', "UP")
defineTile(',', "FLOOR")
defineTile('.', "FLOOR")
defineTile('.', "FLOOR", nil, nil, nil, {lite=true})
defineTile('+', "DOOR")
defineTile('#', "WALL")
defineTile('*', "WALL")
defineTile('#', "WALL", nil, nil, nil, {lite=true})
defineTile('*', "WALL", nil, nil, nil, {lite=true, no_teleport=true})
-- Portals
defineTile('&', "FAR_EAST_PORTAL")
defineTile('"', "WEST_PORTAL")
defineTile('V', "VOID_PORTAL")
defineTile('d', "PORTAL_DESTRUCTION")
defineTile('D', "PORTAL_DRAGON")
defineTile('E', "PORTAL_ELEMENTS")
defineTile('U', "PORTAL_UNDEAD")
defineTile('&', "FAR_EAST_PORTAL", nil, nil, nil, {lite=true})
defineTile('"', "WEST_PORTAL", nil, nil, nil, {lite=true})
defineTile('V', "VOID_PORTAL", nil, nil, nil, {lite=true})
defineTile('d', "PORTAL_DESTRUCTION", nil, nil, nil, {lite=true})
defineTile('D', "PORTAL_DRAGON", nil, nil, nil, {lite=true})
defineTile('E', "PORTAL_ELEMENTS", nil, nil, nil, {lite=true})
defineTile('U', "PORTAL_UNDEAD", nil, nil, nil, {lite=true})
-- Bosses
defineTile('A', "FLOOR", nil, "ALATAR")
defineTile('P', "FLOOR", nil, "PALLANDO")
defineTile('A', "FLOOR", nil, "ALATAR", nil, {lite=true})
defineTile('P', "FLOOR", nil, "PALLANDO", nil, {lite=true})
startx = 1
starty = 1
subGenerator{
x = 0, y = 23, w = 50, h = 52,
generator = "engine.generator.map.Roomer",
data = {
nb_rooms = 7,
rooms = {"simple", "pilar"},
['.'] = "FLOOR",
['#'] = "WALL",
up = "FLOOR",
down = "PORTAL_BOSS",
door = "DOOR",
force_last_stair = true,
},
define_up = true,
}
addSpot({16, 4}, "portal", "destruction")
addSpot({33, 4}, "portal", "dragon")
addSpot({33, 18}, "portal", "undead")
addSpot({16, 18}, "portal", "elements")
return [[
**************************************************
******************..............******************
************..........................************
***********..............#.............***********
***********.....d.......###......U.....***********
************............###...........************
*************............#...........*************
*************............#...........*************
**************......................**************
**************......................**************
*****"""******..........VVV.........******&&&*****
*****"""******..#####..AVVVP..####..******&&&*****
*****"""******..........VVV.........******&&&*****
**************......................**************
**************......................**************
*************............#...........*************
*************............#...........*************
************............###...........************
***********.....E.......###......D.....***********
***********..............#.............***********
************..........................************
******************..............******************
**************************************************
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
......@@ -53,29 +119,6 @@ return [[
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,****************,,,,,,,,,,,,,,,,,
,,,,,,,,,,,*******..............*******,,,,,,,,,,,
,,,,,,,,,,**..........................**,,,,,,,,,,
,,,,,,,,,,*............................*,,,,,,,,,,
,,,,,,,,,,*.....d................U.....*,,,,,,,,,,
,,,,,,,,,,**..........................**,,,,,,,,,,
,,,,,,,,,,,**........................**,,,,,,,,,,,
,,,,,,,,,,,,*........................*,,,,,,,,,,,,
,,,,,,,,,,,,**......................**,,,,,,,,,,,,
**************......................**************
*****"""******..........VVV.........******&&&*****
*****"""******.........AVVVP........******&&&*****
*****"""******..........VVV.........******&&&*****
**************......................**************
,,,,,,,,,,,,**......................**,,,,,,,,,,,,
,,,,,,,,,,,,*........................*,,,,,,,,,,,,
,,,,,,,,,,,**........................**,,,,,,,,,,,
,,,,,,,,,,**..........................**,,,,,,,,,,
,,,,,,,,,,*.....E................D.....*,,,,,,,,,,
,,,,,,,,,,*............................*,,,,,,,,,,
,,,,,,,,,,**..........................**,,,,,,,,,,
,,,,,,,,,,,*******..............*******,,,,,,,,,,,
,,,,,,,,,,,,,,,,,****************,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
......
......@@ -38,6 +38,9 @@ on_status_change = function(self, who, status, sub)
end
open_high_peak = function(self, who)
local wild = game.memory_levels["wilderness-arda-fareast-1"]
wild.map:removeParticleEmitter(wild.data.istari_shield)
local g = game.zone:makeEntityByName(game.level, "terrain", "PEAK_STAIR")
for j = 11, 18 do
game.level.map(249, j, engine.Map.TERRAIN, g)
......
......@@ -55,7 +55,7 @@ This one seems to go to the Misty Mountains in the West.]],
change_level = 1,
change_zone = "wilderness",
change_wilderness = {
x = 9, y = 5,
x = 41, y = 33,
},
message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the slopes of the Misty Mountains, with no trace of the portal...",
on_use = function(self, who)
......@@ -113,3 +113,17 @@ newEntity{
show_tooltip = true,
desc = [[An invocation portal, perpetualy summoning beings through it.]],
}
newEntity{
define_as = "PORTAL_BOSS",
name = "Portal: The Sanctum",
display = '&', color=colors.LIGHT_BLUE, back_color=colors.PURPLE,
notice = true,
always_remember = true,
show_tooltip = true,
desc = [[This portal seems to connect to an other part of this level.]],
orb_portal = {
teleport_level = {x=25, y=8},
message = "#VIOLET#You enter the swirling portal and appear in a large room with other portals and the two wizards.",
},
}
......@@ -20,13 +20,18 @@
-- Orcs & trolls
load("/data/general/npcs/orc-grushnak.lua", rarity(0))
load("/data/general/npcs/orc-vor.lua", rarity(0))
load("/data/general/npcs/orc-rak-shor.lua", rarity(0))
load("/data/general/npcs/orc-gorbat.lua", rarity(0))
load("/data/general/npcs/orc-rak-shor.lua", rarity(6))
load("/data/general/npcs/orc.lua", rarity(8))
--load("/data/general/npcs/troll.lua", rarity(0))
-- Others
load("/data/general/npcs/naga.lua", rarity(6))
load("/data/general/npcs/snow-giant.lua", rarity(0))
load("/data/general/npcs/snow-giant.lua", rarity(6))
-- Demons
load("/data/general/npcs/minor-demon.lua", rarity(3))
load("/data/general/npcs/major-demon.lua", rarity(3))
-- Drakes
load("/data/general/npcs/fire-drake.lua", rarity(10))
......@@ -34,10 +39,10 @@ load("/data/general/npcs/cold-drake.lua", rarity(10))
load("/data/general/npcs/multihued-drake.lua", rarity(10))
-- Undeads
load("/data/general/npcs/bone-giant.lua", rarity(3))
load("/data/general/npcs/vampire.lua", rarity(5))
load("/data/general/npcs/ghoul.lua", rarity(2))
load("/data/general/npcs/skeleton.lua", rarity(3))
load("/data/general/npcs/bone-giant.lua", rarity(10))
load("/data/general/npcs/vampire.lua", rarity(10))
load("/data/general/npcs/ghoul.lua", rarity(10))
load("/data/general/npcs/skeleton.lua", rarity(10))
load("/data/general/npcs/all.lua", rarity(4, 35))
......@@ -139,3 +144,57 @@ newEntity{
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
}
newEntity{ define_as = "HIGH_SUN_PALADIN_AERYN",
type = "humanoid", subtype = "human",
display = "p",
faction = "blue-wizards",
name = "Fallen Sun Paladin Aeryn", color=colors.VIOLET, unique = true,
desc = [[A beautiful woman, clad in a shining plate armour. Power radiates from her.]],
level_range = {56, 56}, exp_worth = 2,
rank = 5,
size_category = 3,
female = true,
max_life = 250, life_rating = 30, fixed_rating = true,
infravision = 20,
stats = { str=15, dex=10, cun=12, mag=16, con=14 },
instakill_immune = 1,
move_others=true,
open_door = true,
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar", },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, HEAD=1, FEET=1 },
resolvers.drops{chance=100, nb=3, {ego_chance=100} },
resolvers.equip{
{type="weapon", subtype="mace", ego_chance=100, autoreq=true},
{type="armor", subtype="shield", ego_chance=100, autoreq=true},
{type="armor", subtype="massive", ego_chance=100, autoreq=true},
{type="armor", subtype="feet", ego_chance=100, autoreq=true},
{type="armor", subtype="head", ego_chance=100, autoreq=true},
},
positive_regen = 15,
resolvers.talents{
[Talents.T_MASSIVE_ARMOUR_TRAINING]=5,
[Talents.T_WEAPON_COMBAT]=10,
[Talents.T_MACE_MASTERY]=10,
[Talents.T_CHANT_OF_FORTITUDE]=5,
[Talents.T_SEARING_LIGHT]=5,
[Talents.T_MARTYRDOM]=5,
[Talents.T_BARRIER]=5,
[Talents.T_WEAPON_OF_LIGHT]=5,
[Talents.T_MARTYRDOM]=5,
[Talents.T_HEALING_LIGHT]=5,
[Talents.T_CRUSADE]=8,
[Talents.T_SUN_FLARE]=5,
[Talents.T_FIREBEAM]=7,
[Talents.T_SUNBURST]=8,
},
resolvers.sustains_at_birth(),
}
......@@ -18,28 +18,28 @@
-- darkgod@te4.org
return {
name = "Taragoëol, the High Peak",
name = "Taragoël, the High Peak",
level_range = {55, 80},
level_scheme = "player",
max_level = 15,
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,
width = 50, height = 75,
all_remembered = true,
all_lited = true,
persistant = "zone",
no_worldport = true,
ambiant_music = "Through the Dark Portal.ogg",
no_level_connectivity = true,
generator = {
map = {
class = "engine.generator.map.Roomer",
nb_rooms = 10,
rooms = {"simple", "pilar", {"pit",6}},
rooms_config = {pit={filters={{type="orc"}, {type="undead"}, {type="naga"}}}},
lite_room_chance = 100,
rooms_config = {pit={filters={{type="orc"}, {type="naga"}, {type="dragon"}, {type="demon"}}}},
lite_room_chance = 10,
['.'] = "FLOOR",
['#'] = "WALL",
up = "UP",
up = "FLOOR",
down = "DOWN",
door = "DOOR",
},
......@@ -61,18 +61,16 @@ return {
end,
levels =
{
[1] = {
generator = { map = {
up = "UP_WILDERNESS_FAR_EAST",
}, },
},
[15] = {
generator = {
map = {
class = "engine.generator.map.Static",
map = "zones/high-peak-last",
},
actor = { nb_npc = {0, 0}, },
actor = {
nb_npc = {30, 40},
area = {x1=0, x2=49, y1=23, y2=23+50},
},
},
},
},
......
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