Une version rudimentaire de Slay The Spire dans le terminal - retour accueil
git clone git://bebou.netlib.re/sts-term
Log | Files | Refs |
commit 2023e99ba161c5d5f8f905066d153a92f7b9425a parent d8c3c439a1003f7c8bd5df8c9c000e4457394917 Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Wed, 19 Jun 2024 16:10:55 +0200 grisage des cartes injouables faute d'nrj Diffstat:
M | utils | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/utils b/utils @@ -7,12 +7,23 @@ showstat() { grep "$stat" "$target" | sed 's/\t/ : /' } +grayed="\x1b[90m" +norm="\x1b[0m" + makeui() { [ ! -e "player" ] && { printf "player doesn't exist\n"; exit 1; } + + grep cost hand/* | + awk "\$2>$currentenergy{print}" | + cut -d':' -f1 | xargs -n1 basename > $tmpdir/nonexeccards tree --noreport stack > $tmpdir/stack tree --noreport hand > $tmpdir/hand tree --noreport discard > $tmpdir/discard + while read card;do + sed -i -E "/$card/ s/^/$grayed/;/$card/ s/$/$norm/" $tmpdir/hand + done < $tmpdir/nonexeccards + <<-. cat > $tmpdir/player Player