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:
parent
261ea01ab4
commit
73a1aaf5e0
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue