Commit graph

50 commits

Author SHA1 Message Date
7cf3e68b37 #W# Change: Felucca is now Veridia 2026-08-31 18:00:19 -04:00
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
Jack
6745cf2075
feat: Adds Mobile.Murderer virtual property, consolidates kill-threshold checks (#2355)
## Summary

- Adds `public virtual bool Murderer => Kills >= 5` property to `Mobile`, replacing ~30 scattered `Kills >= 5` / `Kills < 5` magic-number checks across the codebase
- `BaseCreature` overrides `Murderer` to also return `true` when `AlwaysMurderer` is set
- Updates `Corpse` serialization to v15, storing `_murderer` as a `bool` field (migrated from `int Kills >= 5` in earlier versions)
2026-03-06 08:36:41 -08:00
Kamron Batman
ebaf104935
chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Bohica
de12f8cb02
fix: Fixes turning to target on spellcast (#2107) 2025-02-03 17:38:07 -08:00
Kamron Batman
1d08572926
fix: Fixes monster ability firing after dying (#1990) 2024-11-11 08:53:49 -05:00
Kamron Batman
e6bfc45228
fix: Consolidates and fixes movement/direction checks (#1861) 2024-07-06 12:41:45 -07:00
Kamron Batman
a552cf4138
fix: Fixes various memory leaks and spells (#1786)
### Summary
- Fixes various memory leaks related to spells
- Fixes Spell Plague
- Added ability to determine if `sdi` should take effect for Spell Damage.
- Fixes animal form timer ticking non-stop while logged out.
2024-05-21 19:44:42 -07:00
Kamron Batman
0ffea2e912
fix: Fixes Feint so it properly reduces damage (#1657) 2024-01-11 00:01:52 -08:00
mark1145
4ebdc75bdf
fix: Fixes PainSpike, ManaVampire, Evil Omen, and Curse (#1622)
Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
2023-12-02 09:59:42 -08:00
Kamron Batman
331f24cb71
fix: Fixes TimeSpan rounding issues (#1610)
### Summary

TLDR - .NET Framework rounded TimeSpan (and some DateTime) methods to the nearest millisecond. This was actually _expected_ accidentally for parts of RunUO.

We are aiming to fix this and clean up some other bad assumptions.

Closes #1604
2023-11-22 18:03:56 -08:00
Kamron Batman
021ebd0a88
fix: Fixes multi search (#1601) 2023-11-18 12:37:26 -08:00
Kamron Batman
ca3df9cfa7
fix: Adds multis to map iterators, fixes searching empty nested containers (#1581)
### Summary
Eliminates `IPooledEnumerable<BaseMulti>` and `eable.Free()` from `Map` for multis. This drastically simplifies code that iterates in range, for example:

```cs
foreach (var m in m.GetMultisInRange(5))
{
}
```
The code above no longer requires an eable and calling `Free()`.


### Bug Fixes
- [X] Fixes an issue with searching through nested empty containers.
2023-11-05 08:17:34 -08:00
Kamron Batman
1f04a13f67
fix: Fixes poison field duration, cleans up skill calculations and poison calculations (#1582)
### Summary
- [X] Fixes poison field duration
- [X] Adds SA+ poison spell calculations
- [X] Cleans up skill calculations
- [X] Adjusts poison level thresholds to properly reflect OSI
2023-11-04 12:32:54 -07:00
Mink80
27df6344d9
fix: Optimizes redundant spell damage logic 2023-09-27 13:24:46 -07:00
Kamron Batman
319d82fec9
fix: Renames WeightOverloading to StaminaSystem (#1495) 2023-09-06 18:58:45 -07:00
Kamron Batman
d14e864c85
fix: Updates disguises and codegens tinkering items (#1353) 2023-02-25 12:01:06 -08:00
Kamron Batman
43d33759df
fix: Fixes travel restriction messages (#1302) 2022-12-13 16:47:04 -08:00
Kamron Batman
b1cfb10ef8
fix: Removes duplicate stat offsets (#1293) 2022-12-04 14:23:02 -08:00
Kamron Batman
bd1db66858
fix: Fixes stat offset effects (#1292) 2022-12-04 14:20:17 -08:00
Kamron Batman
0facd73842
fix: Fixes travel issues (#1285) 2022-11-28 17:36:00 -08:00
Kamron Batman
1d8e8ec0a8
fix: Fixes travel restriction messages (#1263)
- [X] `BaseRegion.CheckTravel` now properly cascades through parent regions
- [X] `SpellHelper.CheckTravel` now returns a failure message instead of sending one internally.
- [X] Consolidates travel restriction messages so they aren't duplicated.
2022-11-22 16:57:42 -08:00
Kamron Batman
59dcd24bed
fix: Fixes DeltaQueue recursion, StatMod bug, and memory leak (#1233)
* Fixes recursion with DeltaQueue causing multiple sets of packets to be sent to the client.
* Fixes StatMods that are expired not being checked properly.
* Adds a timer to properly expire/remove stat mods instead of relying on a side-effect.
2022-11-08 09:08:05 -08:00
mark1145
053dbcbad0
fix: Fixes ignoring mobs, champions, party crash, slayer rarity, boat speedhack, etc (#1222)
* Movie ignore mobiles to Mobile class
* Allow necromancer familiars to ignore mobiles
* ChampionSpawn should not quietly fail when creating new spawn
* Fix client party crash bug: 2 people partied, the leader logs out, other client is hung
* Fix spellbooks creating with magery/meditation only and creating magery multiple times
* Fix BaseRunicTool.GetRandomSlayer() creating more undead slayers than intended
* Do not allow players to dismount each other whilst mounted
* Fix AOS onwards damage increase tooltip and wrong formula in AOS
* Fix monsters killing other monster revenants + animate dead should not attack player pets + other animates
* Fix fire steed having loot pack added twice
* Fix oaks spawn not able to create Unicorns + Kirins via Activator.CreateInstace() due to constructor having name as parametr
* Fix ignoreMobiles flag not propagated to client for non-players.
* Fix harrower tents not leeching from players
* Fix boats speedhacking around the map
* Fix bless, agility etc. not renewing duration
* Fix reveal always worked
* Fix empty constructor for steeds so they don't throw now.
2022-10-31 22:16:50 -07:00
Kamron Batman
ffdc08259f
fix: Adds name support for all mods (#1128) 2022-10-15 10:46:31 -07:00
Kamron Batman
43e7fe29c2
feat: Adds Monster Abilities (#1179)
* Adds ability to create monster abilities
* Adds Fire/Cold/Chaos Breath
* Adds Grasping Claw
* Adds Summon Skeletons & Summon Undead w/ Polymorph
2022-10-01 21:09:36 -07:00
mark1145
060edaa76a
fix: Fixes disarm, strangle, curse, summons, looting rights, creatures attacking, and items going to the floor (#1174)
* Fixes disarm
* Fixes strangle not refreshing
* Fixes curse not refreshing
* Fixes 125% bonus to looting rights
* Fixes mobs attacking each other, or not attacking each other
* Fixes items dropping to the floor
* Fixes protection spell
* Fixes cure sending wrong message
2022-09-27 22:19:15 -07:00
mark1145
1e50ff9966
fix: Blood Oath, Wraith form, & Strangle (#1153)
Fixes blood oath mechanic, and wraith form not properly leeching.
2022-09-01 09:19:40 -07:00
mark1145
42f2c7f6ae
* After casting a spell, the player was always faced south (#1148) 2022-08-26 17:49:39 -07:00
Kamron Batman
56c97ca84a
fix: Fixes spell durations for older expansions (#1119) 2022-07-15 12:49:14 -07:00
mark1145
bd4e6fc30e
fix: Fixes curses and spell effects (#1112)
* * Fix statmod naming mismatch: everything in code searches for "[Magic] {type} Offset" but stat reductions are being added as "[Magic] {type} Curse"

* Clarifies and cleans up curses

* Fixes blood oath

* * NobleSacrifice remove all curses in one go

* Dont need a method

* Fix extra parentheses

Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
2022-07-07 23:59:46 -07:00
Kamron Batman
23532db603
fix: Cleans up LINQ calls. (#965)
- [X] Removes several `ToList()` uses with `PooledRefQueue`
- [X] Adds a `PeekRandom` to PooledRefQueue
- [X] Updates EV/BS so they dispel each other in a more efficient manner.
- [X] Fixes Firebomb so it works like a normal firefield.
- [X] Fixes field spells so they aren't unnecessarily using a Point3D ref more than necessary.
- [X] Removes extra allocation in campfire by using reverse loop.
- [X] Removes other LINQ calls that aren't needed.
2022-03-20 19:20:54 -07:00
Kamron Batman
63e1b02d93
chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
Kamron Batman
4f9714818d
fix: Fixes skill requirements and cleans up magery spells (#870)
* Preps damage stacking for mysticism, necromancy fixes, and spellweaving
* Removes extra LINQ allocations
* Fixes skill requirements for magery spells.
2021-12-05 09:40:57 -08:00
Kamron Batman
15b2d08ea2
fix: More spell variable cleanup (#850) 2021-11-14 18:48:44 -08:00
Kamron Batman
e5f55a424a
fix: Cleans up spell info variable (#848) 2021-11-14 18:31:32 -08:00
Kamron Batman
8eaa859332
fix: Fixes code genning armor, clothing, and BODs (#810)
* Fixes code genning clothing
* Fixes code genning armor
* Fixes code genning BODs
2021-09-28 22:09:34 -07:00
IAmDanielDinner
a0c3158675
fix: Minor refactor of spells (#795) 2021-09-19 15:45:05 -07:00
Kamron Batman
fb915992dd
fix(core): Adds Hashed & Hierarchical Timer Wheel (#655)
- Removes TimerPriority
- Removes TimerThread
- Adds a [Hashed & Hierarchical Timer Wheel](http://www.cs.columbia.edu/~nahum/w6998/papers/ton97-timing-wheels.pdf)
2021-07-11 22:42:06 -07:00
Kamron Batman
ac4d349caa
fix(spells): Fixes an edge case with casters current map (#643) 2021-06-04 23:41:43 -07:00
Kamron Batman
6c4308bce6
fix(core): Caches DateTime.NowUtc (#548)
- [X] Caches DateTime.NowUtc on the game loop (not other threads)
- [X] Replaces all locations where it makes sense
- [X] Adds Min/Max for `IComparable` (TimeSpan, DateTimes, etc)

Closes #261
2021-03-13 01:32:04 -08:00
Kamron Batman
ea5d09a7d7
fix(core): Fixes map issues at New Haven (#509)
- [X] Fixes map issues at New Haven by turning off static diffs
- [X] Some code cleanup and reformatting of tile matrix, tile matrix patch, and tile data
- [X] Adds NetState.Flush for generating spawners so it doesn't feel like the server is frozen
- [X] Reverts NativeReader changes from a while back.
- [X] Adds more string reading for BufferReader.


Notes:
BufferReader is still `little endian` compared to `SpanReader` which is `big endian` (for packets). To that end, the RunUO deserialization `ReadString()` was made obsolete since it is ambiguous, and contains extra fields other than simply reading a string. Furthermore, we shouldn't be using UTF8 (for now) since it is slow.
2021-02-14 16:06:49 -08:00
Kamron Batman
3551d962f7
C# 9 Cleanup (#325)
- [X] Removes EventArgs - not needed
- [X] Merges sequential checks
- [X] Removes redundant type declarations
2020-11-27 00:29:21 -08:00
Kamron Batman
525cda5413
Cleanup & Fixes for .NET 5 (#309)
- [X] Fixes several bugs
- [X] Updates more ordinal issues
- [X] Cleans up the code a bit
- [X] Turns classes static that should have been
- [X] Changes TcpServer.Instances to a HashSet

Bumps release version
2020-11-15 10:03:50 -08:00
Kamron Batman
a236617ad9
Some cleanup of contains keys and try get values (#246) 2020-09-13 20:20:44 -07:00
Kamron Batman
ad3775c4d7
Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Kamron Batman
1f651992d7
Updates formatting rules (#199) 2020-08-25 18:00:51 -07:00
Kamron Batman
010fd9402a
Code cleanup (#188) 2020-08-01 08:40:06 -07:00
Kamron Batman
390f30e706
Convert Regions/Spawns to JSON (#138) 2020-05-26 00:34:29 -07:00
Kamron Batman
8ec166bcd0
Adds assemblies config, fixes crash bugs. (#134) 2020-05-09 12:55:56 -07:00
Renamed from Projects/Scripts/Spells/Base/SpellHelper.cs (Browse further)