1
0

Merge pull request 'bug solved in event picker' (#6) from green/battle_royale_sim:master into master

Reviewed-on: Cryz/battle_royale_sim#6
This commit is contained in:
2025-08-11 22:14:05 +02:00
2 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ EVENTS = [
'affected_players' : 1, 'affected_players' : 1,
}, },
{ {
'id' : 'BOMB_EXPLOSION' 'id' : 'BOMB_EXPLOSION',
'text' : '{Player1} ha attacato {player2}', 'text' : '{Player1} ha attacato {player2}',
'resolve_text' : '{Player1} ha causato {effetto_collaterale}', 'resolve_text' : '{Player1} ha causato {effetto_collaterale}',
'fail_text' : '{Player1} ha fallito, {player2} è indenne', 'fail_text' : '{Player1} ha fallito, {player2} è indenne',

View File

@@ -11,7 +11,7 @@ class ArenaEventPicker():
the_player = _random.choice(self.players) the_player = _random.choice(self.players)
the_player_id = the_player.get('id') the_player_id = the_player.get('id')
self.players = list(filter(lambda x : x.get('id') != the_player_id) self.players = list(filter(lambda x : x.get('id') != the_player_id))
self.already_picked_players.append(the_player) self.already_picked_players.append(the_player)
@@ -42,16 +42,16 @@ class ArenaEventPicker():
if requirements.get(check) and check == 'status': if requirements.get(check) and check == 'status':
needed_health = requirements.get('check') needed_health = requirements.get('check')
if '>' in requirements.get(check) and requirements.get(check) > in needed_health: if '>' in requirements.get(check) and requirements.get(check) > needed_health:
elegible_events.append(event) elegible_events.append(event)
if '<' in requirements.get(check) and requirements.get(check) < in needed_health: if '<' in requirements.get(check) and requirements.get(check) < needed_health:
elegible_events.append(event) elegible_events.append(event)
if requirements.get(check) and check == 'reputation': if requirements.get(check) and check == 'reputation':
needed_reputation = requirements.get('reputation') needed_reputation = requirements.get('reputation')
if '>' in requirements.get(check) and requirements.get(check) > in needed_reputation: if '>' in requirements.get(check) and requirements.get(check) > needed_reputation:
elegible_events.append(event) elegible_events.append(event)
if '<' in requirements.get(check) and requirements.get(check) < in needed_reputation: if '<' in requirements.get(check) and requirements.get(check) < needed_reputation:
elegible_events.append(event) elegible_events.append(event)
if check == 'affected_players': if check == 'affected_players':