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 bf9e4fcf94eb5bb945217800dcae7227af62559a
parent 7215bcfb1e346cce8fad8c69feb4de5532416f49
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Wed, 19 Jun 2024 19:49:04 +0200

Adaptation des ennemies aux fonctions "internes"

Diffstat:
Mmakegame | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/makegame b/makegame @@ -9,7 +9,10 @@ addcard() { for i in $(seq $count $(( $count + $1 - 1)));do <<-. cat > A . ./utils - $(cat bdd/cards/$2 | sed -E '/(cost|defend)/ s/$/ player/;/attack/ s/$/ "${1:?need a target}"/' | sort) + $(cat bdd/cards/$2 | + sed -E '/(cost|defend)/ s/$/ player/; + /^attack/ s/$/ "${1:?need a target}"/; + /^(attack|defend|cost)/ s/^/_/' | sort) discard "\$0" _updatecardexecutability refreshUI @@ -22,12 +25,20 @@ addrelic() { cp bdd/relics/$1 relic/$1 } +addennemie() { + ennemie="$1" + floor="$2" + < "$1" sed -E 's/(attack|defend)/_\1/g' > map/$floor/$(basename $ennemie) +} + makemap() { for floor in $(seq 1 10);do mkdir -p map/$floor find bdd/ennemies -type f | shuf | head -n1 | - xargs -I{} cp {} map/$floor + while read en;do + addennemie "$en" "$floor" + done done } @@ -49,6 +60,6 @@ c=$(./pickrandom characters) xargs -I{} cp bdd/relics/{} relics makemap -_refreshUI _makefight map/1 +_refreshUI