1
0

fix double kill on an already death player

This commit is contained in:
andrea
2025-08-02 00:07:22 +02:00
parent 171b9fe787
commit 7f36158c40

View File

@@ -53,7 +53,7 @@ def _random_action(Arena, Player_one):
# so Player_two is no more random, but will be a random near player
preys= avail_actions[1]
Player_two= _rand.sample(preys, 1)[0]
while Player_one.get_id() == Player_two.get_id():
while Player_one.get_id() == Player_two.get_id() and not Player_two.is_alive():
Player_two= _rand.sample(preys, 1)[0]
_dmg, msg= Player_one.attack(Player_two)
elif 2 in avail_actions: