Ejemplo n.º 1
0
        /// <summary>
        /// Constructeur du MainStat.
        /// </summary>
        /// <param name="_base">La valeur de base assignée lors de la création du personnage.</param>
        /// <param name="atk"></param>
        /// <param name="dex"></param>
        /// <param name="def"></param>
        /// <param name="bClasse"></param>
        /// <param name="bLevelUp"></param>
        /// <param name="bCombat"></param>
        /// <exception cref="TotalPourcentageInvalideException">Si le total </exception>
        protected MainStat(int _base, SubStat atk, SubStat dex, SubStat def, int bClasse = 0, int bLevelUp = 0, int bCombat = 0)
            : this(_base, new List <SubStat>(3) { atk, dex, def }, bLevelUp, bCombat)
        {
            // TODO: Vérifier si c'est ainsi qu'il faut valider si ça fait un total de 100%.
            if (ValiderSubStatPourcentageTotal(atk.Percent, dex.Percent, def.Percent))
            {
                atk.UpdateBonusMainStatPercent(Base);
                dex.UpdateBonusMainStatPercent(Base);
                def.UpdateBonusMainStatPercent(Base);
                AtkSubStat = atk;
                DexSubStat = dex;
                DefSubStat = def;
            }
            else
            {
                throw new TotalPourcentageInvalideException();
            }

            BonusClasse = bClasse;
        }
Ejemplo n.º 2
0
 public Bleu(int _base, SubStat atk, SubStat dex, SubStat def, int bLevelUp, int bCombat, int bClasse) 
     : base(_base, atk, dex, def, bLevelUp, bCombat, bClasse) {}
Ejemplo n.º 3
0
 public SubStat(SubStat subStat, int mainStatTotal) 
     : this(subStat.Base, subStat.Percent, subStat.BonusPercent, subStat.BonusLevelUp, subStat.BonusCombat)
 {
     UpdateBonusMainStatPercent(mainStatTotal);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructeur du MainStat.
        /// </summary>
        /// <param name="_base">La valeur de base assignée lors de la création du personnage.</param>
        /// <param name="atk"></param>
        /// <param name="dex"></param>
        /// <param name="def"></param>
        /// <param name="bClasse"></param>
        /// <param name="bLevelUp"></param>
        /// <param name="bCombat"></param>
        /// <exception cref="TotalPourcentageInvalideException">Si le total </exception>
        protected MainStat(int _base, SubStat atk, SubStat dex, SubStat def, int bClasse = 0, int bLevelUp = 0, int bCombat = 0) 
            : this(_base, new List<SubStat>(3) { atk, dex, def }, bLevelUp, bCombat)
        {
            // TODO: Vérifier si c'est ainsi qu'il faut valider si ça fait un total de 100%.
            if (ValiderSubStatPourcentageTotal(atk.Percent, dex.Percent, def.Percent))
            {
                atk.UpdateBonusMainStatPercent(Base);
                dex.UpdateBonusMainStatPercent(Base);
                def.UpdateBonusMainStatPercent(Base);
                AtkSubStat = atk;
                DexSubStat = dex;
                DefSubStat = def;
            }
            else
            {
                throw new TotalPourcentageInvalideException();
            }

            BonusClasse = bClasse;
        }
Ejemplo n.º 5
0
 public Bleu(int _base, SubStat atk, SubStat dex, SubStat def, int bLevelUp, int bCombat, int bClasse)
     : base(_base, atk, dex, def, bLevelUp, bCombat, bClasse)
 {
 }
Ejemplo n.º 6
0
 public SubStat(SubStat subStat, int mainStatTotal)
     : this(subStat.Base, subStat.Percent, subStat.BonusPercent, subStat.BonusLevelUp, subStat.BonusCombat)
 {
     UpdateBonusMainStatPercent(mainStatTotal);
 }