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 6e5fc759ec0736924df769f074970ed98411a79b parent ce9235fa27ac2fb574cf64afe984a71e44fcf48a Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Sat, 22 Jun 2024 22:22:55 +0200 Ajout fire-breathing Diffstat:
A | bdd/cards/red/fire-breathing | | | 3 | +++ |
M | utils | | | 11 | +++++++---- |
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/bdd/cards/red/fire-breathing b/bdd/cards/red/fire-breathing @@ -0,0 +1,3 @@ +power +_cost 1 +_status fire-breathing 6 player diff --git a/utils b/utils @@ -436,10 +436,13 @@ _draw() { [ "$(find fight/stack -type f | wc -l)" = "0" ] && _shufflediscard card=$(find fight/stack -type f | shuf | head -n 1) chmod +x "$card" - echo mv "$card" fight/hand - isstatus=$(grep "^status" "$card") + cardtype=$(sed -n '2 p' "$card") + echo mv "$card" fight/hand of type $cardtype mv "$card" fight/hand - _hasstatus player evolve && [ ! -z "$isstatus" ] && + _hasstatus player fire-breathing && [ "$cardtype" = "status" -o "$cardtype" = "curse" ] && { + v=$(_getremainingstatusturns player fire-breathing); + for i in $(find fight/ennemies -type l);do _dodamage $v $i player;done ;} + _hasstatus player evolve && [ "$cardtype" = "$status" ] && _draw 1 done } @@ -504,7 +507,7 @@ _getstatuses() { grep -E '^(de)?bufs ' "$target" | cut -f2- | tr ' ' '\n' | - grep -Ev '(strength|dark-embrace|feel-no-pain|metallicize|rupture|barricade|berserk|brutality|demon-form|juggernaut|combust|corruption|evolve)' | + grep -Ev '(strength|dark-embrace|feel-no-pain|metallicize|rupture|barricade|berserk|brutality|demon-form|juggernaut|combust|corruption|evolve|fire-breathing)' | cut -d',' -f1 }