refactor: create a public dictionary for turret damage types
This commit is contained in:
parent
35508c8264
commit
e66cbcf262
2 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace ZenithInfo.Models
|
namespace ZenithInfo.Models
|
||||||
{
|
{
|
||||||
public enum ModuleSizes
|
public enum ModuleSizes
|
||||||
|
@ -29,4 +31,15 @@ namespace ZenithInfo.Models
|
||||||
Railgun,
|
Railgun,
|
||||||
PulseLaser,
|
PulseLaser,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Dictionary<TurretTypes, DamageTypes> TurretDamageTypes { get; } =
|
||||||
|
new Dictionary<TurretTypes, DamageTypes>
|
||||||
|
{
|
||||||
|
{ TurretTypes.Artillery, DamageTypes.Hull },
|
||||||
|
{ TurretTypes.Autocannon, DamageTypes.Hull },
|
||||||
|
{ TurretTypes.BeamLaser, DamageTypes.Shield },
|
||||||
|
{ TurretTypes.Blaster, DamageTypes.Shield },
|
||||||
|
{ TurretTypes.Railgun, DamageTypes.Hull },
|
||||||
|
{ TurretTypes.PulseLaser, DamageTypes.Shield },
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,7 @@ namespace ZenithInfo.Models
|
||||||
|
|
||||||
public DamageTypes DamageType()
|
public DamageTypes DamageType()
|
||||||
{
|
{
|
||||||
new Dictionary<TurretTypes, DamageTypes>
|
TurretDamageTypes[this.Type];
|
||||||
{
|
|
||||||
{ TurretTypes.Artillery, DamageTypes.Hull },
|
|
||||||
{ TurretTypes.Autocannon, DamageTypes.Hull },
|
|
||||||
{ TurretTypes.BeamLaser, DamageTypes.Shield },
|
|
||||||
{ TurretTypes.Blaster, DamageTypes.Shield },
|
|
||||||
{ TurretTypes.Railgun, DamageTypes.Hull },
|
|
||||||
{ TurretTypes.PulseLaser, DamageTypes.Shield },
|
|
||||||
}[this.Type];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DamageStats Dps(int range: 0)
|
public DamageStats Dps(int range: 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue