|
|
|
@ -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] |
|
|
|
|
|
|
|
if target_id in ko: |
|
|
|
success = True |
|
|
|
elif player_id in ko: |
|
|
|
success = False |
|
|
|
elif target_id in ok: |
|
|
|
success = False |
|
|
|
|
|
|
|
except TypeError: |
|
|
|
pass |
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
return success |
|
|
|
|
|
|
|
|