예제 #1
0
        //攻击全面加成计算
        public static AttackEffect attackEffect(Role source, Role target, AttackEffect attackEffect, AttackResult result)
        {
            AttackEffect ad = new AttackEffect(attackEffect);

            //攻击方天赋
            foreach (string talentKey in source.Talents)
            {
                if (!talentDic.ContainsKey(talentKey))
                {
                    continue;
                }
                foreach (Talent talent in talentDic[talentKey].talents)
                {
                    if (talent.shouldJudge(TalentEffectEnum.attackEffect) && talent.JudgeConditions(source, target, uihost))
                    {
                        if (talent.showword.word.Count != 0)
                        {
                            CommonSettings.SetSourceCastInfo(talent.showword.word.ToArray(), result, talent.showword.probability);
                        }
                        foreach (TalentEffect effect in talent.effects)
                        {
                            ad = effect.attackEffect(source, target, ad);
                        }
                    }
                }
            }

            return(ad);
        }
예제 #2
0
        //攻击加成效果
        public AttackEffect attackEffect(Role source, Role target, AttackEffect attackEffect)
        {
            AttackEffect ad = new AttackEffect(attackEffect);

            if (effectEnum == TalentEffectEnum.attackEffect)
            {
                ad.attackHigh  *= double.Parse(value);
                ad.attackLow   *= double.Parse(value);
                ad.criticalHit *= double.Parse(value);
            }

            return(ad);
        }
예제 #3
0
 public AttackEffect(AttackEffect attackEffect)
 {
     this.attackHigh  = attackEffect.attackHigh;
     this.attackLow   = attackEffect.attackLow;
     this.criticalHit = attackEffect.criticalHit;
 }