Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
theflyingape committed Jan 9, 2018
1 parent 3635856 commit 35e7136
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions build/etc/arena.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{ "name":"Hydra", "level":34, "pc":"Dragon", "weapon":25, "armor":"Dragon Scale Mail", "money":"1000s", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Nycadaemon", "level":41, "pc":"Demon", "weapon":"Staff of Striking", "armor":18, "money":"10g", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Red Dragon", "level":44, "pc":"Dragon", "weapon":32, "armor":20, "money":"500g", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Lich", "level":47, "pc":"Undead", "weapon":35, "armor":23, "money":"2500g", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Beholder", "level":50, "pc":"Beast", "weapon":40, "armor":25, "money":"1p", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Demogorgon", "level":99, "pc":"Beast", "weapon":"Staff of the Magi", "armor":25, "money":"1000p", "spells": [ "Heal", "Teleport", "Blast", "Confusion", "Transmute", "Cure", "Illusion", "Disintegrate", "Morph" ] }
{ "name":"Lich", "level":47, "pc":"Undead", "adept":1, "weapon":35, "armor":23, "money":"2500g", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Beholder", "level":50, "pc":"Beast", "adept":1, "weapon":40, "armor":25, "money":"1p", "spells": [ "Heal", "Teleport", "Blast" ] },
{ "name":"Demogorgon", "level":99, "pc":"Beast", "adept":2, "weapon":"Staff of the Magi", "armor":25, "money":"1000p", "spells": [ "Heal", "Teleport", "Blast", "Confusion", "Transmute", "Cure", "Illusion", "Disintegrate", "Morph" ] }
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dankdomain",
"version": "0.9.19",
"version": "0.9.20",
"description": "Dank Domain: the return of Hack & Slash (1990-2014)",
"main": "ttymain",
"publisher": "theflyingape",
Expand Down
6 changes: 4 additions & 2 deletions src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ export function cast(rpc: active, cb:Function, nme?: active, magic?: number, DL?
rpc.altered = true
$.Magic.remove(rpc.user.spells, spell.cast)
xvt.out($.who(rpc, 'His'), 'wand smokes as ', $.who(rpc, 'he'), $.what(rpc, 'cast'), 'the spell.\n')
$.saveUser(rpc)
xvt.waste(300)
}

Expand All @@ -973,6 +974,7 @@ export function cast(rpc: active, cb:Function, nme?: active, magic?: number, DL?
rpc.altered = true
$.Magic.remove(rpc.user.spells, spell.cast)
xvt.out($.who(rpc, 'His'), 'scroll burns as ', $.who(rpc, 'he'), $.what(rpc, 'cast'), 'the spell.\n')
$.saveUser(rpc)
xvt.waste(300)
}

Expand Down Expand Up @@ -1312,7 +1314,7 @@ export function cast(rpc: active, cb:Function, nme?: active, magic?: number, DL?
rpc.user.weapon = $.Weapon.merchant[n]
$.Weapon.equip(rpc, rpc.user.weapon)
xvt.out($.an(rpc.user.weapon.toString()), xvt.reset, '!\n')
rpc.altered = true
$.saveUser(rpc)
}
else {
if (isNaN(+nme.user.weapon))
Expand All @@ -1328,7 +1330,7 @@ export function cast(rpc: active, cb:Function, nme?: active, magic?: number, DL?
nme.user.weapon = $.Weapon.merchant[n]
$.Weapon.equip(nme, nme.user.weapon)
xvt.out($.an(nme.user.weapon.toString()), xvt.reset, '!\n')
nme.altered = true
$.saveUser(nme)
}
xvt.waste(500)
break
Expand Down
2 changes: 1 addition & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,6 @@ export function logoff() {
reason = (xvt.reason ? xvt.reason : 'mystery')
}
if (xvt.validator.isNotEmpty(player.id)) {
sound('goodbye')
player.lasttime = now().time
if (access.roleplay) {
saveUser(player)
Expand All @@ -1845,6 +1844,7 @@ export function logoff() {
wall(`logged off: ${reason}`)

// logoff banner
sound('goodbye')
xvt.out('\x06\n')
xvt.out(xvt.reset, 'Goodbye, please play again! Also visit:\n')
xvt.waste(750)
Expand Down
1 change: 1 addition & 0 deletions src/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ interface choices {
interface monster {
name: string
pc: string
adept?: number
hit?: string
smash?: string
poisons?: string[]
Expand Down
2 changes: 2 additions & 0 deletions src/tty/arena.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ function choice() {
if (opponent.user.id[0] === '_') {
if (($.online.cha = $.PC.ability($.player.cha, -10)) < 20)
$.online.cha = 20
$.online.altered = true
$.player.coward = true
}
menu()
Expand Down Expand Up @@ -490,6 +491,7 @@ function MonsterFights(): boolean {
$.Magic.add(monster.user.spells, monsters[mon].spells[i])

$.activate(monster)
if (monsters[mon].adept) monster.adept = monsters[mon].adept
monster.user.coin.amount = monsters[mon].money.toString()

$.cat('arena/' + monster.user.handle.toLowerCase())
Expand Down
9 changes: 4 additions & 5 deletions src/tty/dungeon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ function doMove(): boolean {
return
}
if (i < start || i > end) {
$.player.coward = true
xvt.app.refocus()
return
}
Expand Down Expand Up @@ -896,7 +895,6 @@ function doMove(): boolean {
switch (t % z) {
case 0:
if ($.player.cursed) {
$.player.coward = false
$.player.cursed = ''
$.online.str = $.PC.ability($.online.str, 10, $.player.maxstr)
$.online.int = $.PC.ability($.online.int, 10, $.player.maxint)
Expand Down Expand Up @@ -959,6 +957,7 @@ function doMove(): boolean {
n.value += $.worth(new $.coins($.online.armor.value).value, $.online.cha)
n.value *= (Z + 1)
$.player.coin.value += new $.coins(n.carry(1, true)).value
$.sound('yahoo')
break
case 3:
$.player.coin.value = 0
Expand Down Expand Up @@ -989,7 +988,6 @@ function doMove(): boolean {
$.sound('shimmer', 12)
break
case 7:
$.sound('morph', 10)
$.player.level = $.dice(Z)
if ($.online.adept)
$.player.level += $.dice($.player.level)
Expand All @@ -999,6 +997,7 @@ function doMove(): boolean {
$.player.gender = ['F','M'][$.dice(2) - 1]
$.saveUser($.player)
xvt.out(`You got morphed into a level ${$.player.level} ${$.player.pc} (${$.player.gender})!\n`)
$.sound('morph', 10)
break
case 8:
$.sound('level')
Expand Down Expand Up @@ -2029,7 +2028,7 @@ function putMonster(r = -1, c = -1): boolean {

// check for overcrowding
if (DL.rooms[r][c].monster.length)
if (DL.rooms[r][c].monster.length > 2 || DL.rooms[r][c].type == 1 || DL.rooms[r][c].type == 2)
if (DL.rooms[r][c].monster.length > 2)
return false

let i:number = DL.rooms[r][c].monster.length
Expand Down Expand Up @@ -2137,7 +2136,7 @@ function putMonster(r = -1, c = -1): boolean {
$.activate(m)

m.user.immortal = deep
m.adept = $.int(deep / 4)
m.adept = $.dice(Z / 30 + deep / 4) - 1
m.str = $.PC.ability(m.str, m.adept * 2 + 1)
m.int = $.PC.ability(m.int, m.adept * 2 + 1)
m.dex = $.PC.ability(m.dex, m.adept * 2 + 1)
Expand Down
4 changes: 2 additions & 2 deletions src/tty/logon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ function who() {
else if (rs[row].id === $.player.id) {
$.player.id = ''
$.beep()
$.news(`?attempted player logon @ ${$.time($.now().time)}: ${rs[row].id} locked out from ${$.time(rs[row].locktime)}\n`, true)
$.news(`?attempted same player logon @ ${$.time($.now().time)}: ${rs[row].id} locked out from ${$.time(rs[row].locktime)}\n`, true)
xvt.out(`\nYou\'re in violation of the space-time continuum: T - ${60 - t} minutes\n`)
xvt.ondrop = $.logoff
xvt.sessionAllowed = 1
xvt.waste(1000)
xvt.waste(2000)
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/tty/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ function choice() {

case 'X':
if (!$.access.roleplay) break
$.music('.')
$.sound('oops')
$.music('ddd')
$.action('yn')
xvt.app.form = {
'yn': { cb: () => {
Expand Down
6 changes: 4 additions & 2 deletions src/tty/tavern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ function choice() {
xvt.waste(2000)
xvt.out('\n')

$.online.altered = true
$.player.coward = true
$.saveUser($.online)
$.online.altered = true
Battle.engage('Tavern', $.online, $.barkeep, require('./main').menu)
return
}
Expand Down Expand Up @@ -298,7 +299,8 @@ function choice() {
xvt.out('\nYou are allowed only to brawl other players.\n')
if (opponent.user.id[0] === '_') {
if (($.online.cha = $.PC.ability($.player.cha, -10)) < 20)
$.online.cha = 20
$.online.cha = 20
$.online.altered = true
$.player.coward = true
}
menu()
Expand Down

0 comments on commit 35e7136

Please sign in to comment.