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 c0ceb17a1a46ee3f3342617c29672f6613b1d010
parent 0bf22325575fdfd774f7fe317072166f96f967f2
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Thu, 20 Jun 2024 18:27:14 +0200

Implémentation cartes qui tapent plusieurs fois

Aussi gitignore ignorait relic dans bdd, comme ça c'est mieux ? (je sais
pas)

Diffstat:
M.gitignore | 2+-
Mbdd/cards/bash | 2+-
Mbdd/cards/iron-wave | 2+-
Mbdd/cards/pommel-strike | 2+-
Mbdd/cards/strike | 2+-
Abdd/cards/twin-strike | 2++
Mbdd/characters/ironclad | 2+-
Mutils | 13++++++++++++-
8 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,6 +1,6 @@ deck/ map/ -relics/ +/relics/ UI player fight/ diff --git a/bdd/cards/bash b/bdd/cards/bash @@ -1,3 +1,3 @@ _cost 2 -_attack 8 +_attack 8 1 _status vulnerable 2 diff --git a/bdd/cards/iron-wave b/bdd/cards/iron-wave @@ -1,3 +1,3 @@ _cost 1 _defend 5 -_attack 5 +_attack 5 1 diff --git a/bdd/cards/pommel-strike b/bdd/cards/pommel-strike @@ -1,3 +1,3 @@ _cost 1 -_attack 9 +_attack 9 1 _draw 1 diff --git a/bdd/cards/strike b/bdd/cards/strike @@ -1,2 +1,2 @@ _cost 1 -_attack 6 +_attack 6 1 diff --git a/bdd/cards/twin-strike b/bdd/cards/twin-strike @@ -0,0 +1,2 @@ +_cost 1 +_attack 5 2 diff --git a/bdd/characters/ironclad b/bdd/characters/ironclad @@ -2,6 +2,6 @@ maxhealth 80 health 80 block 0 energy 3 -deck strike defend bash bloodletting shrug-it-off entrench iron-wave pommel-strike battle-trance impervious +deck strike strike strike strike strike defend defend defend defend bash relic burning-blood gold 99 diff --git a/utils b/utils @@ -165,7 +165,8 @@ _status() { sed --follow-symlinks -i -E "/$stat/ s/ / $value,/" "$target" } -_attack() { +_dodamage() { + ffplay -nodisp -autoexit -loglevel panic -i sounds/hit.ogg damage="$1" target="$2" targethealth=$(_getstat "$target" health) @@ -175,7 +176,17 @@ _attack() { _setstat "$target" block "$newblock" } +_attack() { + damage="$1" + times="$2" + target="$3" + for i in $(seq $times);do + _dodamage "$damage" "$target" + done; +} + _defend() { + ffplay -nodisp -autoexit -loglevel panic -i sounds/block.ogg block="$1" target="$2" targetblock=$(_getstat "$target" block)