ModernUO/Projects/UOContent/Items/Weapons
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
..
Abilities feat: Refactor Poison system, implement Darkglow & Parasitic effects (#2385) 2026-03-21 21:27:22 -07:00
Artifacts fix: Adds back razor/assistuo negotiations (#1089) 2022-06-25 01:47:45 -07:00
Axes fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
Knives fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
Maces fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
ML Weapons fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
PoleArms fix: Optimizes items to use default weights. (Part 2) (#2241) 2025-07-24 15:41:44 -07:00
Ranged fix: Fixes arrow animations by using 0xC7 when possible. (#2343) 2026-03-05 23:23:20 -08:00
SE Weapons fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
SpearsAndForks fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
Staves fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
Swords fix: Optimizes items to use default weights. (Part 2) (#2241) 2025-07-24 15:41:44 -07:00
Throwing chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Wooden fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
BaseMeleeWeapon.cs feat: T2A defensive spells (#2378) 2026-03-22 11:18:34 -07:00
BaseWeapon.cs fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
Fists.cs fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
HitLower.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
SlayerEntry.cs feat: Adds Pre-UOTD single click support for weapons, armor, wands, and clothing (#2053) 2025-01-13 17:04:24 -08:00
SlayerGroup.cs fix: Fixes ignoring mobs, champions, party crash, slayer rarity, boat speedhack, etc (#1222) 2022-10-31 22:16:50 -07:00
SlayerName.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
WeaponEnums.cs fix: Adds throwing weapons (#1107) 2022-07-01 17:03:27 -07:00