ModernUO/Projects/UOContent/Engines/ConPVP
Jack 7be8b5f7f6
feat: T2A defensive spells (#2378)
## Summary

Implements T2A-accurate mechanics for the three defensive spells based on UO98 demo scripts. Pre-UOR (`!Core.UOR`) triggers the new behavior; UOR and AOS paths are unchanged.

- **Reactive Armor**: percentage-based melee damage reflection (10-35% based on target Magery), targeted, timed (25-75s). Guards exempt, ranged attacks beyond 1 tile unaffected. Reflected damage is sourceless.
- **Protection**: temporary AC bonus (casterMagery/10, 1-10 AR) via VirtualArmorMod, targeted, timed (12-120s). Shared table with Arch Protection — only one protection buff per mobile.
- **Magic Reflect**: single-use spell reflection using MagicDamageAbsorb as a flag. No timer, no DefensiveSpell lock. Consumed on first reflected spell.
- **Arch Protection**: T2A path applies Protection via shared table with area sound (0x1F7 vs 0x1ED).
- No DefensiveSpell mutual exclusion for T2A — all three spells operate independently.

## Test plan

- [x] Set expansion to T2A
- [x] Cast Reactive Armor on self → verify particles (0x376A) and sound (0x1F2)
- [x] Get hit in melee → verify attacker takes reflected damage with spark effect and sound
- [x] Get hit by ranged weapon from > 1 tile → verify no reflection
- [x] Wait for RA to expire → verify effect ends silently
- [x] Cast RA on target that already has it → verify "This spell is already in effect"
- [x] Cast Protection on another player → verify particles (0x375A) and sound (0x1ED)
- [x] Check target's AR → verify it increased by casterMagery/10
- [x] Wait for Protection to expire → verify AR returns to normal
- [x] Cast Protection on self, then cast Protection on another player → verify both succeed
- [x] Cast Arch Protection on ground near allies → verify each gets AR bonus with sound 0x1F7
- [x] Cast Arch Protection near a target already protected → verify that target is skipped
- [x] Cast Magic Reflect on self → verify particles (0x375A) and sound (0x1E9)
- [x] Have an enemy cast a harmful spell at you → verify spell reflects back, effect consumed
- [x] Cast Magic Reflect again → verify it can be recast after consumption
- [x] Cast Magic Reflect when already active → verify "This spell is already in effect"
- [x] Verify all three spells can be active simultaneously on the same mobile
- [x] Switch expansion to UOR → verify existing UOR behavior unchanged
- [x] Switch expansion to AOS → verify existing AOS behavior unchanged
2026-03-22 11:18:34 -07:00
..
Games fix: Fixes container enumeration not recycling pooled arrays (#2341) 2026-02-17 09:54:32 -08:00
Gumps fix: Converts ConPVP to serialization generator (#2338) 2026-02-14 14:50:10 -08:00
AcceptDuelGump.cs fix: Fix NetStateGumps and other Gumps cleanup (#1919) 2024-08-10 09:57:28 -07:00
Arena.cs fix: Fixes region priority and resolution. (#1254) 2022-11-21 10:38:20 -08:00
DuelContext.cs feat: T2A defensive spells (#2378) 2026-03-22 11:18:34 -07:00
DuelTeleporterAddon.cs fix: Converts ConPVP to serialization generator (#2338) 2026-02-14 14:50:10 -08:00
Ladder.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
Participant.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Preferences.cs feat: Moves gumps out of the core (#1916) 2024-08-09 19:07:32 -07:00
Ruleset.cs C# 9 Cleanup (#325) 2020-11-27 00:29:21 -08:00
RulesetLayout.cs C# 9 Cleanup (#325) 2020-11-27 00:29:21 -08:00
SafeZone.cs fix: Fixes region priority and resolution. (#1254) 2022-11-21 10:38:20 -08:00
Tournament.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
TournamentBracketItem.cs fix: Converts ConPVP to serialization generator (#2338) 2026-02-14 14:50:10 -08:00
TournamentController.cs feat: Moves gumps out of the core (#1916) 2024-08-09 19:07:32 -07:00
TournamentPyramid.cs feat: Adds Mobile.Murderer virtual property, consolidates kill-threshold checks (#2355) 2026-03-06 08:36:41 -08:00
TournamentRegistrar.cs fix: Converts ConPVP to serialization generator (#2338) 2026-02-14 14:50:10 -08:00
TournamentSignupItem.cs fix: Converts ConPVP to serialization generator (#2338) 2026-02-14 14:50:10 -08:00
TourneyParticipant.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
Trophy.cs fix: Codegens faction items and questers (#1764) 2024-05-08 17:16:36 -07:00