local restless_plot = function ()
outputsave()
Clear()
bloodslide()
clearkeybuf()
plotwrite(6, 7, RED, 60, "Death befalls all",
" ",
"Some accept it.",
"Some struggle, but achieve nothing...")
if escapepressed() then
return
end
enter()
Clear()
Update()
plotwrite(6, 8, RED, 60, "And, finally, there those that are too determined and stubborn to",
"simply die.",
"They do not want to go gently.")
if escapepressed() then
return
end
enter()
Clear()
Update()
plotwrite(6, 8, RED, 60, "They drape themselves in armour of scorn and hatred.",
"They shape their anger and fear into a blade as sharp as sin.",
"And challenge Death itself for a fight.")
if escapepressed() then
return
end
enter()
Clear()
Update()
plotwrite(6, 8, RED, 60, "They fuel their rage- and undeath by killing the denizens of Hell.",
"Ultimately they all lose.",
"Yet the tale exists of one who succeeded.")
if escapepressed() then
return
end
enter()
clearkeybuf()
end
Beings {
name = "Azrael",
sID = "azrael",
ascii = "A",
color = LIGHTRED,
toHit = 4,
toDam = 20,
HP = 200,
armor = 8,
speed = 175,
danger = 15,
toHitMelee = 8,
attackchance = 100,
flags = {BF_UNIQUENAME, BF_HUNTING, BF_CHARGE},
desc = "The Angel Of Death. The true and the only.",
OnDie = function ()
UI.msg("So is it. You have suceeded!")
Player.win()
end,
}
Beings {
name = "psyche",
sID = "darkness",
ascii = "P",
color = CYAN,
toHit = 2,
toDam = 5,
HP = 40,
armor = 2,
speed = 175,
danger = 5,
toHitMelee = 2,
attackchance = 100,
desc = "A moving portal to places worse than the one you are in. Or you think so.",
OnCreate = function ()
UI.msg("Memories come to life again!")
Level.summon(NPC_MOOKSKELETON, random(4) + 1)
end,
OnAction = function ()
if(random(8) == 0) then
UI.msg("Another maimed memory enters the arena!")
Level.summon(NPC_MOOKSKELETON)
end
end,
}
Beings {
name = "essence Of The Hunt",
sID = "eoth",
ascii = "*",
color = LIGHTRED,
toHit = 4,
toDam = 5,
HP = 30,
armor = 2,
speed = 250,
danger = 5,
toHitMelee = 5,
attackchance = 100,
flags = {BF_HUNTING, BF_CHARGE},
desc = "Anger given form.",
OnCreate = function()
UI.msg("You feel hunted!")
Being.setWeapon(ITEM_PAW)
end,
OnDie = function()
UI.msg("You absorb the essence. You feel refreshed.")
Player.clearTired()
end,
}
Beings {
name = "Shade",
sID = "shade",
ascii = "*",
color = LIGHTBLUE,
toHit = 0,
HP = 1,
armor = 0,
speed = 50,
danger = 0,
toHitMelee = 4,
attackchance = 100,
desc = "Deathless shade of one of yours predcessors.",
OnDie = function()
UI.msg("You absorb the essence. You feel refreshed.")
Player.clearTired()
end,
}
Beings {
name = "resigned",
sID = "resigned",
ascii = "*",
color = BROWN,
toHit = 0,
HP = 1,
armor = 0,
speed = 100,
danger = 1,
toHitMelee = 8,
attackchance = 100,
desc = "Deathless shade of one of yours predcessors, who have abandoned the fight. Do not make their mistake.",
OnDie = function()
UI.msg("You absorb the essence. You feel refreshed.")
Player.clearTired()
Player.hp = min(Player.hp+15,Player.hpmax*3)
end,
}
Beings {
name = "reminiscence",
sID = "mookskeleton",
ascii = "*",
color = WHITE,
toHit = 0,
HP = 5,
todam = 3,
armor = 0,
speed = 100,
danger = 1,
toHitMelee = 2,
flags = {BF_HUNTING, BF_CHARGE},
attackchance = 100,
desc = "Shard of a person taken by Death long time ago...",
OnDie = function()
Player.hp = Player.hp - 5
end,
}
Beings {
name = "solidier's phantom",
sID = "skeleton",
ascii = "s",
color = LIGHTGRAY,
toHit = 0,
HP = 10,
armor = 0,
speed = 100,
danger = 1,
toHitMelee = 0,
attackchance = 60,
desc = "Phantom of a centuries old crossbowman.",
OnCreate = function()
Being.setWeapon(ITEM_CROSSBOW)
Being.addItem(ITEM_BOLTS, 20)
end,
}
Beings {
name = "warrior's phantom",
sID = "skeletonw",
ascii = "s",
color = DARKGRAY,
toHit = 0,
HP = 10,
armor = 0,
speed = 100,
danger = 2,
toHitMelee = 0,
attackchance = 75,
desc = "This shade must have been through a lot of battlefields before",
OnCreate = function()
Being.setWeapon(ITEM_HCROSSBOW)
Being.addItem(ITEM_BOLTS, 20)
end,
}
Beings {
name = "sharpshooter's phantom",
sID = "skeletons",
ascii = "s",
color = RED,
toHit = 0,
HP = 10,
armor = 2,
speed = 120,
danger = 2,
toHitMelee = 0,
attackchance = 75,
desc = "He is called a sharpshooter for a reason",
OnCreate = function()
Being.setWeapon(ITEM_SBOW)
Being.addItem(ITEM_ARROWS, 100)
end,
}
Beings {
name = "dead hero",
sID = "skeletonh",
ascii = "s",
color = MAGENTA,
toHit = 0,
HP = 20,
armor = 2,
speed = 100,
danger = 4,
toHitMelee = 0,
attackchance = 75,
desc = "Even in death, he's power is impressive",
OnCreate = function()
Being.setWeapon(ITEM_RCROSSBOW)
Being.addItem(ITEM_BOLTS, 40)
end,
}
local levels={
0, --1
0, --2
1, --3
1, --4
2, --5
3, --6
4, --7
4, --8
4, --9
4, --10
5, --10/1
5, --11
5, --12
6, --13
6, --14
7, --15
9, --16
9, --17
12, --18
13, --19
14, --20
16, --21
20, --21
}
local beings={
NPC_SKELETON, --1
NPC_LOSTSOUL, --2
NPC_IMP, --3
NPC_DEMON, --4
NPC_SKELETONW, --5
NPC_PAIN, --6
NPC_SKELETONS, --7
NPC_SHADE, --8
NPC_CACODEMON, --9
NPC_KNIGHT, --10
NPC_DARKNESS, --10/1
NPC_RESIGNED, --11
NPC_BARON, --12
NPC_ARACHNO, --13
NPC_SKELETONH, --14
NPC_REVENANT, --15
NPC_ARCH, --16
NPC_MANCUBUS, --17
NPC_EOTH, --18
NPC_NIMP, --19
NPC_NDEMON, --20
NPC_NCACODEMON, --21
NPC_BRUISER, --22
}
Level.rollBeing = function ( arg_level)
local array = {}
for i = 1, #beings do
if (levels[i] > arg_level) then
break
end
array[i] = beings[i]
end
return(randompick(array))
end
Items{
name = "Sword Of Contempt",
sID = "sword",
type = ITEMTYPE_MELEE,
acc = 2,
damage = "5d5",
flags = {IF_CURSED},
fire = 7.5,
group = "weapon-melee",
damagetype = DAMAGE_PHYSICAL,
altfire = ALT_WHIRLWIND,
}
Items{
name = "Sword Of Scorn",
sID = "sword1",
type = ITEMTYPE_MELEE,
acc = 3,
damage = "6d6",
flags = {IF_CURSED},
fire = 6,
group = "weapon-melee",
damagetype = DAMAGE_PLASMA,
altfire = ALT_WHIRLWIND,
}
Items{
name = "Sword Of Rage",
sID = "sword2",
type = ITEMTYPE_MELEE,
acc = 4,
damage = "7d7",
flags = {IF_CURSED},
fire = 5,
group = "weapon-melee",
damagetype = DAMAGE_IGNOREARMOR,
altfire = ALT_WHIRLWIND,
}
Items{
name = "Hunter's Paw",
sID = "paw",
type = ITEMTYPE_MELEE,
acc = 2,
damage = "3d3",
flags = {IF_NODROP},
fire = 0.5,
group = "weapon-melee",
damagetype = DAMAGE_PLASMA,
}
Items{
name = "Armor Of Contempt",
sID = "aoc",
type = ITEMTYPE_ARMOR,
armor = "3",
movemod = "0",
knockmod = "0",
color = LIGHTRED,
flags = {IF_CURSED, IF_NECROCHARGE, IF_NODESTROY},
}
Items{
name = "Armor Of Disdain",
sID = "aod",
type = ITEMTYPE_ARMOR,
armor = "4",
movemod = "-10",
knockmod = "-25",
color = LIGHTRED,
flags = {IF_CURSED, IF_NECROCHARGE, IF_NODESTROY},
}
Items{
name = "Armor Of Hatred",
sID = "aoh",
type = ITEMTYPE_ARMOR,
armor = "5",
movemod = "-25",
knockmod = "-50",
color = LIGHTRED,
flags = {IF_CURSED, IF_NECROCHARGE, IF_NODESTROY},
}
Items{
name = "Bolt",
sID = "bolts",
type = ITEMTYPE_AMMO,
ammo = 20,
flags = {IF_NODROP},
ammomax = 20,
}
Items{
name = "Arrow",
sID = "arrows",
type = ITEMTYPE_AMMO,
ammo = 50,
flags = {IF_NODROP},
ammomax = 100,
}
Items{
name = "Crossbow",
sID = "crossbow",
type = ITEMTYPE_RANGED,
acc = 2,
damage = "3d5",
fire = 10,
ammomax = 1,
flags = {IF_NODROP},
ammoID = ITEM_BOLTS,
reload = 10,
missile = MISSILE_GUN,
group = "weapon-ranged",
damagetype = DAMAGE_SHARPNEL,
}
Items{
name = "Heavy Crossbow",
sID = "hcrossbow",
type = ITEMTYPE_RANGED,
acc = 8,
damage = "4d5",
fire = 15,
ammomax = 1,
flags = {IF_NODROP},
ammoID = ITEM_BOLTS,
reload = 20,
missile = MISSILE_GUN,
group = "weapon-ranged",
damagetype = DAMAGE_SHARPNEL,
}
Items{
name = "Longbow",
sID = "sbow",
type = ITEMTYPE_RANGED,
acc = 6,
damage = "2d5",
fire = 3,
ammomax = 1,
ammoID = ITEM_ARROWS,
flags = {IF_NODROP},
reload = 1,
missile = MISSILE_GUN,
group = "weapon-ranged",
}
Items{
name = "Repeating Crossbow",
sID = "rcrossbow",
type = ITEMTYPE_RANGED,
acc = 4,
damage = "2d5",
shots = 4,
fire = 5,
flags = {IF_NODROP},
ammomax = 40,
ammoID = ITEM_BOLTS,
reload = 20,
missile = MISSILE_CHAINGUN,
group = "weapon-chain",
damagetype = DAMAGE_SHARPNEL,
}
Items{
name = "Crossbow Of Pain",
sID = "pcrossbow",
type = ITEMTYPE_RANGED,
acc = 4,
damage = "2d5",
shots = 3,
fire = 10,
ammomax = 40,
ammoID = ITEM_BOLTS,
reload = 20,
missile = MISSILE_CHAINGUN,
group = "weapon-chain",
damagetype = DAMAGE_SHARPNEL,
flags = {IF_CURSED, IF_RECHARGE},
}
Items{
name = "Crossbow Of Suffering",
sID = "scrossbow",
type = ITEMTYPE_RANGED,
acc = 5,
damage = "3d5",
shots = 4,
fire = 8,
ammomax = 60,
ammoID = ITEM_BOLTS,
reload = 20,
missile = MISSILE_CHAINGUN,
group = "weapon-chain",
damagetype = DAMAGE_PHYSICAL,
flags = {IF_CURSED, IF_RECHARGE},
}
Items{
name = "Crossbow Of Torment",
sID = "tcrossbow",
type = ITEMTYPE_RANGED,
acc = 6,
damage = "4d5",
shots = 5,
fire = 5,
ammomax = 80,
ammoID = ITEM_BOLTS,
reload = 20,
missile = MISSILE_CHAINGUN,
group = "weapon-chain",
damagetype = DAMAGE_SHARPNEL,
flags = {IF_CURSED, IF_RECHARGE},
}
Cells{
sID = "aether",
name = "aether",
ascii = "\249",
asciilow = ".",
color = BLACK,
color_dark = BLACK,
set = CELLSET_FLOORS,
flags = { CF_OVERLAY, CF_NOCHANGE },
bloodto = "blood",
}
Cells{
sID = "aaether",
name = "dense aether",
ascii = "\249",
asciilow = ".",
color = CYAN,
color_dark = BLACK,
bloodto = "blood",
}
Cells{
sID = "fdreams",
name = "frozen dream",
ascii = "#",
color = BLUE,
color_dark = BLACK,
set = CELLSET_WALLS,
flags = { CF_BLOCKMOVE, CF_OVERLAY },
}
Cells{
sID = "aaaether",
name = "dense aether",
ascii = "#",
color = DARKGRAY,
color_dark = BLACK,
set = CELLSET_WALLS,
flags = { CF_BLOCKMOVE, CF_OVERLAY },
}
Cells{
sID = "border",
name = "dense aether",
ascii = "#",
color = BLACK,
color_dark = BLACK,
set = CELLSET_WALLS,
flags = { CF_BLOCKMOVE, CF_BLOCKLOS, CF_OVERLAY },
}
Cells{
sID = "etheral",
name = "dense aether",
ascii = "#",
color = RED,
color_dark = BLACK,
set = CELLSET_WALLS,
flags = { CF_BLOCKMOVE, CF_BLOCKLOS, CF_OVERLAY },
}
--Creation of Infinite Arena
Levels ("CUSTOM", {
name = "Limbo",
Create = function ()
restless_plot ()
Level.fill(CELL_BORDER)
Level.tile(".", CELL_AAETHER)
Level.tile("X", CELL_FDREAMS)
Level.tile("#", CELL_ETHERAL)
Level.tile("Z", CELL_AAAETHER)
Level.tile(",", CELL_AETHER)
Level.tile(">", CELL_STAIRS)
Level.put(2, 2, {
"######X####################ZZZX.........ZZZ#ZXXZ##ZZ####X#####X#X###########",
"#####X##X#X.....................................................X##X#X#X####",
"###X#..................................................................X#X##",
"#X........................................................................X#",
"#..........................................................................#",
"....,.......................................................................",
".................................,...,......................................",
".,.....................................,....................................",
"..,>.,..........................,...........................................",
".,..,.................................,.,...................................",
"................................,......,....................................",
"...................................,........................................",
"............................................................................",
"#..........................................................................X",
"#X........................................................................##",
"##X##..................................................................#X###",
"##X#X###X##.....................................................##X##X######",
"#########X##X#XX##X####XXZ#Z##..........XXZXX#ZX##ZX#####X#X##X###########X#",
}) --draws the map base
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",#XX#.",
".XXXX,",
".#XX#.",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",.#.#.",
"..ZZX,",
"..#.#.",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",#..Z.",
".X..X,",
".ZXX#.",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",###..",
".#ZZ#,",
"..###.",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",..XX.",
".XXZX,",
".ZX...",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",.X.Z.",
"..ZXX,",
"...X..",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",X....",
".XXX.,",
".ZXXX.",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatterPut(5, 3, 68, 15, {
",..,.,",
",.####",
"..#.#,",
".##.#.",
",..,.,",
}, CELL_AAETHER, 1 + random(4)) --Draws some nice blocks to hide behind
Level.scatter(2, 2, 77, 19, CELL_AAETHER, CELL_AETHER, 25) --Add some blood to the floor
Level.player(38, 10)
end,
OnEnter = function ()
Player.clearInv()
Player.clearEq()
Player.setArmor( ITEM_AOC )
Player.setWeapon ( ITEM_SWORD )
Level.result(1)
UI.msg("You feel the rage all over your soul.")
UI.msg("\"Let none of them survive. Only then you achieve what you hope for.\"")
Level.summon(NPC_SKELETON,6)
Level.summon(NPC_SKELETONW,1)
end,
OnKill = function ()
Player.hp = min(Player.hp+5,Player.hpmax*3)
end,
OnKillAll = function ()
UI.msg("Round " .. Level.result() .. " complete!")
if Level.result() == 25 then
UI.msg("You hear voice so cold as it would belong to death himself, \"You have done well, soul. Better than I could imagine.\"")
Level.summon(NPC_AZRAEL,1)
Level.summon(NPC_SHADE, 20)
--Don't print any announcer blathering
-- ALWAYS continue regardless.
end
if Level.result() == 10 then
UI.msg("Your sword sharpens. Your armor hardens")
Player.clearInv()
Player.clearEq()
Player.setWeapon( ITEM_SWORD1 )
Player.setArmor( ITEM_AOD )
end
if Level.result() == 20 then
UI.msg("Your sword sharpens. Your armor hardens")
Player.clearInv()
Player.clearEq()
Player.setWeapon( ITEM_SWORD2 )
Player.setArmor( ITEM_AOH )
end
if true then --continuing
--Randomly select a level change message
UI.msgEnter(randompick( {
"\"By obliteration of my enemies, I earn my salvation.\"",
"\"Blood of the guilty is all I carve for.\"",
"\"There is no rest for the wicked.\"",
"\"Even the horrors of Hell can't stop me.\"",
"\"I shall NOT falter!\"",
"\"Let them come. I HUNGER!\"",
"\"I am the Death incarnate!\""
} ))
Level.summon(NPC_SHADE, random (3))
Level.summon(NPC_MOOKSKELETON, Level.result() + random(4) + 1)
--unfortunately there's no Level.rollBeing (yet). So we'll have to emulate it...
Level.summon(Level.rollBeing( max(Level.result() - 2, 0)), resolverange(3, Level.result() / 4 + 6))
Level.summon(Level.rollBeing( Level.result()), resolverange(2, Level.result() / 6 + 4))
Level.summon(Level.rollBeing( Level.result() + 2), 1)
Level.result(Level.result() + 1);
-- You will NEVER quit
-- ...So there is no reward either
end
end,
OnExit = function ()
if Level.result() < 10 then
UI.msg("And so I quit, tired with slaughter\"")
else
UI.msg("Quoth the raven, nevermore!\"")
end
end,
})