fix bug where a death player is killed multiple time during the same day
This commit is contained in:
6
debug.py
6
debug.py
@@ -48,10 +48,10 @@ def play_one_day_debug(Arena):
|
||||
daily_events= []
|
||||
_rand.shuffle(alive_players)
|
||||
for p_one in alive_players:
|
||||
if not p_one.is_alive(): continue #he could be dead during this day cycle
|
||||
p_two= _rand.sample(alive_players, 1)[0]
|
||||
if not p_one.is_alive(): continue # he could be dead during this day cycle
|
||||
p_two= _rand.sample(Arena.get_alive_players(), 1)[0]
|
||||
while p_one.get_id() == p_two.get_id():
|
||||
p_two= _rand.sample(alive_players, 1)[0]
|
||||
p_two= _rand.sample(Arena.get_alive_players(), 1)[0]
|
||||
_dmg, msg= p_one.attack(p_two)
|
||||
daily_events.append(msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user