feat(candy-survival): toggle-and-walk knock mode, unified animations, score rewards, RPC fix

- Changed knock from instant-ambush to toggle-and-walk: press Q to toggle Knock Mode ON, walk into target to execute, consumed on use
- Unified knock animation with other game modes (attack_mode SFX, bump, 3-tile knockback, stagger)
- Added +100 score rewards for completing goals, KNOCK, and GHOST
- Fixed RPC unknown peer ID crash for AI bots in ghost/candy stack sync
- Bots auto-toggle is_charged_strike when they have knock charges
- Fixed profile panel username update on connected peers
- Added SafeNakamaMultiplayerBridge for match state crash prevention
This commit is contained in:
2026-07-09 18:03:26 +08:00
parent 00c9e85527
commit 2b4c9d9dcb
8 changed files with 116 additions and 68 deletions
+11
View File
@@ -210,6 +210,17 @@ func _run_ai_tick():
print("[BotController] Action Taken: Attack Pursuit")
return
# Priority 0.3: Candy Survival — auto-toggle knock mode when bot has charges
if strategic_planner and strategic_planner.is_candy_survival_mode():
var gm = strategic_planner._get_candy_survival_manager()
if gm and gm.active:
var pid = actor.get("peer_id") if "peer_id" in actor else actor.name.to_int()
var charges = gm.player_knocks.get(pid, 0)
if charges > 0:
actor.is_charged_strike = true
else:
actor.is_charged_strike = false
# Priority 0.5: Candy Survival (#075) — use Ghost powerup if boxed in
if await _try_activate_ghost():
print("[BotController] Action Taken: Ghost (trapped)")