Files
adarkroom/script/events/global.js
T

67 lines
1.6 KiB
JavaScript
Raw Normal View History

2013-07-03 07:56:13 -07:00
/**
* Events that can occur when any module is active (Except World. It's special.)
**/
Events.Global = [
{ /* The Thief */
2014-02-04 22:27:00 +01:00
title: _('The Thief'),
2013-07-03 07:56:13 -07:00
isAvailable: function() {
return (Engine.activeModule == Room || Engine.activeModule == Outside) && $SM.get('game.thieves') == 1;
2013-07-03 07:56:13 -07:00
},
scenes: {
'start': {
text: [
2014-02-04 22:27:00 +01:00
_('the villagers haul a filthy man out of the store room.'),
_("say his folk have been skimming the supplies."),
_('say he should be strung up as an example.')
2013-07-03 07:56:13 -07:00
],
2014-02-04 22:27:00 +01:00
notification: _('a thief is caught'),
2014-07-24 12:00:51 -04:00
blink: true,
2013-07-03 07:56:13 -07:00
buttons: {
'kill': {
2014-02-04 22:27:00 +01:00
text: _('hang him'),
2013-07-03 07:56:13 -07:00
nextScene: {1: 'hang'}
},
'spare': {
2014-02-04 22:27:00 +01:00
text: _('spare him'),
2013-07-03 07:56:13 -07:00
nextScene: {1: 'spare'}
}
}
},
'hang': {
text: [
2014-07-13 11:34:35 -04:00
_('the villagers hang the thief high in front of the store room.'),
_('the point is made. in the next few days, the missing supplies are returned.')
],
onLoad: function() {
$SM.set('game.thieves', 2);
$SM.remove('income.thieves');
$SM.addM('stores', $SM.get('game.stolen'));
},
buttons: {
2013-07-03 07:56:13 -07:00
'leave': {
2014-02-04 22:27:00 +01:00
text: _('leave'),
2013-07-03 07:56:13 -07:00
nextScene: 'end'
}
}
},
'spare': {
text: [
2014-07-13 11:34:35 -04:00
_("the man says he's grateful. says he won't come around any more."),
_("shares what he knows about sneaking before he goes.")
],
onLoad: function() {
$SM.set('game.thieves', 2);
$SM.remove('income.thieves');
$SM.addPerk('stealthy');
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
2013-07-03 07:56:13 -07:00
}
}
}
2014-07-13 11:34:35 -04:00
];