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 c17565d543be9619ddb5e4889eb60e8e862780b1 parent b0b00908496d634e1b0f41a1bbf999b0a553859e Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Sun, 23 Jun 2024 17:50:35 +0200 Ajout des cartes améliorées Et aussi wild strike que j'avais oublié Liste des soucis : pas de gestion d'innate Les cartes suivantes nécessitent de changer la logique dans utils pour que leurs versions + fassent effet : combust change rien à la carte feed +maxhp heavy blade rupture sentinel manque toujours searing blow ajout En réalité y'a certaines cartes que j'ai peut-être pas bein implémenté Par exemple combust met un statuts "combust" à 1 Si on rejoue combust ça passe à deux et tous les effets sont multipliés Sauf que la version + change la quantité de dégâts et pas le multiplicateur Cette quantité devrait probablement apparaître sur la carte Peut-être une variable combustdamage=5 combustdamage=7 (dans la version +) qui est ensuite utilisée dans utils ? Pareil pour le max hp de feed par ex bref des questions des questions TODO Diffstat:
74 files changed, 345 insertions(+), 0 deletions(-)
diff --git a/bdd/cards/red/anger+ b/bdd/cards/red/anger+ @@ -0,0 +1,4 @@ +attack +_cost 0 +_attack 8 1 +_addcard 1 anger fight/discard diff --git a/bdd/cards/red/barricade+ b/bdd/cards/red/barricade+ @@ -0,0 +1,3 @@ +power +_cost 2 +_status barricade 1 player diff --git a/bdd/cards/red/bash+ b/bdd/cards/red/bash+ @@ -0,0 +1,4 @@ +attack +_cost 2 +_attack 10 1 +_status vulnerable 3 diff --git a/bdd/cards/red/battle-trance+ b/bdd/cards/red/battle-trance+ @@ -0,0 +1,4 @@ +skill +_cost 0 +_draw 4 +_status no-draw 1 player diff --git a/bdd/cards/red/berserk+ b/bdd/cards/red/berserk+ @@ -0,0 +1,4 @@ +power +_cost 0 +_status vulnerable 1 player +_status berserk 1 player diff --git a/bdd/cards/red/blood-for-blood+ b/bdd/cards/red/blood-for-blood+ @@ -0,0 +1,3 @@ +attack +_cost 3 +_attack 22 1 diff --git a/bdd/cards/red/bloodletting+ b/bdd/cards/red/bloodletting+ @@ -0,0 +1,4 @@ +skill +_cost 0 +_heal -3 +_changestat player energy +3 diff --git a/bdd/cards/red/bludgeon+ b/bdd/cards/red/bludgeon+ @@ -0,0 +1,3 @@ +attack +_cost 3 +_attack 42 1 diff --git a/bdd/cards/red/body-slam+ b/bdd/cards/red/body-slam+ @@ -0,0 +1,4 @@ +attack +_cost 0 +curblock=$(_getstat player block) +_attack $curblock 1 diff --git a/bdd/cards/red/brutality+ b/bdd/cards/red/brutality+ @@ -0,0 +1,4 @@ +power +innate +_cost 0 +_status brutality 1 player diff --git a/bdd/cards/red/burning-pact+ b/bdd/cards/red/burning-pact+ @@ -0,0 +1,7 @@ +skill +_cost 1 +find fight/hand -type f | + grep -v "$0" | + fzy | + while read card;do _exhaust $card; done +_draw 3 diff --git a/bdd/cards/red/carnage+ b/bdd/cards/red/carnage+ @@ -0,0 +1,4 @@ +attack +_cost 2 +_attack 28 1 +ethereal diff --git a/bdd/cards/red/clash+ b/bdd/cards/red/clash+ @@ -0,0 +1,3 @@ +attack +_cost 0 +_attack 18 1 diff --git a/bdd/cards/red/cleave+ b/bdd/cards/red/cleave+ @@ -0,0 +1,3 @@ +attack +_cost 1 +_attack 11 1 all diff --git a/bdd/cards/red/clothesline+ b/bdd/cards/red/clothesline+ @@ -0,0 +1,4 @@ +attack +_cost 2 +_attack 14 1 +_status weak 3 diff --git a/bdd/cards/red/combust+ b/bdd/cards/red/combust+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status combust 1 player diff --git a/bdd/cards/red/corruption+ b/bdd/cards/red/corruption+ @@ -0,0 +1,3 @@ +power +_cost 2 +_status corruption 1 player diff --git a/bdd/cards/red/dark-embrace+ b/bdd/cards/red/dark-embrace+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status dark-embrace 1 player diff --git a/bdd/cards/red/defend+ b/bdd/cards/red/defend+ @@ -0,0 +1,3 @@ +skill +_cost 1 +_defend 8 diff --git a/bdd/cards/red/demon-form+ b/bdd/cards/red/demon-form+ @@ -0,0 +1,3 @@ +power +_cost 3 +_status demon-form 3 player diff --git a/bdd/cards/red/disarm+ b/bdd/cards/red/disarm+ @@ -0,0 +1,4 @@ +skill +_cost 1 +_strength -3 ${1:-need target} +_exhaust diff --git a/bdd/cards/red/double-tap+ b/bdd/cards/red/double-tap+ @@ -0,0 +1,3 @@ +skill +_cost 1 +_status double-tap 2 player diff --git a/bdd/cards/red/dropkick+ b/bdd/cards/red/dropkick+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_attack 8 1 +_hasstatus "$1" vulnerable && { _changestat player energy +1 ; _draw 1; } diff --git a/bdd/cards/red/dual-weild+ b/bdd/cards/red/dual-weild+ @@ -0,0 +1,8 @@ +skill +_cost 1 +grep -EHr "^(attack|power)" fight | + cut -d: -f1 | + fzy | + while read card;do + _dupcard 2 "$card" fight/hand + done diff --git a/bdd/cards/red/entrench+ b/bdd/cards/red/entrench+ @@ -0,0 +1,3 @@ +skill +_cost 1 +_changestat player block *2 diff --git a/bdd/cards/red/evolve+ b/bdd/cards/red/evolve+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status evolve 2 player diff --git a/bdd/cards/red/exhume+ b/bdd/cards/red/exhume+ @@ -0,0 +1,9 @@ +skill +_cost 0 +find fight/exhaust -type f | + fzy | + while read card;do + mv $card fight/hand + done +_exhaust + diff --git a/bdd/cards/red/feed+ b/bdd/cards/red/feed+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_attack 12 1 +_exhaust diff --git a/bdd/cards/red/feel-no-pain+ b/bdd/cards/red/feel-no-pain+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status feel-no-pain 4 player diff --git a/bdd/cards/red/fiend-fire+ b/bdd/cards/red/fiend-fire+ @@ -0,0 +1,12 @@ +attack +_cost 2 +cards=$(find fight/hand -type f | grep -v "$0") +nbcards=$(echo "$cards" | wc -l) +echo "$cards" | + while read card;do + _exhaust "$card" + done +for i in $(seq $nbcards);do + _attack 10 1 +done +_exhaust diff --git a/bdd/cards/red/fire-breathing+ b/bdd/cards/red/fire-breathing+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status fire-breathing 10 player diff --git a/bdd/cards/red/flame-barrier+ b/bdd/cards/red/flame-barrier+ @@ -0,0 +1,4 @@ +skill +_cost 2 +_defend 16 +_status flame-barrier 6 player diff --git a/bdd/cards/red/flex+ b/bdd/cards/red/flex+ @@ -0,0 +1,4 @@ +skill +_cost 0 +_strength 4 player +_status strength-down 4 player diff --git a/bdd/cards/red/ghostly-armor+ b/bdd/cards/red/ghostly-armor+ @@ -0,0 +1,4 @@ +skill +_cost 1 +_defend 13 +ethereal diff --git a/bdd/cards/red/havoc+ b/bdd/cards/red/havoc+ @@ -0,0 +1,17 @@ +skill +_cost 0 +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/bdd/cards/red/headbutt+ b/bdd/cards/red/headbutt+ @@ -0,0 +1,9 @@ +attack +_cost 1 +_attack 12 1 +find fight/discard -type f | + fzy | + xargs -r -n1 basename | + while read card;do + mv fight/discard/$card fight/stack/$card + done diff --git a/bdd/cards/red/heavy-blade+ b/bdd/cards/red/heavy-blade+ @@ -0,0 +1,3 @@ +attack +_cost 2 +_attack 14 1 diff --git a/bdd/cards/red/homokinesis+ b/bdd/cards/red/homokinesis+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_heal -2 +_attack 20 1 diff --git a/bdd/cards/red/immolate+ b/bdd/cards/red/immolate+ @@ -0,0 +1,4 @@ +attack +_cost 2 +_attack 28 1 all +_addcard 1 burn fight/discard diff --git a/bdd/cards/red/impervious+ b/bdd/cards/red/impervious+ @@ -0,0 +1,4 @@ +skill +_cost 2 +_defend 40 +_exhaust diff --git a/bdd/cards/red/infernal-blade+ b/bdd/cards/red/infernal-blade+ @@ -0,0 +1,13 @@ +skill +_cost 0 +find bdd/cards/red -type f | shuf | head -n1 | + while read card;do + n=$(basename "$card") + c=$(grep -E '^_cost' $card | cut -d ' ' -f2) + _addcard 1 $n fight/hand + v=$(find fight/hand -name "$n-*" | sort -r | head -n1) + sed -i -E '/^_cost/ s/[0-9]/0/' "$v" + sed -i -E "$ a\sed -i -E '/^_cost/ s/[0-9]/$c/' fight/discard/$(basename $v)" "$v" + sed -i -E "$ a\sed -i -E '/_refreshUI/ {n;N;d}' fight/discard/$(basename $v)" "$v" + done +_exhaust diff --git a/bdd/cards/red/inflame+ b/bdd/cards/red/inflame+ @@ -0,0 +1,3 @@ +power +_cost 1 +_strength 3 player diff --git a/bdd/cards/red/intimidate+ b/bdd/cards/red/intimidate+ @@ -0,0 +1,4 @@ +skill +_cost 0 +_status weak 2 all +_exhaust diff --git a/bdd/cards/red/iron-wave+ b/bdd/cards/red/iron-wave+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_attack 7 1 +_defend 7 diff --git a/bdd/cards/red/juggernaut+ b/bdd/cards/red/juggernaut+ @@ -0,0 +1,3 @@ +power +_cost 2 +_status juggernaut 7 player diff --git a/bdd/cards/red/limit-break+ b/bdd/cards/red/limit-break+ @@ -0,0 +1,4 @@ +skill +_cost 1 +cs=$(_getremainingstatusturns player strength) +_strength $cs player diff --git a/bdd/cards/red/metallicize+ b/bdd/cards/red/metallicize+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status metallicize 4 player diff --git a/bdd/cards/red/offering+ b/bdd/cards/red/offering+ @@ -0,0 +1,6 @@ +skill +_cost 0 +_heal -6 +_changestat player energy +2 +_draw 5 +_exhaust diff --git a/bdd/cards/red/perfected-strike+ b/bdd/cards/red/perfected-strike+ @@ -0,0 +1,3 @@ +attack +_cost 2 +_attack $(( 6 + 3*$(find deck -name '*strike*' -and -not -name '*.swp*' | wc -l) )) 1 diff --git a/bdd/cards/red/pommel-strike+ b/bdd/cards/red/pommel-strike+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_attack 10 1 +_draw 2 diff --git a/bdd/cards/red/power-through+ b/bdd/cards/red/power-through+ @@ -0,0 +1,4 @@ +skill +_cost 1 +_defend 20 +_addcard 2 wounds fight/hand diff --git a/bdd/cards/red/pummel+ b/bdd/cards/red/pummel+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_attack 2 5 +_exhaust diff --git a/bdd/cards/red/rage+ b/bdd/cards/red/rage+ @@ -0,0 +1,3 @@ +skill +_cost 0 +_status rage 5 player diff --git a/bdd/cards/red/rampage+ b/bdd/cards/red/rampage+ @@ -0,0 +1,5 @@ +attack +_cost 1 +_attack 8 1 +curatt=$(grep -E "^_attack" "$0" | cut -d' ' -f2) +sed -i -E "/^_attack/ s/[0-9]/$(( $curatt + 8 ))/" "$0" diff --git a/bdd/cards/red/reaper+ b/bdd/cards/red/reaper+ @@ -0,0 +1,4 @@ +attack +_cost 2 +_attack 5 1 all +_exhaust diff --git a/bdd/cards/red/reckless-charge+ b/bdd/cards/red/reckless-charge+ @@ -0,0 +1,4 @@ +attack +_cost 0 +_attack 10 1 +_addcard 1 dazed fight/stack diff --git a/bdd/cards/red/rupture+ b/bdd/cards/red/rupture+ @@ -0,0 +1,3 @@ +power +_cost 1 +_status rupture 1 player diff --git a/bdd/cards/red/second-wind+ b/bdd/cards/red/second-wind+ @@ -0,0 +1,8 @@ +skill +_cost 1 +grep -ErH "^(skill|power|status|curse)" fight | + cut -d: -f1 | + while read card;do + _exhaust $card + _defend 7 player + done diff --git a/bdd/cards/red/seeing-red+ b/bdd/cards/red/seeing-red+ @@ -0,0 +1,4 @@ +skill +_cost 0 +_changestat player energy +2 +_exhaust diff --git a/bdd/cards/red/sentinel+ b/bdd/cards/red/sentinel+ @@ -0,0 +1,3 @@ +skill +_cost 1 +_defend 8 diff --git a/bdd/cards/red/sever-soul+ b/bdd/cards/red/sever-soul+ @@ -0,0 +1,8 @@ +attack +_cost 2 +grep -rHE "^(skill|power|curses|statuses)" fight/hand | + cut -d':' -f1 | + while read card;do + _exhaust $card + done +_attack 22 1 diff --git a/bdd/cards/red/shockwave+ b/bdd/cards/red/shockwave+ @@ -0,0 +1,5 @@ +skill +_cost 2 +_status weak 5 all +_status vulnerable 5 all +_exhaust diff --git a/bdd/cards/red/shrug-it-off+ b/bdd/cards/red/shrug-it-off+ @@ -0,0 +1,4 @@ +skill +_cost 1 +_defend 11 +_draw 1 diff --git a/bdd/cards/red/spot-weakness+ b/bdd/cards/red/spot-weakness+ @@ -0,0 +1,4 @@ +skill +_cost 1 +grep -q "attack" $tmpdir/nextmove && + _strength 4 player diff --git a/bdd/cards/red/strike+ b/bdd/cards/red/strike+ @@ -0,0 +1,3 @@ +attack +_cost 1 +_attack 9 1 diff --git a/bdd/cards/red/sword-boomerang+ b/bdd/cards/red/sword-boomerang+ @@ -0,0 +1,10 @@ +attack +_cost 1 +t=$(find fight/ennemies -type l | shuf | head -n1) +_attack 3 1 $t player $0 +t=$(find fight/ennemies -type l | shuf | head -n1) +_attack 3 1 $t player $0 +t=$(find fight/ennemies -type l | shuf | head -n1) +_attack 3 1 $t player $0 +t=$(find fight/ennemies -type l | shuf | head -n1) +_attack 3 1 $t player $0 diff --git a/bdd/cards/red/thunderclap+ b/bdd/cards/red/thunderclap+ @@ -0,0 +1,4 @@ +attack +_cost 1 +_attack 7 1 all +_status vulnerable 1 all diff --git a/bdd/cards/red/true-grit+ b/bdd/cards/red/true-grit+ @@ -0,0 +1,6 @@ +skill +_cost 1 +_defend 9 +find fight/hand -type f | + fzy | + while read card;do _exhaust "$card"; done diff --git a/bdd/cards/red/twin-strike+ b/bdd/cards/red/twin-strike+ @@ -0,0 +1,3 @@ +attack +_cost 1 +_attack 7 2 diff --git a/bdd/cards/red/uppercut+ b/bdd/cards/red/uppercut+ @@ -0,0 +1,5 @@ +attack +_cost 2 +_attack 13 1 +_status vulnerable 2 +_status weak 2 diff --git a/bdd/cards/red/warcry+ b/bdd/cards/red/warcry+ @@ -0,0 +1,12 @@ +skill +_cost 0 +_draw 2 +_refreshUI +find fight/hand -type f | + grep -Ev "$0" | + fzy | + xargs -r -n1 basename | + while read card;do + mv fight/hand/$card fight/stack/ + done +_exhaust diff --git a/bdd/cards/red/whirlwind+ b/bdd/cards/red/whirlwind+ @@ -0,0 +1,4 @@ +attack +nrj=$(_getstat player energy) +_cost $nrj +_attack 8 $nrj all diff --git a/bdd/cards/red/wild-strike b/bdd/cards/red/wild-strike @@ -0,0 +1,3 @@ +attack +_attack 12 1 +_addcard 1 wound fight/stack diff --git a/bdd/cards/red/wild-strike+ b/bdd/cards/red/wild-strike+ @@ -0,0 +1,3 @@ +attack +_attack 17 1 +_addcard 1 wound fight/stack