예제 #1
0
        public Attack(string Name = "null", double Ap = 0, double Dmg = 0, DamageEffect Effect = null)
        {
            this.Name = Name;

            this.Ap  = Ap;
            this.Dmg = Dmg;

            this.Effect = Effect;
        }
예제 #2
0
 public void AddDamage(DamageEffect dmgEffect = null)
 {
     if (dmgEffect != null)
     {
         if (dmgEffect.Chance >= Game.GetRandom().Next(100))
         {
             for (int i = 0; i < EffectList.Count; i++)
             {
                 if (EffectList[i].Name == dmgEffect.Name)
                 {
                     EffectList[i] = new DamageEffect(dmgEffect.Name, dmgEffect.EffectLength, dmgEffect.EffectDmg, dmgEffect.Chance);
                     break;
                 }
             }
         }
     }
 }
예제 #3
0
 public Damage(int Ap, int Dmg, DamageEffect effect = null)
 {
     this.Ap     = Ap;
     this.Dmg    = Dmg;
     this.effect = effect;
 }