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 855b695f29a8df572a8494619b83a56cb333dea2
parent e25ac1bd76d2cd2d4128e3a67eef25f40568dc10
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Sat, 22 Jun 2024 19:02:27 +0200

Ajout havoc

Mais pas fini parce qu'on a pas d'ordre de carte dans la pioche pour le
moment
Revenir dessus quand c'est le cas TODO

Diffstat:
Abdd/cards/havoc | 16++++++++++++++++
Mutils | 1+
2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/bdd/cards/havoc b/bdd/cards/havoc @@ -0,0 +1,16 @@ +_cost 1 +if [ ! $(find fight/stack -type f | wc -l) = "0" ];then + find fight/stack -type f | shuf | head -n1 | + while read card;do + n=$(basename "$card") + e=$(find fight/ennemies -type l | shuf | head -n1) + sed '/^_cost/ s/[0-9]/0/' + chmod +x "$card" + echo "playing $n on $e" + eval $card $e + _exhaust fight/discard/$n + done +else + echo "no card in stack to play" + exit 0 +fi diff --git a/utils b/utils @@ -149,6 +149,7 @@ _exhaust() { _changestat player energy +2 _hasstatus player dark-embrace && _draw 1 _hasstatus player feel-no-pain && { echo "gaining block from feel no pain"; _defend $(_getremainingstatusturns player feel-no-pain) player; } + echo mv "$card" fight/exhaust mv "$card" fight/exhaust }