Lots of fixes

- The game has been shortened
- The volume slider saves its value in a cookie
- Translation update
- No stats screen
master
Alexander Yakovlev 7 years ago
parent d1069333dd
commit 3d68ca3bc9

@ -2,6 +2,7 @@ situation = require('raconteur')
undum = require('undum-commonjs')
oneOf = require('raconteur/lib/oneOf.js')
qualities = require('raconteur/lib/qualities.js')
cookie = require('tiny-cookie')
# load the translations
undumloc = require("./translations/ru.coffee").language

@ -11,7 +11,7 @@ qualities
undum.game.init = (character, system) ->
system.setQuality("bullets", 6)
# Number of enemies. More enemies means the game will be longer.
system.setQuality("enemies", 25)
system.setQuality("enemies", 21)
system.setQuality("clips", Math.floor(character.qualities.enemies / 6))
character.sandbox.search_clip_threshold = character.qualities.clips - 2
character.sandbox.clips = []
@ -39,6 +39,7 @@ undum.game.init = (character, system) ->
value: 100,
slide: (event, ui) ->
value = slider.slider('value')
cookie.set('volume', value, { expires: '1D' })
volume = $('.voldisplay')
if value <= 5
volume.css('background-position', '0 0')
@ -49,6 +50,7 @@ undum.game.init = (character, system) ->
else
volume.css('background-position', '0 -75px')
})
slider.slider('value', cookie.get("volume"))
)
setInterval( () ->
play_steps(character)

@ -1,7 +1,8 @@
# This is an easy game.
# I'm thinking if you want more harder approach, you can:
# a) remove bullet counter (you don't know how many bullets left in a clip)
# b) remove canChoose restriction (you can shoot any time you want, but if you have no bullets - nothing comes out and you've lost a turn)
# a) remove bullet counter (you have to count rounds yourself)
# b) remove canChoose restriction (you can shoot any time you want, but if you have no rounds left - nothing comes out and you've lost a turn)
# c) then the enemies can finally have enough time to go close enough and attack
# Scripted events. Called *after* every shot.
scripted_events = (character, system) ->
@ -151,8 +152,8 @@ situation "shoot",
if character.sandbox.shots == 1 # guaranteed first hit
return system.doLink("hit")
roll = system.rnd.dice(1,20) # d20 roll
hit_threshold = 15
miss_threshold = 18
hit_threshold = 14
miss_threshold = 17
if character.qualities.enemies == 1
miss_threshold = 15 # you can't nick The Boss
switch
@ -196,7 +197,7 @@ situation "reload",
after: (character, system) ->
spend_clip(character, system)
writemd(system, "reload_response".l())
if character.sandbox.trick_shot == 0 and character.sandbox.clips.length == 4
if character.sandbox.trick_shot == 0 and character.sandbox.clips.length == character.sandbox.search_clip_threshold
character.sandbox.trick_shot = 1
writemd(system, "trick_shot_discover".l()(character))
return true

@ -129,7 +129,7 @@ situation "finale",
_paq.push(['setCustomDimension', 3, character.sandbox.reloads])
choices: ["#finale"],
content: (character, system) ->
if character.sandbox.shots < 36
if character.sandbox.shots < 21
"""
#{"finale_perfect".l()}
@ -140,19 +140,3 @@ situation "finale",
#{"credits".l()}
"""
# I wanted to do Piwik graphs a lá Telltale's "How many players did that too"
# but I need players for that and for some reason Piwik doesn't have any data from
# my betatesters. So instead I just have to scold the player.
situation "stats",
tags: "finale",
before: (character, system, from) ->
system.clearContent()
optionText: "stats_option".l()
content: (character, system) ->
writemd(system, "stats".l())
if character.sandbox.shot_pacifist == 1
writemd(system, "stats_shot".l())
else
writemd(system, "stats_spared".l())
writemd(system, "stats_end".l())

@ -59,17 +59,17 @@ module.exports.language =
]
reload: "Reload the pistol",
reload_response: """
I put another clip in the pistol.
I put another cartridge in the pistol.
I hope it has some ammo.
"""
search: "Ask Christine to search for a clip"
search: "Ask Christine to search for a cartridge"
clips_not_found: [
"No, nothing here.",
"Come on, at least one! No, didn't find any.",
]
enemies: 'Enemies ahead'
clips: 'Cartridges'
bullets: 'Bullets in clip'
bullets: 'Bullets in cartridge'
clips_found: [
'Aha! Got one. I hope it has some ammo.',
"Eh, here's one. Looks heavy -- I hope it has some ammo.",
@ -133,7 +133,7 @@ module.exports.language =
I swear you and your stashes...
I hope she'll find at least a half-spent clip.
I hope she'll find at least a half-spent cartridge.
""",
"""
Christine! In the toilet, under the cistern!
@ -213,22 +213,6 @@ module.exports.language =
* Yoyodaman234 - [metal footstep 1](http://freesound.org/people/Yoyodaman234/sounds/223168/)
* qubodup - [Bullet silhoettes](https://openclipart.org/detail/29029/bullet-silhouettes)
"""
stats:
"""
Thank you for finishing my game.
There should be some graphs and scoring here.. but with all the Adblock users and Piwik errors
I could not gather enough samples to score against.
Maybe in later versions.
"""
stats_end:
"""
Goodbye.
*Oreolek*
"""
stats_shot: "Just a quick question: why did you shoot the pacifist bot? It was harmless. Did you even notice him?"
stats_spared: "Nice call on sparing the pacifist, by the way."
clips_not_found: [
"""
Can't find it!”
@ -253,7 +237,7 @@ module.exports.language =
"“Nothing!”",
"“It's empty! Jog your memory better!”",
"""
Can't you keep every clip in one place?!
Can't you keep every cartridge in one place?!
I can't find them!”
It's a system!”
@ -325,7 +309,7 @@ module.exports.language =
shoot_boss: "Calm down the titan with lead"
trick_shot_discover: (character) ->
"""
I count the clips.
I count the cartridges.
Only four left.
I've killed #{character.sandbox.killed} robots, so there are still... oh.
OH.
@ -345,7 +329,7 @@ module.exports.language =
"""
branch1_a_option: "It's not enough."
branch1_a: """
It's not enough. -- I place my hand on pistol's grip.
It's not enough.“ -- I place my hand on pistol's grip.
Tony, it's our romantic evening.
You can leave the gun at home.
@ -358,7 +342,6 @@ module.exports.language =
I have been waiting for three weeks to have an evening for two.
Put the gun down and relax.
"""
stats_option: "Your score"
dlg_finale1_option: "I'm relaxed already."
dlg_finale1: (link) -> """
What are you talking about?

@ -178,13 +178,6 @@ module.exports.language =
* Yoyodaman234 - [metal footstep 1](http://freesound.org/people/Yoyodaman234/sounds/223168/)
* qubodup - [Bullet silhoettes](https://openclipart.org/detail/29029/bullet-silhouettes)
"""
stats: """
Спасибо, что прошли мою игру.
Здесь должны быть графики и счёт... но со всеми пользователями Adblock и
ошибками Piwik мне не удалось собрать достаточно пользователей, чтобы сравнивать результаты.
Возможно, в будущих обновлениях.
"""
clips_not_found:[
"-- Не могу найти!",
"""
@ -322,15 +315,6 @@ module.exports.language =
Я три недели ждала, когда у нас наконец-то будет вечер на двоих.
Положи пистолет и расслабься.
"""
stats_option: "Ваш счёт"
stats_end:
"""
До свидания.
*Oreolek*
"""
stats_shot: "Только быстрый вопрос: почему вы стреляли в пацифист-бота? Он был безвреден. Вы же заметили его?"
stats_spared: "Хорошее решение не стрелять в пацифиста, кстати."
dlg_finale1_option: "Я и так расслаблен."
dlg_finale1: (link) -> """
-- О чём ты говоришь?

@ -5,7 +5,7 @@
"jquery": "^2.1.3",
"jquery-ui": "^1.10.5",
"markdown-it": "^4.1.0",
"color": "^0.10.1"
"tiny-cookie": "^0.5.5"
},
"private": true,
"devDependencies": {

Loading…
Cancel
Save