Przeglądaj źródła

merged 421-extend-sewer

tags/v0.1.10^2
big bad waffle 6 lat temu
rodzic
commit
633f5faa3b
8 zmienionych plików z 218 dodań i 178 usunięć
  1. BIN
     
  2. BIN
     
  3. +1
    -1
      src/client/index.html
  4. +16
    -0
      src/server/components/door.js
  5. +1
    -1
      src/server/components/inventory.js
  6. +149
    -25
      src/server/config/maps/sewer/map.json
  7. +48
    -151
      src/server/config/maps/sewer/zone.js
  8. +3
    -0
      src/server/world/mobBuilder.js


+ 1
- 1
src/client/index.html Wyświetl plik

@@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>isleward</title>
<title>dev</title>
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="js/system/addons.js"></script>
<script src="plugins/require.js" data-main="js/app"></script>


+ 16
- 0
src/server/components/door.js Wyświetl plik

@@ -10,12 +10,15 @@ define([
closed: true,
key: null,

destroyKey: false,

openSprite: 157,
closedSprite: 156,

init: function (blueprint) {
this.locked = blueprint.locked;
this.key = blueprint.key;
this.destroyKey = blueprint.destroyKey;

if (this.closed)
this.obj.instance.physics.setCollision(this.obj.x, this.obj.y, true);
@@ -115,6 +118,19 @@ define([
var key = obj.inventory.items.find(i => ((i.keyId == this.key) || (i.keyId == 'world')));
if (!key)
return;

if (((key.singleUse) || (this.destroyKey)) && (key.keyId != 'world')) {
obj.inventory.destroyItem(key.id);

obj.instance.syncer.queue('onGetMessages', {
id: obj.id,
messages: [{
class: 'q0',
message: 'The ' + key.name + ' disintegrates on use',
type: 'info'
}]
}, [obj.serverId]);
}
}

if (this.closed) {


+ 1
- 1
src/server/components/inventory.js Wyświetl plik

@@ -874,7 +874,7 @@ define([
drop.magicFind = magicFind;

var item = drop;
if (!item.quest)
if ((!item.quest) && (item.type != 'key'))
item = generator.generate(drop);

if (!item.slot)


+ 149
- 25
src/server/config/maps/sewer/map.json
Plik diff jest za duży
Wyświetl plik


+ 48
- 151
src/server/config/maps/sewer/zone.js Wyświetl plik

@@ -15,6 +15,22 @@ module.exports = {
},
level: 10,

regular: {
drops: {
rolls: 1,
noRandom: true,
alsoRandom: true,
blueprints: [{
chance: 8,
type: 'key',
name: 'Rusted Key',
keyId: 'rustedSewer',
singleUse: true,
sprite: [12, 1]
}]
}
},

rare: {
count: 0
}
@@ -27,6 +43,22 @@ module.exports = {
},
level: 12,

regular: {
drops: {
rolls: 1,
noRandom: true,
alsoRandom: true,
blueprints: [{
chance: 2.5,
type: 'key',
name: 'Rusted Key',
keyId: 'rustedSewer',
singleUse: true,
sprite: [12, 1]
}]
}
},

rare: {
chance: 4,
name: 'Steelclaw',
@@ -35,167 +67,32 @@ module.exports = {
}
},
objects: {
shopestrid: {
sewerdoor: {
properties: {
cpnNotice: {
actions: {
enter: {
cpn: 'dialogue',
method: 'talk',
args: [{
targetName: 'estrid'
}]
},
exit: {
cpn: 'dialogue',
method: 'stopTalk'
}
}
cpnDoor: {
locked: true,
key: 'rustedSewer',
destroyKey: true
}
}
},
shoppriest: {
sewerdoor: {
properties: {
cpnNotice: {
actions: {
enter: {
cpn: 'dialogue',
method: 'talk',
args: [{
targetName: 'priest'
}]
},
exit: {
cpn: 'dialogue',
method: 'stopTalk'
}
}
cpnDoor: {
locked: true,
key: 'rustedSewer',
destroyKey: true
}
}
},
greencandle: {
components: {
cpnLight: {
simplify: function () {
return {
type: 'light',
blueprint: {
color: {
start: ['80f643'],
end: ['4ac441', '51fc9a', 'd07840']
},
lifetime: {
min: 2,
max: 6
}
}
}
}
}
}
},
alchgreenpot: {
components: {
cpnParticles: {
simplify: function () {
return {
type: 'particles',
blueprint: {
color: {
start: ['80f643', '80f643'],
end: ['4ac441', '4ac441']
},
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.1,
randomColor: true,
spawnType: 'rect',
spawnRect: {
x: -15,
y: -20,
w: 30,
h: 8
}
}
}
}
}
banditdoor: {
properties: {
cpnDoor: {}
}
},
alchredpot: {
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
}
}
}
}
}
vaultdoor: {
properties: {
cpnDoor: {}
}
}
}


+ 3
- 0
src/server/world/mobBuilder.js Wyświetl plik

@@ -149,6 +149,9 @@ define([
drops.blueprints.forEach(function (d) {
var drop = extend(true, {}, d);
d.level = level;
if (drop.type == 'key')
return;

mob.inventory.getItem(itemGenerator.generate(drop));
}, this);
}


Ładowanie…
Anuluj
Zapisz