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 c4c2eb29429e9e423e686a4b09dd59a2f4ecd7b0
parent 61c848e584cb64890047e60decc5ba92915f71ac
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Fri, 21 Jun 2024 19:43:09 +0200

Ajout rage

Encore ces histoire de scope de variables qui me forcent à bouger les
décla des variables d'endroit, nul
TODO regarder ça de plus près

Diffstat:
Abdd/cards/rage | 2++
Mutils | 9++++-----
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/bdd/cards/rage b/bdd/cards/rage @@ -0,0 +1,2 @@ +_cost 0 +_status rage 3 player diff --git a/utils b/utils @@ -201,11 +201,9 @@ _dodamage() { } _attack() { - damage="$1" - times="$2" - target="$3" - hitter="$4" - card="$5" + _hasstatus player rage && + _changestat player block "+$(_getremainingstatusturns player rage)" + damage="$1";times="$2";target="$3";hitter="$4";card="$5" for i in $(seq $times);do echo _dodamage "$damage" "$target" "$hitter" _dodamage "$damage" "$target" "$hitter" "$card" @@ -288,6 +286,7 @@ endturn() { _removestatus player strength-down; } _decreasestatuses _removestatus player flame-barrier + _removestatus player rage _nextmove _newhand echo "$(( $(cat fight/turn) + 1 ))" > fight/turn