Beispiel #1
0
        /// <summary>
        /// Décrit une robe d'archimage
        /// </summary>
        /// <returns></returns>
        public static PassiveEquipmentModel ArcmageArmor()
        {
            // Chargement des constantes
            var cst = GameServer.GetScene().Constants.Equip;
            // Armure
            PassiveEquipmentModel model = new Equip.PassiveEquipmentModel();

            model.Name = "Arcmage armor";

            // Décrit le niveau 1 de l'arme
            PassiveEquipmentUpgradeModel lvl1 = new Equip.PassiveEquipmentUpgradeModel()
            {
                Cost = cst.ArmorCost[LOW.Value],
                // Décrit tous les passifs conférés par l'arme.
                PassiveAlterations = Passives(null, HIGH, null, LOW, null),
            };

            PassiveEquipmentUpgradeModel lvl2 = lvl1.Copy();

            lvl2.Cost = cst.UpgradeCost1;
            lvl2.PassiveAlterations[1].FlatValue += 2 * cst.ArmorBonusRMStep;

            PassiveEquipmentUpgradeModel lvl3 = lvl2.Copy();

            lvl3.Cost = cst.UpgradeCost2;
            lvl3.PassiveAlterations[1].FlatValue += 2 * cst.ArmorBonusRMStep;

            model.Upgrades = new List <Equip.PassiveEquipmentUpgradeModel>()
            {
                lvl1, lvl2, lvl3
            };
            return(model);
        }
Beispiel #2
0
        /// <summary>
        /// Décrit un harnois d'adamantine
        /// </summary>
        /// <returns></returns>
        public static PassiveEquipmentModel AdamantineHarness()
        {
            // Chargement des constantes
            var cst = GameServer.GetScene().Constants.Equip;
            // Armure
            PassiveEquipmentModel model = new Equip.PassiveEquipmentModel();

            model.Name = "Adamantine harness";

            // Décrit le niveau 1 de l'arme
            PassiveEquipmentUpgradeModel lvl1 = new Equip.PassiveEquipmentUpgradeModel()
            {
                Cost = cst.ArmorCost[LOW.Value],
                // Décrit tous les passifs conférés par l'arme.
                PassiveAlterations = Passives(VERY_HIGH, null, MEDIUM, null, -MEDIUM),
            };

            PassiveEquipmentUpgradeModel lvl2 = lvl1.Copy();

            lvl2.Cost = cst.UpgradeCost1;
            lvl2.PassiveAlterations[0].FlatValue += 4 * cst.ArmorBonusArmorStep;
            lvl2.PassiveAlterations[4].FlatValue += cst.ArmorBonusSpeedStep;

            PassiveEquipmentUpgradeModel lvl3 = lvl2.Copy();

            lvl3.Cost = cst.UpgradeCost2;
            lvl3.PassiveAlterations[0].FlatValue += 4 * cst.ArmorBonusArmorStep;
            lvl3.PassiveAlterations[4].FlatValue += cst.ArmorBonusSpeedStep;

            model.Upgrades = new List <Equip.PassiveEquipmentUpgradeModel>()
            {
                lvl1, lvl2, lvl3
            };
            return(model);
        }
        /// <summary>
        /// Crée et retourne une copie complète de cette instance.
        /// </summary>
        /// <returns></returns>
        public PassiveEquipmentUpgradeModel Copy()
        {
            PassiveEquipmentUpgradeModel copy = new PassiveEquipmentUpgradeModel();

            copy.Cost = Cost;
            foreach (var alt in PassiveAlterations)
            {
                copy.PassiveAlterations.Add(alt.Copy());
            }
            return(copy);
        }
        /// <summary>
        /// Crée un équipement passif à partir d'une liste de passifs, d'une liste de prix et d'un type.
        /// </summary>
        public static PassiveEquipmentModel Create(string name, EquipmentType type, int[] prices, List <Passive> passives)
        {
            var cst = GameServer.GetScene().Constants.Equip;
            PassiveEquipmentModel b = new PassiveEquipmentModel();

            b.Name = name;
            b.Type = type;
            var passiveAlts = CreatePassives(passives);

            for (int i = 0; i < 3; i++)
            {
                PassiveEquipmentUpgradeModel upgrade = new PassiveEquipmentUpgradeModel();
                upgrade.Cost = cst.EquipCost[prices[i]];
                upgrade.PassiveAlterations = passiveAlts[i];
                b.Upgrades.Add(upgrade);
            }
            return(b);
        }
Beispiel #5
0
        /// <summary>
        /// Décrit un patchwork
        /// </summary>
        /// <returns></returns>
        public static PassiveEquipmentModel PatchworkArmor()
        {
            // Chargement des constantes
            var cst = GameServer.GetScene().Constants.Equip;
            // Armure
            PassiveEquipmentModel model = new Equip.PassiveEquipmentModel();

            model.Name = "Patchwork Armor";

            // Décrit le niveau 1 de l'arme
            PassiveEquipmentUpgradeModel lvl1 = new Equip.PassiveEquipmentUpgradeModel()
            {
                Cost = cst.ArmorCost[MEDIUM.Value],
                // Décrit tous les passifs conférés par l'arme.
                PassiveAlterations = Passives(MEDIUM, MEDIUM, null, MEDIUM, null),
            };

            PassiveEquipmentUpgradeModel lvl2 = lvl1.Copy();

            lvl2.Cost = cst.UpgradeCost1 + cst.UpgradeCostBonusIfExpensive;
            lvl2.PassiveAlterations[2].FlatValue += 2 * cst.ArmorBonusHPStep;
            lvl2.PassiveAlterations[0].FlatValue += 2.5f * cst.ArmorBonusRegenStep;
            lvl2.PassiveAlterations[1].FlatValue += cst.ArmorBonusRegenStep;

            PassiveEquipmentUpgradeModel lvl3 = lvl2.Copy();

            lvl3.Cost = cst.UpgradeCost2 + cst.UpgradeCostBonusIfExpensive;
            lvl3.PassiveAlterations[2].FlatValue += 2 * cst.ArmorBonusHPStep;
            lvl3.PassiveAlterations[0].FlatValue += 2.5f * cst.ArmorBonusRegenStep;
            lvl3.PassiveAlterations[1].FlatValue += cst.ArmorBonusRegenStep;

            model.Upgrades = new List <Equip.PassiveEquipmentUpgradeModel>()
            {
                lvl1, lvl2, lvl3
            };
            return(model);
        }