public Weapon(Weapon weapon) { Name = weapon.Name; Description = weapon.Description; HitBonus = weapon.HitBonus; DamageRange = weapon.DamageRange; TwoHanded = weapon.TwoHanded; Weight = weapon.Weight; Value = weapon.Value; UnsellableItem = weapon.UnsellableItem; _index = weapon._index; Image = CreateTile.GetImageFromTileset(_index); }
public Armor(Armor armor) { Name = armor.Name; Description = armor.Description; ArmorBonus = armor.ArmorBonus; HeldInHand = armor.HeldInHand; Weight = armor.Weight; Value = armor.Value; UnsellableItem = armor.UnsellableItem; _index = armor._index; Image = CreateTile.GetImageFromTileset(_index); _type = armor.Type; }
public Item(Item newItem) { switch (newItem.GetType().Name) { case "Weapon": new Weapon(newItem as Weapon); break; case "Armor": new Armor(newItem as Armor); break; case "Item": _isGameEnderItem = newItem.IsGameEnderItem; Description = newItem.Description; Name = newItem.Name; _index = newItem._index; Image = CreateTile.GetImageFromTileset(newItem._index); break; default: break; } }