@@ -2,14 +2,14 @@ | |||
const r = null; | |||
//Count the amount of permadead characters | |||
r.db('test').table('character').filter({ | |||
r.db('live').table('character').filter({ | |||
value: { | |||
permadead: true | |||
} | |||
}).count(); | |||
//Count the amount of permadead characters per spirit | |||
r.db('test').table('character') | |||
r.db('live').table('character') | |||
.filter({ | |||
value: { | |||
permadead: true | |||
@@ -21,7 +21,7 @@ r.db('test').table('character') | |||
.count(); | |||
//All players that are level 20 | |||
r.db('test').table('character') | |||
r.db('live').table('character') | |||
.filter(row => { | |||
return row('value')('components').contains(cpn => { | |||
return cpn('type').eq('stats').and(cpn('values')('level').ge(20)); | |||
@@ -29,10 +29,11 @@ r.db('test').table('character') | |||
}); | |||
//Group by mod action source, aggregate and order by count | |||
r.db('test').table('modLog') | |||
r.db('live').table('modLog') | |||
.group(f => f('value')('source')).count().ungroup().orderBy('reduction'); | |||
r.db('test').table('character') | |||
//List Items with dex > 30 | |||
r.db('live').table('character') | |||
.concatMap(row => { | |||
return row('value')('components') | |||
.filter(cpn => { | |||
@@ -51,8 +52,8 @@ r.db('test').table('character') | |||
}); | |||
}); | |||
//Play time per account from low to thigh | |||
r.db('test').table('character') | |||
//Play time per account from low to high | |||
r.db('live').table('character') | |||
.concatMap(row => { | |||
return row('value')('components') | |||
.filter(cpn => { | |||
@@ -70,3 +71,57 @@ r.db('test').table('character') | |||
.sum('played') | |||
.ungroup() | |||
.orderBy('reduction'); | |||
//Amount of characters per level | |||
r.db('live').table('character') | |||
.concatMap(row => { | |||
return row('value')('components') | |||
.filter(cpn => { | |||
return cpn('type').eq('stats'); | |||
}) | |||
.concatMap(c => { | |||
return [{ | |||
level: c('values')('level') | |||
}]; | |||
}); | |||
}) | |||
.group('level') | |||
.count(); | |||
r.db('live').table('character') | |||
.concatMap(row => { | |||
return row('value')('components') | |||
.filter(cpn => { | |||
return cpn('type').eq('stats'); | |||
}) | |||
.concatMap(c => { | |||
return [{ | |||
level: c('values')('level'), | |||
xp: c('values')('xpTotal') | |||
}]; | |||
}); | |||
}) | |||
.filter(c => { | |||
return c('level').eq(2); | |||
}) | |||
.group('xp') | |||
.count(); | |||
r.db('live').table('character') | |||
.concatMap(row => { | |||
return row('value')('components') | |||
.filter(cpn => { | |||
return cpn('type').eq('stats'); | |||
}) | |||
.concatMap(c => { | |||
return [{ | |||
level: c('values')('level'), | |||
xp: c('values')('xpTotal'), | |||
streaks: c('stats')('mobKillStreaks') | |||
}]; | |||
}); | |||
}) | |||
.filter(c => { | |||
return c('level').eq(2).and(c('xp').eq(10)); | |||
}); |
@@ -32,7 +32,8 @@ let components = [ | |||
'serverActions', | |||
'social', | |||
'passives', | |||
'sound' | |||
'sound', | |||
'whirlwind' | |||
].map(function (c) { | |||
return 'js/components/' + c; | |||
}); | |||
@@ -0,0 +1,67 @@ | |||
define([ | |||
'js/rendering/effects' | |||
], function ( | |||
effects | |||
) { | |||
return { | |||
type: 'whirlwind', | |||
source: null, | |||
row: null, | |||
col: null, | |||
delay: 40, | |||
coordinates: [], | |||
objects: null, | |||
init: async function (blueprint) { | |||
await this.getObjectsModule(); | |||
if (!this.source) { | |||
this.obj.destroyed = true; | |||
return; | |||
} | |||
this.coordinates.forEach(([x, y], i) => { | |||
const wait = i * this.delay; | |||
setTimeout(this.spawnThing.bind(this, x, y), wait); | |||
}); | |||
effects.register(this); | |||
}, | |||
getObjectsModule: async function () { | |||
return new Promise(res => { | |||
require(['js/objects/objects'], o => { | |||
this.objects = o; | |||
res(); | |||
}); | |||
}); | |||
}, | |||
spawnThing: function (x, y) { | |||
const { row, col } = this; | |||
this.objects.buildObject({ | |||
x, | |||
y, | |||
components: [{ | |||
type: 'attackAnimation', | |||
row, | |||
col | |||
}] | |||
}); | |||
}, | |||
renderManual: function () { | |||
}, | |||
destroy: function () { | |||
effects.unregister(this); | |||
} | |||
}; | |||
}); |
@@ -167,6 +167,10 @@ define([ | |||
this.find('.name').html(charName + ' (hc - rip)'); | |||
this.find('.btnPlay').addClass('disabled'); | |||
} | |||
setTimeout(() => { | |||
$('.btnPlay').click(); | |||
}, 1000); | |||
}, | |||
setMessage: function (msg) { | |||
@@ -34,6 +34,10 @@ define([ | |||
.on('keyup', this.onKeyDown.bind(this)) | |||
.eq(0).focus(); | |||
$('.txtUsername').val('test'); | |||
$('.txtPassword').val('test'); | |||
$('.btnLogin').click(); | |||
renderer.buildTitleScreen(); | |||
}, | |||
@@ -82,7 +82,7 @@ module.exports = { | |||
} | |||
return { | |||
amount: amount, | |||
amount: 0.000001, | |||
blocked: blocked, | |||
dodged: dodged, | |||
crit: isCrit, | |||
@@ -23,10 +23,10 @@ let commandRoles = { | |||
saveAll: 8, | |||
//Admin | |||
getItem: 10, | |||
getItem: 0, | |||
getGold: 10, | |||
setLevel: 10, | |||
godMode: 10, | |||
godMode: 0, | |||
clearInventory: 10, | |||
completeQuests: 10, | |||
getReputation: 10, | |||
@@ -25,5 +25,11 @@ module.exports = { | |||
itemSprite: [11, 2], | |||
baseWeight: 3, | |||
ttl: 30 | |||
}, | |||
'Stink Carp': { | |||
sheetName: 'objects', | |||
itemSprite: [11, 0], | |||
baseWeight: 5, | |||
ttl: 30 | |||
} | |||
}; |
@@ -1046,7 +1046,7 @@ | |||
"y":0 | |||
}], | |||
"nextlayerid":12, | |||
"nextobjectid":891, | |||
"nextobjectid":893, | |||
"orientation":"orthogonal", | |||
"properties":[ | |||
{ | |||
@@ -8,36 +8,6 @@ module.exports = { | |||
deathRep: -5 | |||
}, | |||
rat: { | |||
faction: 'fjolgard', | |||
grantRep: { | |||
fjolgard: 6 | |||
}, | |||
level: 11, | |||
regular: { | |||
drops: { | |||
rolls: 1, | |||
noRandom: true, | |||
alsoRandom: true, | |||
blueprints: [{ | |||
chance: 2, | |||
type: 'key', | |||
noSalvage: true, | |||
name: 'Rusted Key', | |||
keyId: 'rustedSewer', | |||
singleUse: true, | |||
sprite: [12, 1], | |||
quantity: 1 | |||
}] | |||
} | |||
}, | |||
rare: { | |||
count: 0 | |||
} | |||
}, | |||
stinktooth: { | |||
faction: 'fjolgard', | |||
grantRep: { | |||
@@ -46,108 +16,24 @@ module.exports = { | |||
level: 13, | |||
regular: { | |||
drops: { | |||
rolls: 1, | |||
noRandom: true, | |||
alsoRandom: true, | |||
blueprints: [{ | |||
chance: 0.5, | |||
type: 'key', | |||
noSalvage: true, | |||
name: 'Rusted Key', | |||
keyId: 'rustedSewer', | |||
singleUse: true, | |||
sprite: [12, 1], | |||
quantity: 1 | |||
}] | |||
} | |||
}, | |||
rare: { | |||
chance: 4, | |||
name: 'Steelclaw', | |||
cell: 59 | |||
} | |||
}, | |||
bandit: { | |||
faction: 'hostile', | |||
grantRep: { | |||
fjolgard: 18 | |||
}, | |||
level: 11, | |||
rare: { | |||
count: 0 | |||
} | |||
}, | |||
whiskers: { | |||
level: 13, | |||
faction: 'hostile', | |||
grantRep: { | |||
fjolgard: 22 | |||
}, | |||
rare: { | |||
count: 0 | |||
} | |||
}, | |||
'bera the blade': { | |||
faction: 'hostile', | |||
grantRep: { | |||
fjolgard: 25 | |||
}, | |||
level: 14, | |||
regular: { | |||
drops: { | |||
rolls: 1, | |||
noRandom: true, | |||
alsoRandom: true, | |||
blueprints: [{ | |||
chance: 100, | |||
type: 'key', | |||
noSalvage: true, | |||
name: 'Rusted Key', | |||
keyId: 'rustedSewer', | |||
singleUse: true, | |||
sprite: [12, 1], | |||
quantity: 1 | |||
}] | |||
} | |||
}, | |||
rare: { | |||
count: 0 | |||
} | |||
spells: [{ | |||
type: 'whirlwind', | |||
range: 1 | |||
}] | |||
} | |||
}, | |||
objects: { | |||
sewerdoor: { | |||
properties: { | |||
cpnDoor: { | |||
autoClose: 171, | |||
locked: true, | |||
key: 'rustedSewer', | |||
destroyKey: true | |||
} | |||
} | |||
}, | |||
banditdoor: { | |||
properties: { | |||
cpnDoor: {} | |||
} | |||
}, | |||
vaultdoor: { | |||
properties: { | |||
cpnDoor: {} | |||
} | |||
}, | |||
treasure: { | |||
cron: '0 2 * * *' | |||
'stink carp school': { | |||
max: 3000, | |||
type: 'fish', | |||
quantity: [1, 3] | |||
} | |||
} | |||
}; |
@@ -26,4 +26,31 @@ module.exports = [{ | |||
name: 'Empty Vial', | |||
quantity: 1 | |||
}] | |||
}, { | |||
name: 'Stinky Oil', | |||
description: 'Makes your weapon both stinkier, and hurtier.', | |||
item: { | |||
name: 'Stinky Oil', | |||
type: 'consumable', | |||
sprite: [0, 1], | |||
description: 'Makes your weapon both stinkier, and hurtier.', | |||
worth: 0, | |||
noSalvage: true, | |||
noAugment: true, | |||
uses: 1, | |||
cdMax: 85, | |||
effects: [{ | |||
type: 'augmentWeapon', | |||
rolls: { | |||
duration: 500 | |||
} | |||
}] | |||
}, | |||
materials: [{ | |||
name: 'Stink Carp', | |||
quantity: 3 | |||
}, { | |||
name: 'Empty Vial', | |||
quantity: 1 | |||
}] | |||
}]; |
@@ -0,0 +1,71 @@ | |||
const coordinates = [ | |||
[[0, -1], [1, -1], [1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1]] | |||
]; | |||
const maxTicks = 8; | |||
module.exports = { | |||
type: 'whirlwind', | |||
cdMax: 5, | |||
manaCost: 10, | |||
range: 1, | |||
damage: 0.0001, | |||
isAttack: true, | |||
channelDuration: 100, | |||
isCasting: false, | |||
ticker: 0, | |||
cast: function (action) { | |||
if (this.isCasting) | |||
return; | |||
//this.isCasting = true; | |||
const { effects, x: playerX, y: playerY } = this.obj; | |||
const coords = coordinates[this.range - 1].map(([x, y]) => [x + playerX, y + playerY]); | |||
let blueprint = { | |||
caster: this.obj.id, | |||
components: [{ | |||
idSource: this.obj.id, | |||
type: 'whirlwind', | |||
coordinates: coords, | |||
row: 3, | |||
col: 0 | |||
}] | |||
}; | |||
this.obj.instance.syncer.queue('onGetObject', blueprint, -1); | |||
return true; | |||
}, | |||
reachDestination: function (selfEffect) { | |||
const { effects, destroyed } = this.obj; | |||
if (destroyed) | |||
return; | |||
effects.removeEffect(selfEffect); | |||
}, | |||
spawnDamager: function (x, y) { | |||
const { effects, destroyed, instance } = this.obj; | |||
if (destroyed) | |||
return; | |||
instance.syncer.queue('onGetObject', { | |||
x, | |||
y, | |||
components: [{ | |||
type: 'attackAnimation', | |||
row: 3, | |||
col: 0 | |||
}] | |||
}, -1); | |||
} | |||
}; |
@@ -9,7 +9,7 @@ module.exports = { | |||
physics: null, | |||
map: null, | |||
cdMax: 171, | |||
cdMax: 1, | |||
init: function (instance) { | |||
Object.assign(this, { | |||