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 f75930842ac8a67f7eec68124a875f150c78e347 parent ed2270a2484112c4d9455820a75e53ad3c57ad7d Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 20 Jun 2024 15:36:20 +0200 On gagne de l'argent à la fin du tour on retire addcard de makegame Diffstat:
M | makegame | | | 17 | ----------------- |
M | utils | | | 6 | ++++++ |
2 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/makegame b/makegame @@ -9,23 +9,6 @@ pickrandom() { head -n1 } -addcard() { - nbcard=$(find deck -name "$2-*" | wc -l) - [ "$nbcard" = '0' ] && count=1 || count=$nbcard - 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}"/; - /^(attack|defend|cost|status|draw)/ s/^/_/' | sort) - _discard "\$0" - _refreshUI - . - mv A deck/$2-$i - done -} - addrelic() { cp bdd/relics/$1 relic/$1 } diff --git a/utils b/utils @@ -94,10 +94,16 @@ _hasrelic() { return $([ -e "relics/$1" ]) } +_wingold() { + currentgold=$(grep gold player | cut -f2) + _setstat player gold "$(( $currentgold + $(seq 10 20 | shuf | head -n1) ))" +} + _killennemie() { rm -rf "$(readlink -e $target)" if [ $(find fight/ennemies -type f | wc -l) = '0' ];then _hasrelic burning-blood && _heal 6 + _wingold _choosecard _makefight map/$(( $(cat fight/floor) + 1 )) exit 0