On ne tranche pas les Metzthernets.

This commit is contained in:
Klafyvel 2018-01-13 13:27:27 +01:00 committed by root
parent 889fa1020e
commit 79191a406e
2 changed files with 19 additions and 15 deletions

View file

@ -176,22 +176,26 @@ def cheat(player_id, target_id):
success = random.choice([True, False])
with open(IMMUNITY_FILE, 'r') as f:
immunity = f.read()
try:
ok = [line.strip().partition(' ') for line in immunity]
ok = [get_player_from_full_name(names[0], names[2])['id'] for names in ok]
ko = [line.strip().partition(' ') for line in ASSHOLES]
ko = [get_player_from_full_name(names[0], names[2])['id'] for names in ko]
with open(ASSHOLES_FILE, 'r') as f:
assholes = f.read()
ok = [line.split(' ') for line in immunity.split('\n') if line]
ok = [get_player_from_full_name(names[0], names[1])['id'] for names in ok]
ko_names = [line.split(' ') for line in assholes.split('\n') if line]
ko = []
for names in ko_names:
p = get_player_from_full_name(names[0], names[1])
if p:
ko.append(p['id'])
if target_id in ko:
success = True
elif player_id in ko:
success = False
elif target_id in ok:
success = False
elif player_id in ok:
success = True
except TypeError:
pass
return success

2
state
View file

@ -1 +1 @@
up
up precampagne !!