sts-term

Une version rudimentaire de Slay The Spire dans le terminal - retour accueil

git clone git://bebou.netlib.re/sts-term
Log | Files | Refs | README |

commit 0bf22325575fdfd774f7fe317072166f96f967f2
parent 51b00988e03c6f6a8bda934b5a6f13dd538528b8
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Thu, 20 Jun 2024 18:11:36 +0200

Ajout d'un mode "test"

En mode test on ajoute une de chaque carte
En mode pas test on ajoute le deck normal
Ne se substitue pas à de vrais test mais j'ai la flemme de les faire

Diffstat:
Mmakegame | 25++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/makegame b/makegame @@ -34,15 +34,22 @@ mkdir -p deck relics c=$(pickrandom characters) < $c grep -Ev "(deck|relic)" > player -< $c grep deck | - cut -f2- | - tr ' ' '\n' | - uniq -c | - while read line;do - nb=$(echo "$line" | cut -d ' ' -f1) - cardtype=$(echo "$line" | cut -d ' ' -f2) - _addcard "$nb" "$cardtype" - done +if [ "$1" = "test" ];then + find bdd/cards -type f | + while read card;do + _addcard 1 "$(basename $card)" + done +else + < $c grep deck | + cut -f2- | + tr ' ' '\n' | + uniq -c | + while read line;do + nb=$(echo "$line" | cut -d ' ' -f1) + cardtype=$(echo "$line" | cut -d ' ' -f2) + _addcard "$nb" "$cardtype" + done +fi < $c grep relic | cut -f2- | xargs -I{} cp bdd/relics/{} relics