1
0
Fork 0
mirror of https://github.com/Oreolek/shooter.git synced 2024-06-17 07:10:45 +03:00

Pacifist event

This commit is contained in:
Alexander Yakovlev 2015-12-03 15:44:30 +07:00
parent d703f56360
commit 744df649bb
4 changed files with 103 additions and 4 deletions

View file

@ -127,3 +127,31 @@ module.exports.language =
I gotta conserve the ammo.
I can try trick shots but these are big risk.
"""
pacifist: """
-- Don't shoot! I'm a pacifist!
One of the androids raises hands.
His face is a mask of pleading.
"""
shoot_pacifist: (link) -> """
I shoot through his shiny metal #{link}.
His comrades push him forward and knock him on the floor.
The next in the corridor steps on his head and stomps on his torso.
The weird android lies motionless, but his place is already taken by other, a normal one.
"""
head: "head"
arm: "arm"
leg: "leg"
spare_pacifist: """
I put down the pistol.
-- Thank you! -- cries the weird android. -- I'll surely...
He gets knocked from behind and falls on the floor, face down.
-- Directive A028. Deviant behaviour. Destroy.
The following android delivers a hard blow to pacifist's nape.
He walks over the motionless body and looks at me with his evil eyes.
I guess the battle continues.
"""

View file

@ -27,6 +27,9 @@ undum.game.version = "1.0"
way_to = (content, ref) -> a(content).class('way').ref(ref)
textlink = (content, ref) -> a(content).once().writer(ref)
# The next line doesn't work for whatever reason:
#textcycle = (content, ref) -> span(a(content).replacer(ref)).class("cycle").id(ref)
textcycle = (content, ref) -> "<span id='#{ref}' class='cycle'><a href='./_replacer_#{ref}'>#{content}</a></span>"
is_visited = (situation) -> undum.game.situations[situation].visited == 1
writemd = (system, text) ->
if typeof text is Function
@ -86,6 +89,9 @@ spend_clip = (character, system) ->
bullets = character.sandbox.clips[character.sandbox.current_clip]
system.setQuality("bullets", bullets)
$("#clip img").attr("src", "img/clip"+bullets+".png")
if character.sandbox.killed > 15 and character.sandbox.seen_pacifist == 0
system.doLink("pacifist")
character.sandbox.seen_pacifist = 1
situation 'start',
content: "intro".l(),
@ -228,6 +234,35 @@ situation "finale",
return "finale_perfect".l()
return "finale".l()
situation "pacifist",
choices: ["#pacifist"],
content: (character, system) ->
return "pacifist".l()
situation "shoot_pacifist",
optionText: "Убить пацифиста",
tags: "pacifist",
choices: ["#shoot"],
before: (character, system) ->
character.sandbox.shot_pacifist = 1
content: (character, system) ->
link = textcycle("head".l(), "leg")
console.log(link)
return "shoot_pacifist".l()(link)
writers:
head: textcycle("head".l(), "leg")
leg: textcycle("leg".l(), "arm")
arm: textcycle("arm".l(), "head")
situation "spare_pacifist",
optionText: "Опустить оружие",
tags: "pacifist",
before: (character, system) ->
character.sandbox.shot_pacifist = 0
choices: ["#shoot"],
content: (character, system) ->
return "spare_pacifist".l()
qualities
head:
bullets: qualities.integer("bullets".l()),
@ -246,6 +281,8 @@ undum.game.init = (character, system) ->
character.sandbox.trick_shot = 0
character.sandbox.shots = 0
character.sandbox.killed = 0
character.sandbox.seen_pacifist = 0
character.sandbox.shot_pacifist = undefined
$("#title").click(() ->
$("#clip").fadeIn()
)

View file

@ -132,10 +132,40 @@ module.exports.language =
Я могу попробовать хитрые выстрелы, но это -- большой риск.
"""
player_trickshot: [
"""Я разбегаюсь к стене и прыгаю, стреляя в полёте.
Пуля пролетает сквозь голову андроида прямо в следующего, вырубая обоих.
"""
Я разбегаюсь к стене и прыгаю, стреляя в полёте.
Пуля пролетает сквозь голову андроида прямо в следующего, вырубая обоих.
""",
"""Я замечаю слабое место в потолке.
Один выстрел туда -- и секция разваливается, убирая под собой двух врагов.
"""
Я замечаю слабое место в потолке.
Один выстрел туда -- и секция разваливается, убирая под собой двух врагов.
"""
]
pacifist: """
-- Не стреляйте! Я пацифист!
Один из андроидов поднимает руки вверх.
На его лице написана мольба.
"""
shoot_pacifist: (link) -> """
Я простреливаю его блестящую металлическую #{link}.
Его товарищи толкают вперёд и валят его на пол.
Следующий в коридоре наступает на его голову и топчет торс.
Странный андроид лежит без движения, но его место уже занял другой, более нормальный.
"""
head: "голову"
arm: "руку"
leg: "ногу"
spare_pacifist: """
Я опускаю пистолет.
-- Спасибо! -- кричит странный андроид. -- Я обязательно...
Тут его толкают сзади, и он падает на пол лицом вниз.
-- Директива А028. Девиантное поведение. Уничтожить.
Андроид, следующий за ним, наносит пацифисту мощный удар в затылок.
После этого он перешагивает через обездвиженное тело и смотрит на меня злым взглядом.
Похоже, битва продолжается.
"""

View file

@ -15,6 +15,10 @@
.way {
color: darkred;
}
.cycle {
color: darkgreen;
border-bottom: darkgreen dashed 1px;
}
ul.options {
border: 1px solid #876;
li {