public void UneqipWeapon(Items thing) { if (thing is Weapon) { Equiped.Remove(thing); Inventory.Add(thing); if (thing is Saber) { var temp = (Saber)thing; LightAttackAbility tempAbility = new LightAttackAbility(temp,this); var tempR=attacks.Find(o=>o.Name==thing.Name+" Light Attack"); attacks.Remove(tempR); } else { var temp=(DarkStaff)thing; LightMagicAbility tempAbility = new LightMagicAbility(temp,this); var tempR = attacks.Find(o => o.Name == thing.Name + " Light Magic Attack"); attacks.Remove(tempR); } weaponCapacity++; } }
public MagicAttack(Enemy p1, Player p2, LightMagicAbility a1) : base(p1, p2, a1) { var temp = a1; this.DmgValue = temp.HealtDmg; this.ManaEffect = temp.ManaEffect; this.StaminaEffect = temp.StaminaEffect; if (p2.Info.DefenceRating > temp.HitModf) { this.Defend = true; } else { this.Defend = false; } }