|
|
@@ -140,17 +140,15 @@ def calculate_time_to_next_attack(this_player_id):
|
|
|
return -1
|
|
|
seconds_till_level_iv = 0
|
|
|
starting_time = int(this_status_json['timestamp'])
|
|
|
- if this_status_integer >= 0:
|
|
|
+ if this_status_integer == 0:
|
|
|
status_text = this_status_json['text']
|
|
|
seconds_till_level_iv += extract_hospital_time(status_text)
|
|
|
- if this_status_integer >= 1:
|
|
|
+ if this_status_integer <= 1:
|
|
|
seconds_till_level_iv += 30 * 60
|
|
|
- if this_status_integer >= 2:
|
|
|
+ if this_status_integer <= 2:
|
|
|
seconds_till_level_iv += 90 * 60
|
|
|
- if this_status_integer >= 3:
|
|
|
+ if this_status_integer <= 3:
|
|
|
seconds_till_level_iv += 210 * 60
|
|
|
- if this_status_integer == 4:
|
|
|
- seconds_till_level_iv = 0
|
|
|
apocalypse_time = starting_time + seconds_till_level_iv
|
|
|
time_now = arrow.utcnow().timestamp
|
|
|
diff = apocalypse_time - time_now
|