ModernUO/Projects/UOContent/Spells
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
..
Base refactor: master views over BaseCreature's one master reference (#2674) 2026-09-24 22:45:24 -07:00
Bushido chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Chivalry feat: Adds Mobile.Murderer virtual property, consolidates kill-threshold checks (#2355) 2026-03-06 08:36:41 -08:00
Eighth feat: Adjusts fame and karma system with era gates for OSI accuracy (#2389) 2026-04-25 11:19:57 -07:00
Fifth feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
First feat: T2A defensive spells (#2378) 2026-03-22 11:18:34 -07:00
Fourth feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
Gargoyle/SpellDefinitions fix: Fixes buffs don't start/stop properly. Streamlines constructor and Add/Remove buffs. (#2082) 2025-01-24 18:20:23 -08:00
Mysticism feat: Refactor Poison system, implement Darkglow & Parasitic effects (#2385) 2026-03-21 21:27:22 -07:00
Necromancy refactor: Changes BaseCreature to the SerializationGenerator (delta save requirement) (#2611) 2026-09-06 14:11:51 -07:00
Ninjitsu refactor: master views over BaseCreature's one master reference (#2674) 2026-09-24 22:45:24 -07:00
Second feat: T2A defensive spells (#2378) 2026-03-22 11:18:34 -07:00
Seventh fix: MeteorSwarm resist halves that target's damage, not the shared pool (#2691) 2026-10-06 16:30:05 -07:00
Sixth feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
Spellweaving refactor: Changes BaseCreature to the SerializationGenerator (delta save requirement) (#2611) 2026-09-06 14:11:51 -07:00
Targeting fix: Adjusts spell ranges to match OSI (#2171) 2025-05-01 20:03:56 -07:00
Third feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
Initializer.cs fix: Adds Cleansing Winds Spell (#1126) 2022-07-17 07:49:55 -07:00
Reagent.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
UnsummonTimer.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00