attack now button

This commit is contained in:
2026-05-01 02:37:46 +03:00
parent ae37674bcc
commit efa63f761f
4 changed files with 66 additions and 0 deletions

View File

@@ -206,6 +206,15 @@ def get_pending_command():
'rural_trade_ratio': bot_row['rural_trade_ratio'] if bot_row else 3,
}
# One-shot manual attack flag
attack_now_key = f'bootcamp_attack_now_{player_id}'
flag_row = c.execute('SELECT value FROM kv_store WHERE key = ?', (attack_now_key,)).fetchone()
if flag_row and flag_row['value'] == '1':
bot_settings['attack_now'] = True
c.execute("UPDATE kv_store SET value = '0' WHERE key = ?", (attack_now_key,))
else:
bot_settings['attack_now'] = False
# Feature flags — look up this player's authorized features from their clan
member_row = c.execute(
'SELECT features FROM clan_members WHERE player_id = ?', (str(player_id),)