diff --git a/deacoudre.sk b/deacoudre.sk index b110850..a1e1e79 100644 --- a/deacoudre.sk +++ b/deacoudre.sk @@ -113,16 +113,15 @@ on death: set {thimble.dead.%uuid of player%} to true set {_finPartie} to 0 loop {party.list::*}: - if {thimble.dead.%uuid of loop-value%} is not set: - set {_gagnant} to userOrNick(loop-value) - add 1 to {_finPartie} - else: + if {thimble.dead.%uuid of loop-value%} is true: set {_player} to userOrNick(loop-value) annonceParty("&c%{_player}%&b a été éliminé !") - if {_finPartie} is 1 or 0: - loop {party.list::*}: - if {_gagnant} is set: - send "&a&l%{_gagnant}%&r&l a gagné la partie !!" to loop-value - else: - send "&cTu étais tout seul à jouer... bravo quand même ?" to loop-value + else: + set {_gagnant} to userOrNick(loop-value) + add 1 to {_finPartie} + if {_finPartie} <= 1: # 1 ou 0 + if {_gagnant} is set: + annonceParty("&a&l%{_gagnant}%&r&l a gagné la partie !!") + else: + send "&cTu étais tout seul à jouer... bravo quand même ?" execute player command "deacoudre"