public void RemoveTargetInRange(AttackableComponent attackableComponent, MyObjectType targetObjectType) { AttackEffectiviness attackEffectiviness = GetEffectiviness(attackType, targetObjectType); switch (attackEffectiviness) { case AttackEffectiviness.Effective: effectiveTargets.Remove(attackableComponent); break; case AttackEffectiviness.Standard: standardTargets.Remove(attackableComponent); break; case AttackEffectiviness.Ineffective: ineffectiveTargets.Remove(attackableComponent); break; } }
static public float GetDamageModifier(MyObjectType attackType, MyObjectType defenceType) { AttackEffectiviness attackEffectiviness = GetEffectiviness(attackType, defenceType); switch (attackEffectiviness) { case AttackEffectiviness.Effective: return(2f); case AttackEffectiviness.Standard: return(1f); case AttackEffectiviness.Ineffective: return(0.5f); default: return(1f); } }
public void AddTargetInRange(AttackableComponent attackableComponent, MyObjectType targetObjectType) { if (effectiveTargets.Contains(attackableComponent) || standardTargets.Contains(attackableComponent) || ineffectiveTargets.Contains(attackableComponent)) { return; } AttackEffectiviness attackEffectiviness = GetEffectiviness(attackType, targetObjectType); switch (attackEffectiviness) { case AttackEffectiviness.Effective: effectiveTargets.Add(attackableComponent); break; case AttackEffectiviness.Standard: standardTargets.Add(attackableComponent); break; case AttackEffectiviness.Ineffective: ineffectiveTargets.Add(attackableComponent); break; } }