More work on Last Stand

This commit is contained in:
Storm Dragon 2014-05-09 08:12:24 -04:00
parent 7601daf557
commit 2dac410117
7 changed files with 29 additions and 2 deletions

View File

@ -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)"

View File

@ -1,2 +1,8 @@
johnathan
Jorgan Jorgan
Mat Martin
Mathew
Peter
Stephen
Victor
William

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.