fix deacoudre when +2 players win

This commit is contained in:
Mylloon 2021-07-02 03:07:05 +02:00
parent a6794b0b3d
commit 75e3b49379

View file

@ -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"