From 75e3b49379769b984577ebd48c6310536dbaa7ca Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 2 Jul 2021 03:07:05 +0200 Subject: [PATCH] fix deacoudre when +2 players win --- deacoudre.sk | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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"