public EquipmentData(string equipmentname, EquipmentMainType maintype, EquipmentSubType subtype, EquipmentGrade grade, float atkpower, float defpower, float atkspeed, int cost, bool isMounted, string whoMounted)
 {
     this.equipmentname = equipmentname;
     this.maintype      = maintype;
     this.subtype       = subtype;
     this.grade         = grade;
     this.atkpower      = atkpower;
     this.defpower      = defpower;
     this.atkspeed      = atkspeed;
     this.cost          = cost;
     this.isMounted     = isMounted;
     this.whoMounted    = whoMounted;
 }
예제 #2
0
    bool ClassToSubtype(EquipmentMainType maintype, Class param_class, EquipmentSubType param_subtype)
    {
        switch (maintype)
        {
        case EquipmentMainType.Head:
            if (param_class == Class.Brute || param_class == Class.Knight)
            {
                if (param_subtype == EquipmentSubType.Helm)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                if (param_subtype == EquipmentSubType.Hat)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

        case EquipmentMainType.Weapon:
            if (param_class == Class.Brute)
            {
                if (param_subtype == EquipmentSubType.Axe)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else if (param_class == Class.Knight)
            {
                if (param_subtype == EquipmentSubType.Sword)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else if (param_class == Class.Rogue)
            {
                if (param_subtype == EquipmentSubType.Dagger)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else if (param_class == Class.Archer)
            {
                if (param_subtype == EquipmentSubType.Bow)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else if (param_class == Class.Wizard)
            {
                if (param_subtype == EquipmentSubType.Staff)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                if (param_subtype == EquipmentSubType.Staff)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

        case EquipmentMainType.Armour:
            if (param_class == Class.Brute || param_class == Class.Knight)
            {
                if (param_subtype == EquipmentSubType.Plate)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                if (param_subtype == EquipmentSubType.Cloth)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

        case EquipmentMainType.Accessorie:
            if (param_subtype == EquipmentSubType.Neckless || param_subtype == EquipmentSubType.Ring)
            {
                return(true);
            }
            else
            {
                return(false);
            }

        default:
            return(false);
        }
    } // 클래스에 따른 장비 선택 분류 메소드