Merge pull request 'bug solved in event picker' (#6) from green/battle_royale_sim:master into master
Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
@@ -12,7 +12,7 @@ EVENTS = [
|
||||
'affected_players' : 1,
|
||||
},
|
||||
{
|
||||
'id' : 'BOMB_EXPLOSION'
|
||||
'id' : 'BOMB_EXPLOSION',
|
||||
'text' : '{Player1} ha attacato {player2}',
|
||||
'resolve_text' : '{Player1} ha causato {effetto_collaterale}',
|
||||
'fail_text' : '{Player1} ha fallito, {player2} è indenne',
|
||||
|
||||
@@ -11,7 +11,7 @@ class ArenaEventPicker():
|
||||
the_player = _random.choice(self.players)
|
||||
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)
|
||||
|
||||
@@ -42,16 +42,16 @@ class ArenaEventPicker():
|
||||
|
||||
if requirements.get(check) and check == 'status':
|
||||
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)
|
||||
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)
|
||||
|
||||
if requirements.get(check) and check == '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)
|
||||
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)
|
||||
|
||||
if check == 'affected_players':
|
||||
|
||||
Reference in New Issue
Block a user