fix: MeteorSwarm resist halves that target's damage, not the shared pool (#2691)

## Summary
Pre-AOS, a Meteor Swarm target that resists should take half of its share of the damage. Instead the resist branch halves the **shared** `damage` variable:

```csharp
var toDeal = damage;

if (!Core.AOS && CheckResisted(m))
{
    damage *= 0.5;   // should be toDeal
```

`toDeal` has already been copied, so:
- the target that resisted takes **full** damage, and
- every target processed after it is halved, once per earlier resist, so a group where several resist ends up taking a fraction of the intended damage for reasons unrelated to their own resist.

`ChainLightning` already handles this correctly (`toDeal *= 0.5;`), and this change makes Meteor Swarm match it. The AOS path is unaffected, since resist checks only run pre-AOS.

The bug predates ModernUO (it was carried over from RunUO in the first alpha).

## Testing
- `dotnet build Projects/UOContent/UOContent.csproj`: 0 warnings, 0 errors.
- No unit test: the per-target damage sits inside `Target()`'s queue loop alongside a random resist roll, so testing it would mean refactoring the spell for a one-word fix. Happy to factor out a helper and add one if preferred.
This commit is contained in:
Jack 2026-10-07 12:30:05 +13:00 • committed by GitHub
parent 261ea01ab4
commit 73a1aaf5e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,7 +86,7 @@ namespace Server.Spells.Seventh
if (!Core.AOS && CheckResisted(m))
{
damage *= 0.5;
toDeal *= 0.5;
m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
}