diff --git a/last-stand/last-stand b/last-stand/last-stand index 1859853..9f588ae 100755 --- a/last-stand/last-stand +++ b/last-stand/last-stand @@ -1,5 +1,25 @@ #!/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() { #name is first argument, voice is second. @@ -155,7 +175,7 @@ fi play_attack attackInfo $cpuPrecision bonus="$(echo "$attackInfo" | cut -d ':' -f1)" attackDirection="$(echo "$attackInfo" | cut -d ':' -f2)" -read -st $speed -n 1 -p "$attackDirection" key +read -st $speed -n 1 key case "${key^}" in "S" | "J") key="left" @@ -186,6 +206,7 @@ if [ $playerAttack -gt $cpuDefence ] ; then let cpuHitpoints-- playerSound="hit_cpu" if [ $cpuHitpoints -le 0 ] ; then +finish_cpu let level++ generate_enemy cpuInfo $level cpuName="$(echo "$cpuInfo" | cut -d ':' -f 1)" diff --git a/last-stand/names.txt b/last-stand/names.txt index 5095508..1bb3235 100644 --- a/last-stand/names.txt +++ b/last-stand/names.txt @@ -1,2 +1,8 @@ +johnathan Jorgan -Mat +Martin +Mathew +Peter +Stephen +Victor +William diff --git a/last-stand/sounds/breaker.ogg b/last-stand/sounds/breaker.ogg new file mode 100644 index 0000000..a491b02 Binary files /dev/null and b/last-stand/sounds/breaker.ogg differ diff --git a/last-stand/sounds/chopper.ogg b/last-stand/sounds/chopper.ogg new file mode 100644 index 0000000..3ed441e Binary files /dev/null and b/last-stand/sounds/chopper.ogg differ diff --git a/last-stand/sounds/cpu_fall.ogg b/last-stand/sounds/cpu_fall.ogg new file mode 100644 index 0000000..5e73605 Binary files /dev/null and b/last-stand/sounds/cpu_fall.ogg differ diff --git a/last-stand/sounds/finish_cpu.ogg b/last-stand/sounds/finish_cpu.ogg new file mode 100644 index 0000000..a4ed974 Binary files /dev/null and b/last-stand/sounds/finish_cpu.ogg differ diff --git a/last-stand/sounds/king_of_the_hill.ogg b/last-stand/sounds/king_of_the_hill.ogg new file mode 100644 index 0000000..daba540 Binary files /dev/null and b/last-stand/sounds/king_of_the_hill.ogg differ