ModernUO/Projects/UOContent/Spells/Seventh
Jack 73a1aaf5e0
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.
2026-10-06 16:30:05 -07:00
..
ChainLightning.cs fix: Fixes targeting ground with spells (#1937) 2024-08-20 15:51:33 -07:00
EnergyField.cs feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
FlameStrike.cs fix: Magic NPCs now use spell range (#1870) 2024-08-08 07:05:27 -07:00
GateTravel.cs feat: Adds Mobile.Murderer virtual property, consolidates kill-threshold checks (#2355) 2026-03-06 08:36:41 -08:00
ManaVampire.cs fix: Magic NPCs now use spell range (#1870) 2024-08-08 07:05:27 -07:00
MassDispel.cs fix: Fixes targeting ground with spells (#1937) 2024-08-20 15:51:33 -07:00
MeteorSwarm.cs fix: MeteorSwarm resist halves that target's damage, not the shared pool (#2691) 2026-10-06 16:30:05 -07:00
Polymorph.cs feat: Adds PlayerDeathEvent and CreatureDeathEvent using code generated events (#1927) 2024-09-05 21:23:03 -07:00