More work on Last Stand
This commit is contained in:
parent
7601daf557
commit
2dac410117
@ -1,5 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
finish_cpu()
|
||||||
|
{
|
||||||
|
play -qV0 sounds/finish_cpu.ogg&
|
||||||
|
local key=""
|
||||||
|
local sound=cpu_fall
|
||||||
|
read -sn 4 -t 3 key
|
||||||
|
case "$key" in
|
||||||
|
"jiki" | "sede")
|
||||||
|
local sound="chopper"
|
||||||
|
;;
|
||||||
|
"kijl" | "desf")
|
||||||
|
local sound="breaker"
|
||||||
|
;;
|
||||||
|
"kkik" | "dded")
|
||||||
|
local sound="king_of_the_hill"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
play -qV0 sounds/$sound.ogg
|
||||||
|
}
|
||||||
|
|
||||||
speak_verses()
|
speak_verses()
|
||||||
{
|
{
|
||||||
#name is first argument, voice is second.
|
#name is first argument, voice is second.
|
||||||
@ -155,7 +175,7 @@ fi
|
|||||||
play_attack attackInfo $cpuPrecision
|
play_attack attackInfo $cpuPrecision
|
||||||
bonus="$(echo "$attackInfo" | cut -d ':' -f1)"
|
bonus="$(echo "$attackInfo" | cut -d ':' -f1)"
|
||||||
attackDirection="$(echo "$attackInfo" | cut -d ':' -f2)"
|
attackDirection="$(echo "$attackInfo" | cut -d ':' -f2)"
|
||||||
read -st $speed -n 1 -p "$attackDirection" key
|
read -st $speed -n 1 key
|
||||||
case "${key^}" in
|
case "${key^}" in
|
||||||
"S" | "J")
|
"S" | "J")
|
||||||
key="left"
|
key="left"
|
||||||
@ -186,6 +206,7 @@ if [ $playerAttack -gt $cpuDefence ] ; then
|
|||||||
let cpuHitpoints--
|
let cpuHitpoints--
|
||||||
playerSound="hit_cpu"
|
playerSound="hit_cpu"
|
||||||
if [ $cpuHitpoints -le 0 ] ; then
|
if [ $cpuHitpoints -le 0 ] ; then
|
||||||
|
finish_cpu
|
||||||
let level++
|
let level++
|
||||||
generate_enemy cpuInfo $level
|
generate_enemy cpuInfo $level
|
||||||
cpuName="$(echo "$cpuInfo" | cut -d ':' -f 1)"
|
cpuName="$(echo "$cpuInfo" | cut -d ':' -f 1)"
|
||||||
|
@ -1,2 +1,8 @@
|
|||||||
|
johnathan
|
||||||
Jorgan
|
Jorgan
|
||||||
Mat
|
Martin
|
||||||
|
Mathew
|
||||||
|
Peter
|
||||||
|
Stephen
|
||||||
|
Victor
|
||||||
|
William
|
||||||
|
BIN
last-stand/sounds/breaker.ogg
Normal file
BIN
last-stand/sounds/breaker.ogg
Normal file
Binary file not shown.
BIN
last-stand/sounds/chopper.ogg
Normal file
BIN
last-stand/sounds/chopper.ogg
Normal file
Binary file not shown.
BIN
last-stand/sounds/cpu_fall.ogg
Normal file
BIN
last-stand/sounds/cpu_fall.ogg
Normal file
Binary file not shown.
BIN
last-stand/sounds/finish_cpu.ogg
Normal file
BIN
last-stand/sounds/finish_cpu.ogg
Normal file
Binary file not shown.
BIN
last-stand/sounds/king_of_the_hill.ogg
Normal file
BIN
last-stand/sounds/king_of_the_hill.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user