示例#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;
        }
 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;
 }