Bladeren bron

last map work

tags/v0.4^2
Big Bad Waffle 4 jaren geleden
bovenliggende
commit
1bce892236
14 gewijzigde bestanden met toevoegingen van 1299 en 300 verwijderingen
  1. BIN
     
  2. BIN
     
  3. BIN
     
  4. BIN
     
  5. BIN
     
  6. +32
    -40
      src/client/js/rendering/renderer.js
  7. +1
    -3
      src/server/components/inventory/dropBag.js
  8. +2
    -2
      src/server/config/maps/cave/zone.js
  9. +2
    -2
      src/server/config/maps/fjolarok/zone.js
  10. +1150
    -237
      src/server/config/maps/sewer/map.json
  11. +74
    -14
      src/server/config/maps/sewer/zone.js
  12. +35
    -0
      src/server/config/spells/spellSmokeBomb.js
  13. +2
    -2
      src/server/mods/feature-cards/cards.js
  14. +1
    -0
      src/server/world/map.js





+ 32
- 40
src/client/js/rendering/renderer.js Bestand weergeven

@@ -415,52 +415,44 @@ define([
if (!hLen) if (!hLen)
return false; return false;


let player = window.player;
let px = player.x;
let py = player.y;

let hidden = false;
for (let i = 0; i < hLen; i++) {
let h = hiddenRooms[i];

let outsideHider = (
x < h.x ||
x >= h.x + h.width ||
y < h.y ||
y >= h.y + h.height
);

if (outsideHider)
continue;

let inHider = physics.isInPolygon(x, y, h.area);

if (!inHider)
continue;
const { player: { x: px, y: py } } = window;


const isVisible = hiddenRooms.every(h => {
if (h.discovered) if (h.discovered)
return true;

const { x: hx, y: hy, width, height, area } = h;

//Is the tile outside the hider
if (
x < hx ||
x >= hx + width ||
y < hy ||
y >= hy + height
)
return true;

//Is the tile inside the hider
if (!physics.isInPolygon(x, y, area))
return true;

//Is the player outside the hider
if (
px < hx ||
px >= hx + width ||
py < hy ||
py >= hy + height
)
return false; return false;


outsideHider = (
px < h.x ||
px >= h.x + h.width ||
py < h.y ||
py >= h.y + h.height
);

if (outsideHider) {
hidden = true;
continue;
}

inHider = physics.isInPolygon(px, py, h.area);

if (inHider)
//Is the player inside the hider
if (!physics.isInPolygon(px, py, area))
return false; return false;
hidden = true;
}


return hidden;
return true;
});

return !isVisible;
}, },


updateSprites: function () { updateSprites: function () {


+ 1
- 3
src/server/components/inventory/dropBag.js Bestand weergeven

@@ -59,9 +59,7 @@ module.exports = (cpnInv, ownerName, killSource) => {
let blueprints = blueprint.blueprints; let blueprints = blueprint.blueprints;
for (let i = 0; i < blueprints.length; i++) { for (let i = 0; i < blueprints.length; i++) {
let drop = blueprints[i]; let drop = blueprints[i];
if ((blueprint.chance) && (~~(Math.random() * 100) >= blueprint.chance * dropEvent.chanceMultiplier))
continue;
else if ((drop.maxLevel) && (drop.maxLevel < killSource.stats.values.level))
if ((drop.maxLevel) && (drop.maxLevel < killSource.stats.values.level))
continue; continue;
else if ((drop.chance) && (~~(Math.random() * 100) >= drop.chance * dropEvent.chanceMultiplier)) else if ((drop.chance) && (~~(Math.random() * 100) >= drop.chance * dropEvent.chanceMultiplier))
continue; continue;


+ 2
- 2
src/server/config/maps/cave/zone.js Bestand weergeven

@@ -23,11 +23,11 @@ module.exports = {


regular: { regular: {
drops: { drops: {
chance: 30,
rolls: 1, rolls: 1,
noRandom: true, noRandom: true,
alsoRandom: true, alsoRandom: true,
blueprints: [{ blueprints: [{
chance: 30,
name: 'Digested Crystal', name: 'Digested Crystal',
quality: 0, quality: 0,
quest: true, quest: true,
@@ -97,11 +97,11 @@ module.exports = {


regular: { regular: {
drops: { drops: {
chance: 30,
rolls: 1, rolls: 1,
noRandom: true, noRandom: true,
alsoRandom: true, alsoRandom: true,
blueprints: [{ blueprints: [{
chance: 35,
name: 'Digested Crystal', name: 'Digested Crystal',
quality: 0, quality: 0,
quest: true, quest: true,


+ 2
- 2
src/server/config/maps/fjolarok/zone.js Bestand weergeven

@@ -543,10 +543,10 @@ module.exports = {


regular: { regular: {
drops: { drops: {
chance: 100,
rolls: 1, rolls: 1,
noRandom: true, noRandom: true,
blueprints: [{ blueprints: [{
chance: 100,
maxLevel: 2, maxLevel: 2,
name: 'Family Heirloom', name: 'Family Heirloom',
quality: 1, quality: 1,
@@ -667,11 +667,11 @@ module.exports = {
faction: 'hostile', faction: 'hostile',
regular: { regular: {
drops: { drops: {
chance: 200,
rolls: 1, rolls: 1,
noRandom: true, noRandom: true,
alsoRandom: true, alsoRandom: true,
blueprints: [{ blueprints: [{
chance: 3,
name: 'Eagle Feather', name: 'Eagle Feather',
material: true, material: true,
sprite: [0, 0], sprite: [0, 0],


+ 1150
- 237
src/server/config/maps/sewer/map.json
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 74
- 14
src/server/config/maps/sewer/zone.js Bestand weergeven

@@ -1,3 +1,21 @@
const balance = {
rat: {
clawChance: 3
},
stinktooth: {
runestoneChance: 10,
recipeChance: 3,
shankChance: 0.1
},
bandit: {
keyChance: 1
},
bera: {
recipeChance: 3,
keyChance: 3
}
};

module.exports = { module.exports = {
name: 'Sewer', name: 'Sewer',
level: [11, 13], level: [11, 13],
@@ -5,7 +23,7 @@ module.exports = {
resources: { resources: {
Stinkcap: { Stinkcap: {
type: 'herb', type: 'herb',
max: 3
max: 1
} }
}, },


@@ -24,23 +42,22 @@ module.exports = {


regular: { regular: {
drops: { drops: {
chance: 200,
rolls: 1, rolls: 1,
noRandom: true, noRandom: true,
alsoRandom: true, alsoRandom: true,
blueprints: [{ blueprints: [{
chance: balance.rat.clawChance,
name: 'Rat Claw', name: 'Rat Claw',
material: true, material: true,
sprite: [3, 0], sprite: [3, 0],
spritesheet: 'images/materials.png' spritesheet: 'images/materials.png'
}, {
chance: 200,
name: 'Muddy Runestone',
material: true,
sprite: [6, 0],
spritesheet: 'images/materials.png'
}] }]
} }
},

rare: {
name: 'Enraged Rat',
cell: 24
} }
}, },


@@ -50,18 +67,19 @@ module.exports = {
fjolgard: 15 fjolgard: 15
}, },
level: 13, level: 13,
cron: '*/10 * * * *',


regular: { regular: {
hpMult: 10, hpMult: 10,
dmgMult: 3, dmgMult: 3,


drops: { drops: {
chance: 100,
rolls: 3, rolls: 3,
noRandom: true, noRandom: true,
alsoRandom: true, alsoRandom: true,
magicFind: [2000, 125], magicFind: [2000, 125],
blueprints: [{ blueprints: [{
chance: balance.stinktooth.shankChance,
name: 'Putrid Shank', name: 'Putrid Shank',
level: 13, level: 13,
quality: 4, quality: 4,
@@ -74,16 +92,22 @@ module.exports = {
effects: [{ effects: [{
type: 'castSpellOnHit', type: 'castSpellOnHit',
rolls: { rolls: {
i_chance: [20, 60],
i_chance: [5, 20],
spell: 'smokeBomb' spell: 'smokeBomb'
} }
}] }]
}, { }, {
chance: 100,
chance: balance.stinktooth.recipeChance,
type: 'recipe', type: 'recipe',
name: 'Recipe: Rune of Whirlwind', name: 'Recipe: Rune of Whirlwind',
profession: 'etching', profession: 'etching',
teaches: 'runeWhirlwind' teaches: 'runeWhirlwind'
}, {
chance: balance.stinktooth.runestoneChance,
name: 'Muddy Runestone',
material: true,
sprite: [6, 0],
spritesheet: 'images/materials.png'
}] }]
} }
}, },
@@ -145,8 +169,25 @@ module.exports = {
}, },
level: 11, level: 11,


regular: {
drops: {
noRandom: true,
alsoRandom: true,
blueprints: [{
chance: balance.bandit.keyChance,
type: 'key',
noSalvage: true,
name: 'Rusted Key',
keyId: 'rustedSewer',
singleUse: true,
sprite: [12, 1],
quantity: 1
}]
}
},

rare: { rare: {
count: 0
name: 'Cutthroat'
} }
}, },


@@ -181,16 +222,24 @@ module.exports = {
dmgMult: 1.5, dmgMult: 1.5,


drops: { drops: {
chance: 100,
rolls: 1, rolls: 1,
noRandom: true, noRandom: true,
alsoRandom: true, alsoRandom: true,
blueprints: [{ blueprints: [{
chance: 100,
chance: balance.bera.recipeChance,
type: 'recipe', type: 'recipe',
name: 'Recipe: Rune of Ambush', name: 'Recipe: Rune of Ambush',
profession: 'etching', profession: 'etching',
teaches: 'runeAmbush' teaches: 'runeAmbush'
}, {
chance: balance.bera.keyChance,
type: 'key',
noSalvage: true,
name: 'Rusted Key',
keyId: 'rustedSewer',
singleUse: true,
sprite: [12, 1],
quantity: 1
}] }]
} }
}, },
@@ -207,6 +256,17 @@ module.exports = {
quantity: [6, 12] quantity: [6, 12]
}, },


sewerdoor: {
properties: {
cpnDoor: {
autoClose: 171,
locked: true,
key: 'rustedSewer',
destroyKey: true
}
}
},

bubbles: { bubbles: {
components: { components: {
cpnParticles: { cpnParticles: {


+ 35
- 0
src/server/config/spells/spellSmokeBomb.js Bestand weergeven

@@ -46,6 +46,39 @@ let cpnSmokePatch = {
} }
}; };


const particles = {
scale: {
start: {
min: 16,
max: 30
},
end: {
min: 8,
max: 14
}
},
opacity: {
start: 0.02,
end: 0
},
lifetime: {
min: 1,
max: 3
},
speed: {
start: 12,
end: 2
},
color: {
start: ['fcfcfc', '80f643'],
end: ['c0c3cf', '2b4b3e']
},
chance: 0.03,
randomColor: true,
randomScale: true,
blendMode: 'screen'
};

module.exports = { module.exports = {
type: 'smokeBomb', type: 'smokeBomb',


@@ -60,6 +93,8 @@ module.exports = {
targetGround: true, targetGround: true,
targetPlayerPos: true, targetPlayerPos: true,


particles: particles,

update: function () { update: function () {
let selfCast = this.selfCast; let selfCast = this.selfCast;




+ 2
- 2
src/server/mods/feature-cards/cards.js Bestand weergeven

@@ -26,10 +26,10 @@ let config = {
zone: 'estuary' zone: 'estuary'
}, },
'Fangs of Fury': { 'Fangs of Fury': {
chance: 0.2,
chance: 0.05,
reward: 'Steelclaw\'s Bite', reward: 'Steelclaw\'s Bite',
setSize: 20, setSize: 20,
mobName: 'steelclaw'
mobName: 'stinktooth'
}, },
'Tradesman\'s Pride': { 'Tradesman\'s Pride': {
chance: 0.007, chance: 0.007,


+ 1
- 0
src/server/world/map.js Bestand weergeven

@@ -69,6 +69,7 @@ module.exports = {
try { try {
this.zone = require('../' + this.path + '/' + this.name + '/zone'); this.zone = require('../' + this.path + '/' + this.name + '/zone');
} catch (e) { } catch (e) {
console.log(e);
this.zone = globalZone; this.zone = globalZone;
} }
events.emit('onAfterGetZone', this.name, this.zone); events.emit('onAfterGetZone', this.name, this.zone);


Laden…
Annuleren
Opslaan