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 cbc60b571980729bb6b26feef2a931f337213479
parent 16635532c891ac386ff1cff77027bd441e980718
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Thu, 20 Jun 2024 22:38:11 +0200

Décompte des statuts pour player

oublie découvert via la gestion de statut no-draw de battle-trance

Diffstat:
Mbdd/cards/battle-trance | 2+-
Mutils | 8++++++++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/bdd/cards/battle-trance b/bdd/cards/battle-trance @@ -1,3 +1,3 @@ _cost 0 _draw 3 -_nodraw +_status no-draw 1 player diff --git a/utils b/utils @@ -264,6 +264,7 @@ endturn() { } _draw() { + _hasstatus player no-draw && return 0 nbtodraw="$1" for nb in $(seq "$nbtodraw");do [ "$(find fight/stack -type f | wc -l)" = "0" ] && _shufflediscard @@ -335,6 +336,13 @@ _getstatuses() { } _decreasestatuses() { + statuses=$(_getstatuses player) + if [ ! -z "$statuses" ];then + echo "$statuses" | + while read stat;do + _status "$stat" -1 player + done + fi find fight/ennemies/* -type l | while read ennemy;do statuses=$(_getstatuses "$ennemy")