Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

Area skill attacks (e.g., triple shot) were automatically damaging summoned monsters from the attacking player and other players. Summoned monsters should only be hit when explicitly targeted via extraTargetId, not through area-of-effect.

Changes

  • GetTargetsInRange: Added filter to exclude summoned monsters from implicit area attacks

    targetsInRange = targetsInRange.Where(target => target is not Monster { SummonedBy: not null });
  • GetTargets: Modified to yield extraTarget before iterating GetTargetsInRange, ensuring explicit targets (including summoned monsters) are always included when valid

  • Added using MUnique.OpenMU.GameLogic.NPC; for Monster class reference

Behavior

  • Area skills no longer auto-hit summoned monsters in range
  • Explicit targeting via extraTargetId still works for summoned monsters
  • Regular monsters unaffected
Original prompt

This section details on the original issue you should resolve

<issue_title>AreaSkillAttackAction: It hits the own summoned monster</issue_title>
<issue_description>Describe the bug
Area skill attacks automatically damage the own summoned monsters (by elf skill) and summoned monsters of other elfs. Summoned monsters should not be implicitly attacked, only when their ID appear as explicit extra target.

To Reproduce
Steps to reproduce the behavior:

  1. Log into the game as elf, e.g. testgm account
  2. Summon a new monster
  3. Do some triple skill attacks

Expected behavior
Summoned monsters shouldn't be attacked.

Additional context
Affected code at https://github.com/MUnique/OpenMU/blob/master/src/GameServer/MessageHandler/AreaSkillHitHandlerPlugIn.cs
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 4, 2026 18:00
- Added filter to exclude summoned monsters from implicit area attack targets in GetTargetsInRange
- Modified GetTargets to include explicit extra target even if it's a summoned monster
- This allows explicit targeting of summoned monsters while preventing them from being hit automatically

Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
- Added using statement for MUnique.OpenMU.GameLogic.NPC
- Corrected reference from NPC.Monster to Monster in the filter

Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix area skill attack damaging own summoned monsters Fix area skill attacks hitting summoned monsters implicitly Jan 4, 2026
Copilot AI requested a review from sven-n January 4, 2026 18:04
Copy link
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@sven-n sven-n marked this pull request as ready for review January 4, 2026 18:09
@sven-n sven-n merged commit e2bdce7 into master Jan 4, 2026
3 checks passed
@sven-n sven-n deleted the copilot/fix-area-skill-attack-bug branch January 4, 2026 19:23
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.

AreaSkillAttackAction: It hits the own summoned monster

2 participants