예제 #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;
        }
예제 #2
0
 public Vert(int _base, SubStat atk, SubStat dex, SubStat def, int bLevelUp, int bCombat, int bClasse)
     : base(_base, atk, dex, def, bLevelUp, bCombat, bClasse)
 {
 }
예제 #3
0
 public SubStat(SubStat subStat, int mainStatTotal)
     : this(subStat.Base, subStat.Percent, subStat.BonusPercent, subStat.BonusLevelUp, subStat.BonusCombat)
 {
     UpdateBonusMainStatPercent(mainStatTotal);
 }