Finale. Also fixed `gulp dist`

This commit is contained in:
Alexander Yakovlev 2015-12-10 16:27:35 +07:00
parent a2e2f24775
commit 1fd7c85c2e
6 changed files with 67 additions and 9 deletions

View File

@ -160,13 +160,13 @@ gulp.task('less-dist', function () {
var distBundler = browserify({
debug: false,
entries: ['./game/main.coffee'],
entries: ['./build/game/main.coffee'],
transform: ['coffeeify']
});
distBundler.external('undum-commonjs');
gulp.task('coffee-dist', ['undum-dist'], function () {
gulp.task('coffee-dist', ['undum-dist', 'concatCoffee'], function () {
return distBundler.bundle()
.pipe(source('bundle.js'))
.pipe(buffer())

View File

@ -16,6 +16,7 @@ undum.game.init = (character, system) ->
character.sandbox.seen_search = 0
character.sandbox.trick_shot = 0
character.sandbox.shots = 0
character.sandbox.reloads = 0
character.sandbox.killed = 0
character.sandbox.seen_pacifist = 0
character.sandbox.shot_pacifist = undefined

View File

@ -65,6 +65,7 @@ spend_bullet = (character, system) ->
$("#clip img").attr("src", "img/clip"+bullets+".png")
spend_clip = (character, system) ->
character.sandbox.reloads++
bullets = character.sandbox.clips[character.sandbox.current_clip]
clips = character.sandbox.clips.length
if clips < 2

View File

@ -175,6 +175,11 @@ play_step = (volume) ->
audio.play()
situation "finale",
before: (character, system) ->
_paq.push(['setCustomDimension', 1, character.sandbox.shots])
_paq.push(['setCustomDimension', 2, character.sandbox.shot_pacifist])
_paq.push(['setCustomDimension', 3, character.sandbox.reloads])
choices: ["#finale"],
content: (character, system) ->
if character.sandbox.shots < 36
"""
@ -187,3 +192,12 @@ situation "finale",
#{"credits".l()}
"""
situation "stats",
tags: "finale",
optionText: "Ваш счёт",
content: """
#{"stats".l()}
"""
#<img src="index.php?module=API&method=ImageGraph.get&idSite=2&apiModule=UserSettings&apiAction=getResolution&token_auth=anonymous&graphType=verticalBar&period=month&date=today&width=500&height=250">

View File

@ -127,13 +127,37 @@ module.exports.language =
]
finale:
"""
Ба-бах!
Ко мне подходит Кристина.
Она обнимает меня и целует.
Последний андроид внезапно взрывается, как будто нашпигованный динамитом.
А, впрочем, с этими машинами никогда не знаешь наверняка.
Я отворачиваюсь и ухожу прочь, не обращая внимания на взрыв.
-- Мой герой.
Моя работа сделана.
-- Тебе помочь закрыть портал?
-- Я сама виновата.
Не вспомнила про такую простую защиту.
-- Ну, ты могла бы в другой раз не унижать так много волшебников сразу.
Возможно, они бы не прислали своих големов или как это называется.
-- Конструкты. А ты мог бы быть лапушкой и держать свои патроны вместе с
оружием где-нибудь в оружейном сейфе.
-- А если...
-- А ты поставь второй секретный сейф.
-- Сделаю. Так что, мы ещё успеваем закончить романтический вечер?
-- Ты обещаешь быть жестоким и безоружным?
-- Я буду чист и многозаряден.
Я поцеловал Кристину и оставил её рядом с зелёным порталом.
Думаю, мне не надо беспокоиться за её безопасность.
Она может остановить любые пули и заклинания.
И всё-таки я оставлю тайник на чердаке с ракетами на всякий случай.
"""
finale_perfect: """
35 выстрелов.
@ -154,6 +178,9 @@ 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: """
Спасибо, что прошли мою игру. Хотите сравнить себя с другими?
"""
clips_not_found:[
"-- Не могу найти!",
"""

View File

@ -13,7 +13,7 @@
<div class="label">
<h1>Пули говорят быстрее</h1>
<h3>Научно-фантастический онлайн кибертекстовый шутер от первого лица</h3>
<p>от <b><a href="https://oreolek.ru/">Oreolek'а</a></b></p>
<p>от <b><a href="https://oreolek.ru/" target="_blank">Oreolek'а</a></b></p>
<noscript>
<p class="noscript_message">Эта игра требует Javascript.</p>
</noscript>
@ -33,7 +33,7 @@
<div id="legal">
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" class="footright"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a>
<p>Приблизительное время прохождения игры: пять минут.</p>
<p>Написано при помощи <a href="http://undum.com">Undum</a> и <a href="http://sequitur.github.io/raconteur/">Raconteur</a>.</p>
<p>Написано при помощи <a href="http://undum.com" target="_blank">Undum</a> и <a href="http://sequitur.github.io/raconteur/" target="_blank">Raconteur</a>.</p>
<p class="muted">Бета-тестеры: headless zombie, Kie Kazuki</p>
</div>
</div>
@ -74,5 +74,20 @@
<audio id="roar" preload="auto"><source src="audio/roar.mp3" type='audio/mpeg; codecs="mp3"'></audio>
<script type="text/javascript" src="game/undum.js"></script>
<script type="text/javascript" src="game/bundle.js"></script>
<!-- Piwik tracking. Google or Yandex DON'T see these analytics. Also I support Do Not Track feature. -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//webstats.oreolek.ru/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//webstats.oreolek.ru/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
</body>
</html>