Просмотр исходного кода

wrote yala dialogue

tags/v0.1.4^2
Shaun 7 лет назад
Родитель
Сommit
bf1d14db59
4 измененных файлов: 182 добавлений и 10 удалений
  1. +1
    -1
      src/server/config/factions/akarei.js
  2. +176
    -7
      src/server/config/maps/cave/dialogues.js
  3. +2
    -2
      src/server/config/maps/cave/zone.js
  4. +3
    -0
      src/server/world/spawners.js

+ 1
- 1
src/server/config/factions/akarei.js Просмотреть файл

@@ -9,7 +9,7 @@ define([
) {
return {
id: 'akarei',
name: 'Akarei',
name: 'The Akarei',
description: `The last descendents of the ancient Akarei.`,

uniqueStat: {


+ 176
- 7
src/server/config/maps/cave/dialogues.js Просмотреть файл

@@ -2,23 +2,31 @@ module.exports = {
'thaumaturge yala': {
'1': {
msg: [{
msg: `Is there anything I can help you with today?`,
options: [1.1, 1.2, 1.3, 1.4]
msg: `Yes?`,
options: [1.1, 1.2, 1.3, 1.4, 1.5, 1.6]
}],
options: {
'1.1': {
msg: `I'd like to browse your wares.`,
goto: 'tradeBuy'
msg: `Who are you?`,
goto: '2'
},
'1.2': {
msg: `Where did you come from?`,
goto: '5'
},
'1.3': {
msg: `Do you have any items for sale?`,
goto: 'tradeBuy'
},
'1.4': {
msg: `I have some items to sell.`,
goto: 'tradeSell'
},
'1.3': {
'1.5': {
msg: `I want to buy something back.`,
goto: 'tradeBuyback'
},
'1.4': {
'1.6': {
msg: `I have some crystals for you.`,
prereq: function(obj) {
var crystals = obj.inventory.items.find(i => (i.name == 'Digested Crystal'));
@@ -28,6 +36,167 @@ module.exports = {
}
}
},
'2': {
msg: [{
msg: `I am Thaumaturge Yala, thirty-fourth in line to the throne of the Akarei.`,
options: [2.1]
}],
options: {
'2.1': {
msg: `Who are the Akarei?`,
goto: '3'
}
}
},
'3': {
msg: [{
msg: `The Akarei are both the first, and the last wielders of true magic.`,
options: [3.1]
}],
options: {
'3.1': {
msg: `True magic?`,
goto: '4'
}
}
},
'4': {
msg: [{
msg: `Others toil away in an effort to bend magic to their wills; tainting it. We, the Akarei, perform only the purest of incantations.`,
options: [4.1]
}],
options: {
'4.1': {
msg: `I would like to ask something else.`,
goto: '1'
}
}
},
'5': {
msg: [{
msg: `We hail from the city Iskar; our home and haven.`,
options: [5.1, 5.2]
}],
options: {
'5.1': {
msg: `How did you get here?`,
goto: '6'
},
'5.2': {
msg: `What are you doing here?`,
goto: '10'
}
}
},
'6': {
msg: [{
msg: `Through a portal, for Iskar lies in another dimension. But now, we are trapped here. The portal has been closed from the other side and we lack the power to repopen it from here.`,
options: [6.1]
}],
options: {
'6.1': {
msg: `Why would the portal have been closed?`,
goto: '7'
}
}
},
'7': {
msg: [{
msg: `I can not say for certain, but the Akarei have never been wanting for enemies.`,
options: [7.1]
}],
options: {
'7.1': {
msg: `A foe?`,
goto: '8'
}
}
},
'8': {
msg: [{
msg: `A darkness. A nameless, faceless enemy that we can neither identify, nor combat. It has been chipping away at our defenses...almost consuming them. I fear if we do not return soon, it will be too late.`,
options: [8.1]
}],
options: {
'8.1': {
msg: `How can I help?`,
goto: '9'
}
}
},
'9': {
msg: [{
msg: `Slay the snails, gather crystals and bring them to me. The Akarei may reward those who assist them.`,
options: [9.1]
}],
options: {
'9.1': {
msg: `I would like to ask something else.`,
goto: '1'
}
}
},
'10': {
msg: [{
msg: `We were sent here by the Iskar Council, to seek a new form of energy.`,
options: [10.1, 10.2]
}],
options: {
'10.1': {
msg: `How will the energy be used?`,
goto: '11'
},
'10.2': {
msg: `And, did you find it?`,
goto: '12'
}
}
},
'11': {
msg: [{
msg: `Iskar is protected by a magic dome, created by the Founders; a bulwark of pure energy that has stood the test of all but our newest foe.`,
options: [7.1]
}],
options: {
}
},
'12': {
msg: [{
msg: `In a manner. The crystals in this cave are highly energized but in their natural form, they are too unstable for use.`,
options: [12.1]
}],
options: {
'12.1': {
msg: `So, your mission failed?`,
goto: '13'
}
}
},
'13': {
msg: [{
msg: `Not so. Curiously, the snails that inhabit this cave seem to have quite a taste for the crystals' unstable energy and once passed through their digestive tracts, it is expelled in a stable, usable form.`,
options: [13.1]
}],
options: {
'13.1': {
msg: `Well...that's disgusting.`,
goto: '14'
}
}
},
'14': {
msg: [{
msg: `Perhaps. But it may prove to be our salvation. For now we have double need of the energy. Our portal was closed from the other side and we don't have sufficient power between us to repopen it from here.`,
options: [14.1, 6.1]
}],
options: {
'14.1': {
msg: `How can I help?`,
goto: '9'
}
}
},
tradeBuy: {
cpn: 'trade',
method: 'startBuy',
@@ -52,7 +221,7 @@ module.exports = {
giveCrystals: {
msg: [{
msg: `The Akarei thank you.`,
options: [1.1, 1.2, 1.3]
options: [1.1, 1.2, 1.3, 1.4, 1.5]
}],
method: function(obj) {
var inventory = obj.inventory;


+ 2
- 2
src/server/config/maps/cave/zone.js Просмотреть файл

@@ -167,7 +167,7 @@ module.exports = {
level: 18,

regular: {
hpMult: 100,
hpMult: 75,
dmgMult: 2
},

@@ -500,7 +500,7 @@ module.exports = {
activate: function() {
var syncer = this.obj.instance.syncer;
var physics = this.obj.instance.physics;
var walls = this.obj.instance.objects.objects.filter(o => (o.name == 'redwall'));
var walls = this.obj.instance.objects.objects.filter(o => (o.objZoneName == 'redWall'));
walls.forEach(function(w) {
w.destroyed = true;
physics.setCollision(w.x, w.y, false);


+ 3
- 0
src/server/world/spawners.js Просмотреть файл

@@ -125,6 +125,9 @@ define([
this.setupObj(mob, blueprint);
}

if (l.blueprint.objZoneName)
mob.objZoneName = l.blueprint.objZoneName;

l.mob = mob;
}
}


Загрузка…
Отмена
Сохранить