예제 #1
0
 public void MakeScythe(Mobile from)
 {
     Scythe weapon = new Scythe();
     weapon.NewCrafting = true;
     weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
     weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
     weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
     weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
     weapon.Resource = m_Blade.Resource;
     int quality = (int)(m_Blade.Durability * 0.45 + m_Hilt.MaxHitPoints * 0.55);
     weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
     weapon.Crafter = from;
     weapon.CraftersOriginalName = from.Name;
     quality = (int)(m_Blade.Quality * 0.55 + ((int)m_Hilt.Quality * 50) * 0.45);
     if (quality == 500)
         weapon.Quality = WeaponQuality.Legendary;
     if (quality < 500)
         weapon.Quality = WeaponQuality.Masterwork;
     if (quality < 450)
         weapon.Quality = WeaponQuality.Illustrious;
     if (quality < 400)
         weapon.Quality = WeaponQuality.Extraordinary;
     if (quality < 350)
         weapon.Quality = WeaponQuality.Remarkable;
     if (quality < 300)
         weapon.Quality = WeaponQuality.Exceptional;
     if (quality < 250)
         weapon.Quality = WeaponQuality.Superior;
     if (quality < 200)
         weapon.Quality = WeaponQuality.Regular;
     if (quality < 150)
         weapon.Quality = WeaponQuality.Inferior;
     if (quality < 100)
         weapon.Quality = WeaponQuality.Low;
     if (quality < 50)
         weapon.Quality = WeaponQuality.Poor;
     weapon.BetaNerf = true;
     weapon.InvalidateProperties();
     from.AddToBackpack(weapon);
     weapon.AddItem(m_Blade);
     weapon.AddItem(m_Hilt);
 }