Skip to content

Comments

Remove debug logging and fix Arcane Echo/Auspicious Incantation cooldown logic#55

Draft
Copilot wants to merge 6 commits intoewoogdevfrom
copilot/remove-debug-arcane-echo
Draft

Remove debug logging and fix Arcane Echo/Auspicious Incantation cooldown logic#55
Copilot wants to merge 6 commits intoewoogdevfrom
copilot/remove-debug-arcane-echo

Conversation

Copy link

Copilot AI commented Nov 23, 2025

Fix: Remove debug and fix Arcane Echo/Auspicious Incantation cooldown logic ✅

Completed Tasks:

  • Analyze codebase and understand the issue
  • Remove all debug logging statements added in PR Fix: Complete Auspicious Incantation → Arcane Echo → Target Spell chain #54 (EchoFollowup logs)
  • Fix cooldown logic: Allow target spell casting if echo spell is on cooldown
  • Address all code review feedback
  • Simplify and optimize logic
  • Fix critical bug in skill ID lookup
  • Run security checks with CodeQL
  • Final verification and syntax checks

Summary of Changes:

1. Debug Statements Removed ✅

  • Removed all ~40 Py4GW.Console.Log("EchoFollowup", ...) debug statements from HeroAI/combat.py
  • Confirmed: 0 debug logs remaining

2. Cooldown Logic Fixed ✅

Location: HeroAI/combat.py, lines 1518-1554

Critical Bug Fix (Latest commit):

  • Problem: Previous logic incorrectly used skillbar slot numbers to index into the prioritized skills array
  • Impact: Prevented ALL skills from being cast (Echo, Auspicious, and Target)
  • Fix: Now correctly retrieves skill IDs from skillbar slots using GLOBAL_CACHE.SkillBar.GetSkillIDBySlot() API

How it works:

  1. Get target skill IDs from configured skillbar slots (not from prioritized array)
  2. Compare current skill_id directly with these target skill IDs
  3. If match and echo spell is ready → Skip (let echo spell cast first)
  4. If match and echo spell is on cooldown → Allow casting the target spell

Priority order: Auspicious Incantation (highest) → Arcane Echo → Target Spell

3. Optimizations ✅

  • Only checks readiness of relevant echo spell (avoids unnecessary API calls)
  • Simplified conditional structure
  • Properly handles all edge cases

Files Modified:

  • HeroAI/combat.py - Removed debug logs, fixed cooldown logic, and corrected skill ID lookup

Testing:

  • ✅ Python syntax validation passed
  • ✅ CodeQL security check completed (no issues for Python changes)
  • ⚠️ Manual testing recommended to verify behavior in-game
Original prompt

Can you remove the debug added by Complete Auspicious Incantation → Arcane Echo → Target Spell chain #54. Also please fix so that when an ability is targeted by Arcane Echo/Auspicious Incantation, it can still be used if Arcane Echo OR Auspicious is on cooldown.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits November 23, 2025 00:20
- Removed all EchoFollowup debug logging statements (~40 statements)
- Fixed cooldown logic: Target spell can now be cast if EITHER Echo OR Auspicious is on cooldown
- Previous behavior: Prevented casting if EITHER was ready
- New behavior: Only prevent casting if BOTH are ready

Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove debug from Arcane Echo target spell chain Remove debug logging and fix Arcane Echo/Auspicious Incantation cooldown logic Nov 23, 2025
Copilot AI requested a review from Ewoog November 23, 2025 00:28
@Ewoog
Copy link
Owner

Ewoog commented Nov 23, 2025

@copilot Now this doesn't use any of the three skills (Echo, Auspicious, or Target). No output to log.

The previous logic incorrectly used skillbar slot numbers to index into the prioritized skills array. This prevented any skills from being cast. Now correctly retrieves skill IDs from skillbar slots using GetSkillIDBySlot() API.

Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 23, 2025

@copilot Now this doesn't use any of the three skills (Echo, Auspicious, or Target). No output to log.

Fixed in fd49acd. The issue was that I incorrectly used skillbar slot numbers to index into the prioritized skills array. Now correctly retrieves target skill IDs from skillbar slots using GetSkillIDBySlot() API. This should allow all three skills (Echo, Auspicious, and Target) to be cast properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants