Skip to content

1.9.7.3746

Compare
Choose a tag to compare
@dol-leodagan dol-leodagan released this 07 Jun 17:55
576334c
Fix Heretic single damage-only focus spells (#233)

* Make Util non-static

Change extension method calls to regular method calls for: Util.Foreach, .AddRange, .SplitCSV
Remove extension status from methods: Util.Foreach, .AddRange, .Shuffle, .ContainsKey and .SplitCSV
Make Util non-static
Make Util singleton

* Make Util.Random(Double) fakeable

Make Util.Random(Double) fakeable so unit tests can be created deterministic

* Cleanup noise in HereticDamageLostOnPulse

Remove commented out code
Remove unused using statements

* Make LanguageMgr non-static

Remove extension status from LanguageMgr.GetTranslation
Remove extension status from LanguageMgr.TryTranslateOrDefault
Make LanguageMgr a singleton

* Make LanguageMgr.TryGetTranslation fakeable

Extract method body to TryGetTranslationImpl
Make TryGetTranslationImpl non-static, virtual and protected

* Make LanguageMgr initializable in tests

Make LangPath init lazy (only assigned when called)
Make LangPath fakeable (via LangPathImpl)

* Add three tests to HereticDoTLostOnPulse

Override GetPlayersInRadius in FakePlayer and FakeNPC
Override ResetCombatTimer in FakePlayer
Add FakeRegion and FakeRegionData
Override CurrentRegion in FakePlayer and FakeNPC to return FakeRegion
Add MockPlayer in HereticFocusSpells unit tests to sense lastDealtDamage

* Fix Damage of HereticDamageLostOnPulse

Changed growth to be dependent on spell.LifeDrainReturn table column
Added growth_cap (dependent on spell.AmnesiaChance table column)
Changed growth of damage to be linear rather than exponential

* Add duration limit to HereticDamageLostOnPulse