diff --git a/game/begin.coffee b/game/begin.coffee index bbac8b3..1617983 100644 --- a/game/begin.coffee +++ b/game/begin.coffee @@ -29,19 +29,30 @@ a = require('raconteur/lib/elements.js').a way_to = (content, ref) -> a(content).class('way').ref(ref) textlink = (content, ref) -> a(content).once().writer(ref) textcycle = (content, ref) -> a(content).replacer(ref).class("cycle").id(ref).toString() +# Cycling link. It's implied there can be only one per situation. +# Also it saves the current index in the window object, which is not okay for longer games because no saving. +# You are welcome to improve this code. +cycle = (obj) -> + responses = obj.cycle_gallery() + window.cycle_index ?= [] + window.cycle_index[obj.name] ?= 0 + if window.cycle_index[obj.name] == responses.length + window.cycle_index[obj.name] = 0 + response = responses[window.cycle_index[obj.name]] + window.cycle_index[obj.name]++ + return textcycle(response, 'cyclewriter') writemd = (system, text) -> if typeof text is Function text = text() system.write(markdown.render(text)) situation "start", + cycle_gallery: () -> "christine".l() content: () -> - return "start".l()(this.writers.smell) + return "start".l()(cycle(this)) choices: ["#start"], writers: - smell: textcycle("пахнет сладким мёдом", "look") - look: textcycle("смотрит вдаль, о чём-то задумавшись", "touch") - touch: textcycle("крепко обнимает меня, впиваясь ногтями в плечо", "smell") + cyclewriter: () -> cycle(this) is_visited = (situation) -> situations = undum.game.situations[situation] diff --git a/game/translations/en.coffee b/game/translations/en.coffee index 1d8c679..9cc5e4c 100644 --- a/game/translations/en.coffee +++ b/game/translations/en.coffee @@ -1,29 +1,40 @@ module.exports.language = - intro: """ - -- Damn, they keep coming! - - A narrow corridor, me and unstoppable line of pearlskinned shiny androids. - I'm sure I expected this New Year to be a lot different. - - One crate of androids contains thirty five machines. - This is going to be a long battle. - """ - androidattack: "One of androids is so close he bites me!" emptyclip: "I get rid of empty cartridge." player_hit: [ - "Android's head explodes like a Christmas fireworks.", - "Android tries to dodge but finds himself right on the bullet's wrong side. - He falls, flooding the floor with oil." + """ + The bullet pierces the creature's head, and it becomes water, spilling on the soil. + But the next one is already coming out of the portal. + """, + """ + Robot tries to dodge but comes square under the bullet. + He falls, spilling on soil. + """, + """ + The bullet tears the liquid robot apart to droplets. + + „It's a clear sky for a rain like that, don't you think?” + """, + """ + The enemy blows up to a little liquid droplets. + """, + """ + The bullet pierces the robot and vanishes inside the portal. + There is only a pool of liquid chrome on this side. + I see a new suicidal coming out of the green door. + Seems like I wasn't very precise on the other side. + """ ] player_finished: [ - "I finish the android with a shot to his heart.", - "I finish the android with a precise shot.", - "The bullet pierces android's head and he finally falls on the floor motionless.", + "I finish the robot with a shot to his heart.", + "I finish the robot with a precise shot.", + "The bullet pierces robot's head and he finally spills on the floor.", ] player_nicked: [ - """I shoot the enemy's leg off. - He falls but keeps slowly scratch his way with his hands.""", - "I shoot through the android's arm. He stumbles but keeps going.", + """ + I shoot the enemy's leg off. + He falls but keeps slowly scratch his way with his hands. + """, + "I shoot through the robots' arm. He stumbles but keeps going.", ] shoot: [ "Shoot", @@ -35,11 +46,11 @@ module.exports.language = "Attack", "Shoot 'em", "KILL THEM WITH PISTOL", - "I HATE ANDROIDS", + "I HATE ROBOTS", "I. Hate. Machines.", "MECHANOID ANNIHILATION", 'Destroy the mechanoids', - "Send a bullet to android", + "Send a bullet to robot", "Send a bullet with explosion", "Push the trigger FOR THE HUMANITY", "Sit down and shoot from a hip", @@ -48,49 +59,10 @@ module.exports.language = ] reload: "Reload the pistol", reload_response: """ - I put another clip in the pistol. - I hope it has some ammo. - """ - search: "Search for a clip" - search_response: [ - "I hastily search the floor, trying to find at least one cartridge intact.", - "I quickly look around for a clip on the floor.", - ] - finale: """ - KABOOM! - - The last android suddenly explodes like larded with dynamite. - Eh, with these machines you never know. - I turn around and go away, not looking at the fire. - - My job is done. - -

THE END

- - The game uses following CC-BY and public domain sound effects and images: - - * SpartanX109 - [Desert Eagle Fire.mp3](http://freesound.org/people/SpartanX109/sounds/89147/) - * ngphil22 - [DEagle wCasing.mp3](http://freesound.org/people/ngphil22/sounds/233322/) - * watupgroupie - [gunshots.mp3](http://freesound.org/people/watupgroupie/sounds/36815/) - * qubodup - [Bullet silhoettes](https://openclipart.org/detail/29029/bullet-silhouettes) - """ - finale_perfect: """ - 35 shots. - That's all it took. - Whether by impossible luck or by some higher being's meddling, there's still a lot of time left. - - My job is done. - Now I can have a good New Year. - -

THE END

- - The game uses following CC-BY and public domain sound effects and images: - - * SpartanX109 - [Desert Eagle Fire.mp3](http://freesound.org/people/SpartanX109/sounds/89147/) - * ngphil22 - [DEagle wCasing.mp3](http://freesound.org/people/ngphil22/sounds/233322/) - * watupgroupie - [gunshots.mp3](http://freesound.org/people/watupgroupie/sounds/36815/) - * qubodup - [Bullet silhoettes](https://openclipart.org/detail/29029/bullet-silhouettes) + I put another clip in the pistol. + I hope it has some ammo. """ + search: "Ask Christine to search for a clip" clips_not_found: [ "No, nothing here.", "Come on, at least one! No, didn't find any.", @@ -118,11 +90,232 @@ module.exports.language = A single shot there - and a section collapses, taking two enemies out. ", ] + start: (link) -> """ + -- Tony, do you really need the pistol now? + + We are sitting together, hugging each other, on our backyard. + Christine #{link}. + I adjust the holster on my hip. + """ + endintro: """ + Before I have time to open my mouth, a big green portal opens before us, + and a large metallic humanlike robot with chrome body steps out. + He raises his hand and aims it on Christine. + + I snatch the pistol from the holster before I comprehend a short wand in the robot's hand. + """ + firstmove: """ + The bullet turns the thing I took for a robot in a water pillar. + It spills on the ground, losing the wand. + + Christine tosses up her hands in *Fitnag* sign. + + „Shoot everything!” + + Almost on cue the green portal surface flickers and a chrome leg steps out. + """ + search_response:[ + """ + „Christine! Ammo!” + + „I'm searching!” + """ + """ + I quickly look around. + Christine runs around the house searching for my ammo stashes. + """, + """ + I quickly look around. + Christine is already searching for ammo. + """, + """ + I hope she can hold the barrier and search for ammo at the same time. + """, + """ + „Christine! Look in the freezer!” + + „I swear you and your stashes...” + + I hope she'll find at least a half-spent clip. + """, + """ + „Christine! In the toilet, under the cistern!” + + „Who keeps his ammo under the cistern?!” + + „Well, I don't remember, it might not be there. Please take a look!“ + + """, + """ + „Christine! I need ammo!” + + „I'm searching!” + """, + ] + christine: [ + "smells like sweet, sweet honey", + "looks far ahead, thinking about something", + "hugging me tight, sinking her nails in my shoulder", + ] + finale: + """ + Ко мне подходит Кристина. + Она обнимает меня и целует. + + -- Мой герой. + + -- Тебе помочь закрыть портал? + + -- Я сама виновата. + Не вспомнила про такую простую защиту. + + -- Ну, ты могла бы в другой раз не унижать так много волшебников сразу. + Возможно, они бы не прислали своих големов или как это называется. + + -- Конструкты. А ты мог бы быть лапушкой и держать свои патроны вместе с + оружием где-нибудь в оружейном сейфе. + + -- А если... + + -- А ты поставь второй секретный сейф. + + -- Сделаю. Так что, мы ещё успеваем закончить романтический вечер? + + -- Ты обещаешь быть жестоким и безоружным? + + -- Я буду чист и многозаряден. + + Я поцеловал Кристину и оставил её рядом с зелёным порталом. + Думаю, мне не надо беспокоиться за её безопасность. + Она может остановить любые пули и заклинания. + + И всё-таки я оставлю тайник на чердаке с ракетами на всякий случай. + """ + finale_perfect: + """ + 25 выстрелов. + Вот всё, что потребовалось. + Была ли это невероятная удача, или вмешательство высшей силы, но ещё осталось много времени. + + Моя работа сделана. + А теперь наш вечер вдвоём будет таким, каким он должен быть. + """ + credits: + """ + ### THE END + + The game uses the following public domain and CC-BY assets: + + * SpartanX109 - [Desert Eagle Fire](http://freesound.org/people/SpartanX109/sounds/89147/) + * ngphil22 - [DEagle wCasing](http://freesound.org/people/ngphil22/sounds/233322/) + * watupgroupie - [gunshots](http://freesound.org/people/watupgroupie/sounds/36815/) + * 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. + Want to compare yourself against other players? + """ + clips_not_found: [ + """ + -- Не могу найти! + """, + """ + -- Ничего нет! + + -- Ну хотя бы один! + + -- Я держу барьер! Экономь патроны! + """, + """ + -- Пусто! + + -- Ты посмотрела... + + -- Да я везде уже посмотрела, нет больше твоих картриджей! + + -- Ладно, дай тогда вспомню, где ещё были заначки. + """, + "-- Пусто!", + "-- Ничего!", + "-- Вспоминай лучше! Тут чисто!", + """ + -- Ты не можешь хранить все патроны в одном месте?! + Их не найти! + + -- Это система! + + -- Это мания! + """, + ] + clips_found:[ + "Ага! Есть один. Надеюсь, в нём есть патроны.", + "А, вот какой-то. На вес тяжёлый -- надеюсь, в нём есть патроны." + ] + player_missed:[ + "Пуля пролетает над левым плечом робота.", + "Робот вовремя уворачивается от выстрела. Ничего, в следующий раз я не промахнусь.", + "Чёрт! Промазал.", + "Мимо! Ну что за невезение.", + "На заметку: надо чаще упражняться в стрельбе. Часто промахиваюсь.", + "Чёрт! Почему я промазал именно сейчас?!", + ] + player_trickshot: [ + """ + Я разбегаюсь к стене и прыгаю, стреляя в полёте. + Пуля пролетает сквозь голову робота прямо в следующего, вырубая обоих. + """, + """ + Я замечаю слабое место в потолке. + Один выстрел туда -- и секция разваливается, убирая под собой двух врагов. + """ + ] + pacifist: """ + -- Не стреляйте! Я пацифист! + + Один из роботов поднимает руки вверх. + На его лице написана мольба. + """ + shoot_pacifist: (link) -> """ + Я простреливаю его блестящую металлическую #{link}. + Из портала выходит другой робот, который ударом ноги валит на землю товарища. + Затем он наступает на его голову. + Странный робот стекает в лужу, но его место уже занял другой, более нормальный. + """ + spare_pacifist: """ + Я опускаю пистолет. + + -- Спасибо! -- кричит странный робот. -- Я обязательно... + + Тут его толкают сзади, и он падает на землю лицом вниз. + + -- Директива А028. Девиантное поведение. Уничтожить. + + Робот, следующий за ним, наносит пацифисту мощный удар в затылок. + После этого он перешагивает через свежую лужицу и смотрит на меня злым взглядом. + Похоже, битва продолжается. + """ + firststeps: "Это шаги? Похоже, что-то приближается по ту сторону портала." + secondsteps: "Шаги становятся громче. Оно большое." + thirdsteps: "Уже близко. Совсем близко." + boss: """ + Из портала вылезает гигантская блестящая Рука. + Она цепляется за край портала и начинает его растягивать. + + Кристина кричит: + -- Оно слишком большое! Я не смогу удержать! + + Из растянутого портала показывается ведро. + Это голова робота-титана, который мог бы таранить города. + Я точно не хочу впускать его на задний двор своего дома. + """ + shoot_boss: "Успокоить титана свинцом" trick_shot_discover: (character) -> """ I count the clips. Only four left. - I've killed #{character.sandbox.killed} androids, meaning, there are still... oh. + I've killed #{character.sandbox.killed} robots, so there are still... oh. OH. I gotta conserve the ammo. I can try trick shots but these are big risk. diff --git a/game/translations/ru.coffee b/game/translations/ru.coffee index 7c8d299..1d6ae8b 100644 --- a/game/translations/ru.coffee +++ b/game/translations/ru.coffee @@ -83,7 +83,7 @@ module.exports.language = "Стрельба", "СТРЕЛЯТЬ!", "УБИТЬ ИХ ИЗ ПИСТОЛЕТА", - "НЕНАВИЖУ АНДРОИДОВ", + "НЕНАВИЖУ РОБОТОВ", "АННИГИЛЯЦИЯ МЕХАНОИДОВ", "Уничтожить механоидов", "Отправить пулю в робота", @@ -160,7 +160,7 @@ module.exports.language = И всё-таки я оставлю тайник на чердаке с ракетами на всякий случай. """ finale_perfect: """ - 35 выстрелов. + 25 выстрелов. Вот всё, что потребовалось. Была ли это невероятная удача, или вмешательство высшей силы, но ещё осталось много времени. @@ -210,9 +210,6 @@ module.exports.language = -- Это мания! """, - """ - -- - """ ] enemies: 'Врагов впереди' clips: 'Картриджей с патронами' @@ -234,7 +231,7 @@ module.exports.language = """ Я пересчитываю картриджи. Осталось всего четыре. - Я убил #{character.sandbox.killed} андроидов, то есть, впереди ещё... ой. + Я убил #{character.sandbox.killed} роботов, то есть, впереди ещё... ой. ОЙ. Надо экономить патроны. Я могу попробовать хитрые выстрелы, но это -- большой риск. @@ -247,6 +244,11 @@ module.exports.language = Один выстрел туда -- и секция разваливается, убирая под собой двух врагов. """ ] + christine: [ + "пахнет сладким мёдом", + "смотрит вдаль, о чём-то задумавшись", + "крепко обнимает меня, впиваясь ногтями в плечо", + ] pacifist: """ -- Не стреляйте! Я пацифист! diff --git a/html/en.html b/html/en.html index 4e42c46..035c0ac 100644 --- a/html/en.html +++ b/html/en.html @@ -2,41 +2,53 @@ - - Thirty five shots - + Bullets talk faster + -
- -
-
+
+
+
- -

Thirty five shots

-

An online sci-fi first person cybertext shooter

+

Bullets talk faster

+

An online fantasy first person cybertext shooter

click to play

-
-

+
+
+
+

+
+ +
+
+ +
+
- -
+
-
@@ -52,18 +64,6 @@
- -
- - -
-
-
-
- - -
-
@@ -71,7 +71,27 @@ + + + + + + + diff --git a/html/index.html b/html/index.html index 5a8a3d3..e04240d 100644 --- a/html/index.html +++ b/html/index.html @@ -65,18 +65,6 @@
- -
- - -
-
-
-
- - -
-
diff --git a/sass/main.scss b/sass/main.scss index c729403..b06ea00 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -25,24 +25,9 @@ body { #content_wrapper { display: none; // Shown by Javascript } -/* -#content_wrapper { - margin: 1.1em auto; - padding: 2.8em; -} -@media (min-width: 981px) { - #content_wrapper { - margin: 1.1em 15%; - } -} -@media (min-width: 1281px) { - #content_wrapper { - margin: 1.1em 25%; - } -} -*/ // The title block .title { + margin-top: 2em; @include col(10,12); @media (min-width: breakpoint-min(sm)) { @include make-col-offset(1);