Finished first version of medicine feature.

This commit is contained in:
Zarkonnen
2013-07-10 12:53:28 +02:00
parent 4334f36e57
commit bb953de92b
8 changed files with 285 additions and 40 deletions
+85 -1
View File
@@ -502,5 +502,89 @@ Events.Room = [
}
}
}
},
{ /* The Sick Man */
title: 'The Sick Man',
isAvailable: function() {
return Engine.activeModule == Room && typeof State.world == 'object';
},
scenes: {
'start': {
text: [
"a man hobbles up, coughing.",
"he begs you for medicine."
],
notification: 'a sick man hobbles up',
buttons: {
'help': {
text: 'give 1 medicine',
cost: { 'medicine': 1 },
notification: 'the man swallows the medicine eagerly',
nextScene: { 0.1: 'alloy', 0.3: 'cells', 0.5: 'scales', 1.0: 'nothing' }
},
'ignore': {
text: 'tell him to leave',
nextScene: 'end'
}
}
},
'alloy': {
text: [
"the man thanks you and gives you a reward.",
'some weird metal he picked up on his travels.'
],
onLoad: function() {
Engine.addStore('alien alloy', 1);
},
buttons: {
'bye': {
text: 'say goodbye',
nextScene: 'end'
}
}
},
'cells': {
text: [
"the man thanks you and gives you a reward.",
'some weird glowing boxes he picked up on his travels.'
],
onLoad: function() {
Engine.addStore('energy cell', 3);
},
buttons: {
'bye': {
text: 'say goodbye',
nextScene: 'end'
}
}
},
'scales': {
text: [
"the man thanks you and gives you a reward.",
'all he has are some scales.'
],
onLoad: function() {
Engine.addStore('scales', 5);
},
buttons: {
'bye': {
text: 'say goodbye',
nextScene: 'end'
}
}
},
'nothing': {
text: [
"the man thanks you and hobbles off."
],
buttons: {
'bye': {
text: 'say goodbye',
nextScene: 'end'
}
}
}
}
}
]
];