Browse Source

hotfix for ww and ambush drops, asvald autotalk, thumper autoQ and some balance

tags/v0.4.0.1
Big Bad Waffle 4 years ago
parent
commit
794e500ceb
7 changed files with 90 additions and 27 deletions
  1. +1
    -1
      src/server/config/maps/fjolarok/map.json
  2. +1
    -6
      src/server/config/maps/fjolarok/zone.js
  3. +50
    -1
      src/server/config/maps/sewer/zone.js
  4. +34
    -17
      src/server/config/quests/templates/questLootGen.js
  5. +2
    -0
      src/server/config/spellsConfig.js
  6. +1
    -1
      src/server/config/zoneBase.js
  7. +1
    -1
      src/server/items/generators/spellbook.js

+ 1
- 1
src/server/config/maps/fjolarok/map.json View File

@@ -1409,7 +1409,7 @@
{
"height":24,
"id":899,
"name":"shopVetch",
"name":"shopAsvald",
"rotation":0,
"type":"",
"visible":true,


+ 1
- 6
src/server/config/maps/fjolarok/zone.js View File

@@ -592,7 +592,6 @@ module.exports = {
},
thumper: {
level: 5,
cron: '0 * * * *',
regular: {
hpMult: 3,
dmgMult: 3,
@@ -604,11 +603,7 @@ module.exports = {
}
},
rare: {
count: 0
},
questItem: {
name: "Rabbit's Foot",
sprite: [0, 1]
chance: 100
}
},
elk: {


+ 50
- 1
src/server/config/maps/sewer/zone.js View File

@@ -2,6 +2,9 @@ const balance = {
rat: {
clawChance: 3
},
giantRat: {
clawChance: 5
},
stinktooth: {
runestoneChance: 10,
recipeChance: 3,
@@ -10,6 +13,9 @@ const balance = {
bandit: {
keyChance: 1
},
direRat: {
clawChance: 7
},
bera: {
recipeChance: 3,
keyChance: 3
@@ -61,6 +67,36 @@ module.exports = {
}
},

'giant rat': {
faction: 'fjolgard',
grantRep: {
fjolgard: 6
},
level: 12,

regular: {
hpMult: 2,
dmgMult: 1.2,

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

rare: {
count: 0
}
},

stinktooth: {
faction: 'hostile',
grantRep: {
@@ -201,7 +237,20 @@ module.exports = {

regular: {
hpMult: 5,
dmgMult: 1.2
dmgMult: 1.2,

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

rare: {


+ 34
- 17
src/server/config/quests/templates/questLootGen.js View File

@@ -1,3 +1,9 @@
const resetQuest = q => {
q.mobName = null;
q.mobType = null;
q.item = null;
};

module.exports = {
type: 'lootGen',

@@ -9,32 +15,43 @@ module.exports = {
item: null,

build: function () {
if ((!this.mobName) || (!this.item)) {
//If we're not in the correct zone, don't do this check, it'll just crash the server
// since the mob won't be available (most likely) in the zoneFile
if (this.obj.zoneName === this.zoneName) {
let mobTypes = this.obj.instance.spawners.zone.mobs;

let keys = Object.keys(mobTypes).filter(function (m) {
let mobBlueprint = mobTypes[m];
if (this.mobType && this.item) {
//Check if the zoneFile changed
const mobBlueprint = mobTypes[this.mobType];
if (!mobBlueprint || !mobBlueprint.questItem || mobBlueprint.questItem.name !== this.item.name)
resetQuest(this);
}

return (
(m !== 'default') &&
if (!this.mobName || !this.item) {
let keys = Object.keys(mobTypes).filter(function (m) {
let mobBlueprint = mobTypes[m];

return (
(m !== 'default') &&
(mobBlueprint.questItem) &&
(mobBlueprint.level <= (this.obj.stats.values.level * 1.35))
);
}, this);
);
}, this);

//No level appropriate mobs found
if (keys.length === 0)
return false;
//No level appropriate mobs found
if (keys.length === 0)
return false;

this.mobType = keys[~~(Math.random() * keys.length)];
let needMax = 8;
this.mobName = this.mobType.replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
this.mobType = keys[~~(Math.random() * keys.length)];
let needMax = 8;
this.mobName = this.mobType.replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});

this.need = Math.max(1, ~~((needMax * 0.2) + (Math.random() * needMax * 0.8)));
this.need = Math.max(1, ~~((needMax * 0.2) + (Math.random() * needMax * 0.8)));

this.item = mobTypes[this.mobType].questItem || mobTypes.default.questItem;
this.item = mobTypes[this.mobType].questItem || mobTypes.default.questItem;
}
}

this.name = this.item.name + ' Gatherer';


+ 2
- 0
src/server/config/spellsConfig.js View File

@@ -130,6 +130,7 @@ let spells = {
cdMax: 12,
castTimeMax: 2,
manaCost: 7,
noDrop: true,
random: {
i_range: [1, 2.5],
damage: [4, 15]
@@ -155,6 +156,7 @@ let spells = {
castTimeMax: 7,
range: 10,
manaCost: 7,
noDrop: true,
random: {
damage: [8, 28],
i_stunDuration: [4, 6]


+ 1
- 1
src/server/config/zoneBase.js View File

@@ -33,7 +33,7 @@ module.exports = {

drops: {
chance: 100,
rolls: 1,
rolls: 2,
magicFind: 2000
}
},


+ 1
- 1
src/server/items/generators/spellbook.js View File

@@ -9,7 +9,7 @@ module.exports = {
let spellName = blueprint.spellName;

if (!spellName) {
let spellList = Object.keys(spellsConfig.spells).filter(s => ((!spellsConfig.spells[s].auto) && (!s.noDrop)));
let spellList = Object.keys(spellsConfig.spells).filter(s => !spellsConfig.spells[s].auto && !spellsConfig.spells[s].noDrop);
spellName = spellList[~~(Math.random() * spellList.length)];
}



Loading…
Cancel
Save