예제 #1
0
 public Restoration()
 {
     SkillMetaId      = null;
     RestorationType  = RestorationType.Instant;
     VitalToRestoreID = "";
     FixedRestore     = true;
     AmountToRestore  = 100;
     Duration         = 1.0f;
 }
 public RestorePercentageStatus(
     int numberOfTurns,
     RestorationType restorationType,
     double percentage)
     : base(numberOfTurns, true)
 {
     RestorationType = restorationType;
     Percentage      = percentage;
 }
        public RestorationBattleMoveEffect(RestorationType restorationType, int percentage, BattleMoveEffectActivationType effectActivationType, BattleCondition battleCondition = null)
            : base(effectActivationType, battleCondition)
        {
            if (percentage < 0)
            {
                throw new ArgumentException("RestoreHealthEffect cannot be initialized with a negative percentage!", nameof(percentage));
            }
            if (percentage == 0)
            {
                throw new ArgumentException("RestoreHealthEffect cannot be initialized with a percentage of 0!", nameof(percentage));
            }
            if (percentage > 100)
            {
                throw new ArgumentException("RestoreHealthEffect cannot be initialized with a percentage that exceeds 100!", nameof(percentage));
            }

            RestorationType = restorationType;
            Percentage      = percentage;
        }