Преглед изворни кода

removed test code

tags/v0.2.0^2
big bad waffle пре 6 година
родитељ
комит
1786a323b1
8 измењених фајлова са 0 додато и 678 уклоњено
  1. BIN
     
  2. BIN
     
  3. BIN
     
  4. BIN
     
  5. +0
    -185
      src/server/mods/iwd-ranger/index.js
  6. +0
    -19
      src/server/mods/iwd-ranger/maps/fjolarok/dialogues.js
  7. +0
    -410
      src/server/mods/iwd-ranger/maps/fjolarok/map.json
  8. +0
    -64
      src/server/mods/iwd-ranger/maps/fjolarok/zone.js




+ 0
- 185
src/server/mods/iwd-ranger/index.js Прегледај датотеку

@@ -1,185 +0,0 @@
define([

], function (

) {
return {
name: 'Ranger Class',

extraScripts: [],

mapFile: null,
mapW: null,
mapH: null,

mapOffset: {
x: 197,
y: 119
},

init: function () {
this.mapFile = require.nodeRequire('../../../mods/iwd-ranger/maps/fjolarok/map');
this.mapW = this.mapFile.width;
this.mapH = this.mapFile.height;

this.events.on('onBeforeGetSpellsInfo', this.beforeGetSpellsInfo.bind(this));
this.events.on('onBeforeGetSpellsConfig', this.beforeGetSpellsConfig.bind(this));
this.events.on('onBeforeGetSpellTemplate', this.beforeGetSpellTemplate.bind(this));
this.events.on('onBeforeGetResourceList', this.beforeGetResourceList.bind(this));
this.events.on('onAfterGetZone', this.onAfterGetZone.bind(this));
this.events.on('onAfterGetLayerObjects', this.onAfterGetLayerObjects.bind(this));
this.events.on('onBeforeGetDialogue', this.onBeforeGetDialogue.bind(this));
},

onBeforeGetDialogue: function (zone, config) {
try {
var modDialogue = require(this.relativeFolderName + '/maps/' + zone + '/dialogues.js');
extend(true, config, modDialogue);
} catch (e) {

}
},

onAfterGetZone: function (zone, config) {
try {
var modZone = require(this.relativeFolderName + '/maps/' + zone + '/zone.js');
extend(true, config, modZone);
} catch (e) {

}
},

onAfterGetLayerObjects: function (info) {
if (info.map != 'fjolarok')
return;

var layer = this.mapFile.layers.find(l => (l.name == info.layer));
if (layer) {
var offset = this.mapOffset;
var mapScale = this.mapFile.tilesets[0].tileheight;

layer.objects.forEach(function (l) {
var newO = extend(true, {}, l);
newO.x += (offset.x * mapScale);
newO.y += (offset.y * mapScale);

info.objects.push(newO);
}, this);
}
},

beforeGetResourceList: function (list) {
list.push(`${this.folderName}/images/items.png`);
list.push(`${this.folderName}/images/mobs.png`);
},

beforeGetSpellTemplate: function (spell) {
return;
if (spell.type == 'PoisonArrow')
spell.template = require(`${this.relativeFolderName}/spells/spellPoisonArrow`);
else if (spell.type == 'Vanish')
spell.template = require(`${this.relativeFolderName}/spells/spellVanish`);
},

beforeGetSpellsConfig: function (spells) {
return;
spells['poison arrow'] = {
statType: ['dex'],
statMult: 1,
cdMax: 12,
manaCost: 5,
range: 1,
random: {
damage: [3, 11],
dotDuration: [10, 30],
dotDamage: [1, 5]
}
};

spells['vanish'] = {
statType: ['dex'],
statMult: 0.27,
cdMax: 7,
manaCost: 5,
range: 9,
random: {
duration: [5, 15],
regen: [1, 5]
}
};
},

beforeGetSpellsInfo: function (spells) {
return;
spells.push({
name: 'Poison Arrow',
description: 'An arrow that poisons.',
type: 'poisonArrow',
icon: [0, 0],
animation: 'melee',
particles: {
color: {
start: ['ff4252', 'b34b3a'],
end: ['b34b3a', 'ff4252']
},
scale: {
start: {
min: 2,
max: 14
},
end: {
min: 0,
max: 8
}
},
lifetime: {
min: 1,
max: 3
},
alpha: {
start: 0.7,
end: 0
},
randomScale: true,
randomColor: true,
chance: 0.6
}
});

spells.push({
name: 'Vanish',
description: `You can't see me.`,
type: 'vanish',
icon: [1, 0],
animation: 'magic',
particles: {
color: {
start: ['ff4252', 'b34b3a'],
end: ['b34b3a', 'ff4252']
},
scale: {
start: {
min: 2,
max: 14
},
end: {
min: 0,
max: 8
}
},
lifetime: {
min: 1,
max: 3
},
alpha: {
start: 0.7,
end: 0
},
randomScale: true,
randomColor: true,
chance: 0.6
}
});
}
};
});

+ 0
- 19
src/server/mods/iwd-ranger/maps/fjolarok/dialogues.js Прегледај датотеку

@@ -1,19 +0,0 @@
define([

], function (

) {
return {
'finn elderbow': {
'1': {
msg: [{
msg: `Please...leave me be. I can bring you only sorrow.`,
options: []
}],
options: {

}
}
}
};
});

+ 0
- 410
src/server/mods/iwd-ranger/maps/fjolarok/map.json Прегледај датотеку

@@ -1,410 +0,0 @@
{ "backgroundcolor":"#32222e",
"height":10,
"infinite":false,
"layers":[
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"name":"tiles",
"opacity":0.550000011920929,
"properties":
{
"tileset":"tiles"
},
"propertytypes":
{
"tileset":"string"
},
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"name":"doodads",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"name":"walls",
"opacity":1,
"properties":
{
"tileset":"walls"
},
"propertytypes":
{
"tileset":"string"
},
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"draworder":"topdown",
"name":"mobs",
"objects":[
{
"gid":257,
"height":8,
"id":862,
"name":"finn",
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":0,
"y":8
},
{
"gid":593,
"height":8,
"id":869,
"name":"finn's stash",
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":8,
"y":24
}],
"opacity":1,
"properties":
{
"faction":"2",
"tileset":"mobs"
},
"propertytypes":
{
"faction":"string",
"tileset":"string"
},
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
{
"draworder":"topdown",
"name":"objects",
"objects":[],
"opacity":1,
"properties":
{
"blocking":"1",
"tileset":"objects"
},
"propertytypes":
{
"blocking":"string",
"tileset":"string"
},
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
{
"draworder":"topdown",
"name":"clientObjects",
"objects":[],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
{
"draworder":"topdown",
"name":"notices",
"objects":[
{
"height":24,
"id":870,
"name":"talkfinn",
"rotation":0,
"type":"",
"visible":true,
"width":24,
"x":-8,
"y":-8
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
{
"draworder":"topdown",
"name":"rooms",
"objects":[],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextobjectid":871,
"orientation":"orthogonal",
"properties":
{
"instanced":"0",
"name":"Test Zone",
"spawn":"[{\"maxLevel\":1,\"x\":100,\"y\":186},{\"maxLevel\":999,\"x\":132,\"y\":118}]"
},
"propertytypes":
{
"instanced":"string",
"name":"string",
"spawn":"string"
},
"renderorder":"right-down",
"tiledversion":"1.1.3",
"tileheight":8,
"tilesets":[
{
"columns":8,
"firstgid":1,
"image":"..\/..\/..\/..\/..\/client\/images\/walls.png",
"imageheight":256,
"imagewidth":64,
"margin":0,
"name":"walls",
"spacing":0,
"tilecount":256,
"tileheight":8,
"tiles":
{
"0":
{
"probability":0.200000002980232
},
"2":
{
"probability":0.600000023841858
},
"29":
{
"probability":0.800000011920929
},
"3":
{
"probability":0.200000002980232
},
"30":
{
"probability":0.200000002980232
},
"31":
{
"probability":0.200000002980232
},
"4":
{
"probability":0.200000002980232
},
"50":
{
"probability":0.400000005960464
},
"8":
{
"probability":0.100000001490116
}
},
"tilewidth":8
},
{
"columns":8,
"firstgid":257,
"image":"..\/..\/..\/..\/..\/client\/images\/mobs.png",
"imageheight":88,
"imagewidth":64,
"margin":0,
"name":"mobs",
"spacing":0,
"tilecount":88,
"tileheight":8,
"tileproperties":
{
"19":
{
"portal":"midgaard-inn-room_2,1"
}
},
"tilepropertytypes":
{
"19":
{
"portal":"string"
}
},
"tilewidth":8
},
{
"columns":8,
"firstgid":345,
"image":"..\/..\/..\/..\/..\/client\/images\/tiles.png",
"imageheight":192,
"imagewidth":64,
"margin":0,
"name":"tiles",
"spacing":0,
"tilecount":192,
"tileheight":8,
"tiles":
{
"0":
{
"probability":2
},
"11":
{
"probability":4
},
"14":
{
"probability":0.5
},
"2":
{
"probability":4
},
"23":
{
"probability":0.200000002980232
},
"24":
{
"probability":0.200000002980232
},
"29":
{
"probability":0.5
},
"3":
{
"probability":7
},
"30":
{
"probability":0.200000002980232
},
"31":
{
"probability":10
},
"38":
{
"probability":3
},
"39":
{
"probability":3
},
"40":
{
"probability":15
},
"41":
{
"probability":2
},
"42":
{
"probability":26
},
"47":
{
"probability":10
},
"5":
{
"probability":0.00999999977648258
},
"54":
{
"probability":0.5
},
"6":
{
"probability":0.00499999988824129
},
"7":
{
"probability":0.100000001490116
},
"8":
{
"probability":0.5
},
"9":
{
"probability":4
}
},
"tilewidth":8
},
{
"columns":8,
"firstgid":537,
"image":"..\/..\/..\/..\/..\/client\/images\/objects.png",
"imageheight":176,
"imagewidth":64,
"margin":0,
"name":"objects",
"spacing":0,
"tilecount":176,
"tileheight":8,
"tiles":
{
"42":
{
"probability":5
}
},
"tilewidth":8
},
{
"columns":8,
"firstgid":713,
"image":"..\/..\/..\/..\/..\/client\/images\/bigObjects.png",
"imageheight":240,
"imagewidth":192,
"margin":0,
"name":"bigObjects",
"spacing":0,
"tilecount":80,
"tileheight":24,
"tilewidth":24
},
{
"columns":8,
"firstgid":793,
"image":"..\/..\/..\/..\/..\/client\/images\/bosses.png",
"imageheight":240,
"imagewidth":192,
"margin":0,
"name":"bosses",
"spacing":0,
"tilecount":80,
"tileheight":24,
"tilewidth":24
}],
"tilewidth":8,
"type":"map",
"version":1,
"width":10
}

+ 0
- 64
src/server/mods/iwd-ranger/maps/fjolarok/zone.js Прегледај датотеку

@@ -1,64 +0,0 @@
define([

], function (

) {
return {
mobs: {
finn: {
cron: '0 */4 * * *',
lifetime: 1717,
walkDistance: 0,

rare: {
chance: 100,
count: 1,
sheetName: 'server/mods/iwd-ranger/images/mobs.png',
cell: 0,
attackable: false,
name: 'Finn Elderbow'
}
}
},

objects: {
"finn's stash": {
name: '',
cron: '0 */4 * * *',
lifetime: 1717,

properties: {
cpnChest: {},
cpnInventory: {
items: [{
name: 'Broken Elderbow',
spritesheet: 'server/mods/iwd-ranger/images/items.png',
sprite: [0, 0],
noSalvage: true
}]
}
}
},

talkfinn: {
properties: {
cpnNotice: {
actions: {
enter: {
cpn: 'dialogue',
method: 'talk',
args: [{
targetName: 'finn elderbow'
}]
},
exit: {
cpn: 'dialogue',
method: 'stopTalk'
}
}
}
}
}
}
};
});

Loading…
Откажи
Сачувај