mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Finished first version of medicine feature.
This commit is contained in:
+85
-1
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
];
|
||||
Reference in New Issue
Block a user