test(throwing): keep only complex-logic tests, drop property assertions
Remove the AccuracySkill/DefSkill/ThrowRange/RequiredRaces/CheckRace theory tests — they assert one-line property values and base-class race gating, not throwing-specific logic. Such property-echo tests add maintenance burden and make content customization hostile (every tweak breaks a test). Keep the tests that exercise real derived logic: the hit-chance modifiers and the STR-scaled DefMaxRange clamp. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
942c7935b2
commit
9ea79dc634
1 changed files with 0 additions and 133 deletions
|
|
@ -21,139 +21,6 @@ public class ThrowingTests
|
|||
ModifyHitChance(attacker, defender, chance);
|
||||
}
|
||||
|
||||
// Weapon properties
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang))]
|
||||
[InlineData(typeof(Cyclone))]
|
||||
[InlineData(typeof(SoulGlaive))]
|
||||
public void ThrowingWeapon_AccuracySkill_IsThrowingSkill(Type weaponType)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
try
|
||||
{
|
||||
Assert.Equal(SkillName.Throwing, weapon.AccuracySkill);
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang))]
|
||||
[InlineData(typeof(Cyclone))]
|
||||
[InlineData(typeof(SoulGlaive))]
|
||||
public void ThrowingWeapon_DefSkill_IsThrowingSkill(Type weaponType)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
try
|
||||
{
|
||||
Assert.Equal(SkillName.Throwing, weapon.DefSkill);
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang), 4, 7)]
|
||||
[InlineData(typeof(Cyclone), 6, 9)]
|
||||
[InlineData(typeof(SoulGlaive), 8, 11)]
|
||||
public void ThrowingWeapon_ThrowRange_IsCorrect(Type weaponType, int expectedMin, int expectedMax)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
try
|
||||
{
|
||||
Assert.Equal(expectedMin, weapon.MinThrowRange);
|
||||
Assert.Equal(expectedMax, weapon.MaxThrowRange);
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
// Race restriction
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang))]
|
||||
[InlineData(typeof(Cyclone))]
|
||||
[InlineData(typeof(SoulGlaive))]
|
||||
public void ThrowingWeapon_RequiredRaces_IsGargoylesOnly(Type weaponType)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
try
|
||||
{
|
||||
Assert.Equal(Race.AllowGargoylesOnly, weapon.RequiredRaces);
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang))]
|
||||
[InlineData(typeof(Cyclone))]
|
||||
[InlineData(typeof(SoulGlaive))]
|
||||
public void ThrowingWeapon_CheckRace_AllowsGargoyle(Type weaponType)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
var mobile = CreateMobile(Map.Felucca, new Point3D(5700, 500, 0));
|
||||
try
|
||||
{
|
||||
mobile.Race = Race.Gargoyle;
|
||||
Assert.True(weapon.CheckRace(mobile, message: false));
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
mobile.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang))]
|
||||
[InlineData(typeof(Cyclone))]
|
||||
[InlineData(typeof(SoulGlaive))]
|
||||
public void ThrowingWeapon_CheckRace_BlocksHuman(Type weaponType)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
var mobile = CreateMobile(Map.Felucca, new Point3D(5720, 500, 0));
|
||||
try
|
||||
{
|
||||
mobile.Race = Race.Human;
|
||||
Assert.False(weapon.CheckRace(mobile, message: false));
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
mobile.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Boomerang))]
|
||||
[InlineData(typeof(Cyclone))]
|
||||
[InlineData(typeof(SoulGlaive))]
|
||||
public void ThrowingWeapon_CheckRace_BlocksElf(Type weaponType)
|
||||
{
|
||||
var weapon = (BaseThrown)Activator.CreateInstance(weaponType);
|
||||
var mobile = CreateMobile(Map.Felucca, new Point3D(5740, 500, 0));
|
||||
try
|
||||
{
|
||||
mobile.Race = Race.Elf;
|
||||
Assert.False(weapon.CheckRace(mobile, message: false));
|
||||
}
|
||||
finally
|
||||
{
|
||||
weapon.Delete();
|
||||
mobile.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
// Hit chance modifiers
|
||||
|
||||
/// <summary>At optimal range with no shield the chance should not change.</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue