Переглянути джерело

initial work

(cherry picked from commit 621f4f989e)
tags/v0.4^2
Shaun Kichenbrand 4 роки тому
committed by Big Bad Waffle
джерело
коміт
cf49f4776f
10 змінених файлів з 138 додано та 5 видалено
  1. +3
    -0
      src/server/components/inventory.js
  2. +6
    -1
      src/server/components/workbench.js
  3. +14
    -0
      src/server/config/maps/fjolarok/zone.js
  4. +14
    -2
      src/server/config/maps/sewer/map.json
  5. +63
    -1
      src/server/config/maps/sewer/zone.js
  6. +17
    -0
      src/server/config/recipes/etching.js
  7. +4
    -0
      src/server/config/recipes/recipes.js
  8. +1
    -1
      src/server/config/serverConfig.js
  9. +5
    -0
      src/server/config/spells.js
  10. +11
    -0
      src/server/config/spellsConfig.js

+ 3
- 0
src/server/components/inventory.js Переглянути файл

@@ -36,6 +36,9 @@ module.exports = {
if ((item.pos >= this.inventorySize) || (item.eq))
delete item.pos;

if (!item.name)
console.log(item);

while (item.name.indexOf('\'\'') > -1)
item.name = item.name.replace('\'\'', '\'');
}


+ 6
- 1
src/server/components/workbench.js Переглянути файл

@@ -1,4 +1,5 @@
const recipes = require('../config/recipes/recipes');
const generator = require('../items/generator');

module.exports = {
type: 'workbench',
@@ -159,7 +160,11 @@ module.exports = {

let outputItems = recipe.item ? [ recipe.item ] : recipe.items;
outputItems.forEach(itemBpt => {
let item = extend({}, itemBpt);
let item = null;
if (itemBpt.generate)
item = generator.generate(itemBpt);
else
item = extend({}, itemBpt);
if (item.description)
item.description += `<br /><br />(Crafted by ${obj.name})`;


+ 14
- 0
src/server/config/maps/fjolarok/zone.js Переглянути файл

@@ -513,6 +513,20 @@ module.exports = {
eagle: {
level: 10,
faction: 'hostile',
regular: {
drops: {
chance: 200,
rolls: 1,
noRandom: true,
alsoRandom: true,
blueprints: [{
name: 'Eagle Feather',
material: true,
sprite: [0, 0],
spritesheet: 'images/questItems.png'
}]
}
},
rare: {
name: 'Fleshripper'
}


+ 14
- 2
src/server/config/maps/sewer/map.json Переглянути файл

@@ -952,6 +952,18 @@
"width":8,
"x":168,
"y":200
},
{
"gid":572,
"height":8,
"id":894,
"name":"Etchbench",
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":424,
"y":712
}],
"opacity":1,
"properties":[
@@ -1046,7 +1058,7 @@
"y":0
}],
"nextlayerid":12,
"nextobjectid":893,
"nextobjectid":895,
"orientation":"orthogonal",
"properties":[
{
@@ -1070,7 +1082,7 @@
"value":"{\"x\":58,\"y\":99}"
}],
"renderorder":"right-down",
"tiledversion":"1.2.2",
"tiledversion":"1.2.4",
"tileheight":8,
"tilesets":[
{


+ 63
- 1
src/server/config/maps/sewer/zone.js Переглянути файл

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

regular: {
drops: {
rolls: 1,
rolls: 2,
noRandom: true,
alsoRandom: true,
blueprints: [{
@@ -29,6 +29,12 @@ module.exports = {
singleUse: true,
sprite: [12, 1],
quantity: 1
}, {
chance: 200,
name: 'Muddy Runestone',
material: true,
sprite: [6, 0],
spritesheet: 'images/materials.png'
}]
}
},
@@ -146,6 +152,62 @@ module.exports = {
}
},

etchbench: {
components: {
cpnParticles: {
simplify: function () {
return {
type: 'particles',
blueprint: {
color: {
start: ['ff4252', 'ff4252'],
end: ['a82841', 'a82841']
},
scale: {
start: {
min: 2,
max: 10
},
end: {
min: 0,
max: 2
}
},
speed: {
start: {
min: 4,
max: 16
},
end: {
min: 2,
max: 8
}
},
lifetime: {
min: 1,
max: 4
},
randomScale: true,
randomSpeed: true,
chance: 0.2,
randomColor: true,
spawnType: 'rect',
spawnRect: {
x: -15,
y: -28,
w: 30,
h: 8
}
}
};
}
},
cpnWorkbench: {
type: 'etching'
}
}
},

treasure: {
cron: '0 2 * * *'
}


+ 17
- 0
src/server/config/recipes/etching.js Переглянути файл

@@ -0,0 +1,17 @@
module.exports = [{
name: 'Rune of Whirlwind',
description: 'Wiggle-wiggly woo-woo.',
item: {
name: 'Rune of Whirlwind',
generate: true,
spell: true,
spellName: 'whirlwind'
},
materials: [{
name: 'Muddy Runestone',
quantity: 1
}, {
name: 'Eagle Feather',
quantity: 1
}]
}];

+ 4
- 0
src/server/config/recipes/recipes.js Переглянути файл

@@ -2,6 +2,7 @@ let events = require('../../misc/events');

const recipesAlchemy = require('./alchemy');
const recipesCooking = require('./cooking');
const recipesEtching = require('./etching');

let recipes = {
alchemy: [
@@ -9,6 +10,9 @@ let recipes = {
],
cooking: [
...recipesCooking
],
etching: [
...recipesEtching
]
};



+ 1
- 1
src/server/config/serverConfig.js Переглянути файл

@@ -8,7 +8,7 @@ module.exports = {
// sqlite
// rethink
//eslint-disable-next-line no-process-env
db: process.env.IWD_DB || 'rethink',
db: process.env.IWD_DB || 'sqlite',
//eslint-disable-next-line no-process-env
dbHost: process.env.IWD_DB_HOST || 'localhost',
//eslint-disable-next-line no-process-env


+ 5
- 0
src/server/config/spells.js Переглянути файл

@@ -284,6 +284,11 @@ let spells = [{
randomScale: true,
blendMode: 'screen'
}
}, {
name: 'Whirlwind',
description: 'WWWWWWW.',
type: 'whirlwind',
icon: [2, 2]
}, {
name: 'Stealth',
description: 'The thief slips into the shadows and becomes undetectable by foes. Performing an attack removes this effect.',


+ 11
- 0
src/server/config/spellsConfig.js Переглянути файл

@@ -122,6 +122,17 @@ let spells = {
i_duration: [4, 9]
}
},
whirlwind: {
statType: 'str',
statMult: 1,
cdMax: 1,
castTimeMax: 0,
manaCost: 1,
random: {
damage: [5, 12],
range: [1, 3]
}
},
smokebomb: {
statType: 'dex',
statMult: 1,


Завантаження…
Відмінити
Зберегти