Skip to content

Comments

Add aggressive interrupt mode setting to HeroAI#6

Draft
Copilot wants to merge 3 commits intoewoogdevfrom
copilot/add-aggressive-heroai-setting
Draft

Add aggressive interrupt mode setting to HeroAI#6
Copilot wants to merge 3 commits intoewoogdevfrom
copilot/add-aggressive-heroai-setting

Conversation

Copy link

Copilot AI commented Nov 18, 2025

Adds a toggleable setting in HeroAI's Custom Skills GUI that enables aggressive interrupt behavior. When active, the bot immediately interrupts any casting enemy in range, bypassing normal skill rotation.

Changes

Settings (settings.py)

  • Added AggressiveInterrupts boolean setting (account-specific, defaults to False)
  • Stored in [Combat] section of account INI

UI (windows.py)

  • Added collapsible "Aggressive Interrupts" section in Custom Skills configuration window
  • Checkbox toggle with status indicator

Combat Logic (combat.py)

  • New method FindReadyInterruptForCastingEnemy(): Scans for casting enemies (activation >= 0.25s) and finds ready interrupt skills
  • Modified HandleCombat(): Checks for interrupt opportunities before normal skill rotation when aggressive mode enabled

Behavior

When enabled:

# In HandleCombat(), before normal skill rotation:
if self.aggressive_interrupts and not ooc and self.is_combat_enabled:
    interrupt_slot, casting_enemy = self.FindReadyInterruptForCastingEnemy()
    if interrupt_slot is not None:
        # Immediately cast interrupt
        GLOBAL_CACHE.SkillBar.UseSkill(slot, casting_enemy)
        return True
  • Finds enemies casting spells in combat range
  • Uses any available interrupt skill (identified by Nature.Interrupt)
  • Validates energy, recharge, range, and skill conditions
  • Resets skill pointer to continue normal rotation after interrupt

When disabled: Standard interrupt priority behavior with no performance impact.

Original prompt

Develop a setting for HeroAI (toggleable in Custom Skills GUI tab) that when active, makes HeroAI very very aggressive and responsive with interrupts. When toggled, the bot should find any enemy in range and immediately interrupt it while it is spellcasting. It should interrupt or cancel any other action to use the interrupting spell.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 18, 2025
Copilot AI and others added 2 commits November 18, 2025 02:32
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] Add aggressive interrupt setting for HeroAI Add aggressive interrupt mode setting to HeroAI Nov 18, 2025
Copilot AI requested a review from Ewoog November 18, 2025 02:40
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