Exemple #1
0
        public CondEffect GetCondEffect(SkillEffectTargets target = SkillEffectTargets.Target)
        {
            switch (target)
            {
            case SkillEffectTargets.Target:
                return(this.mTargetCondEffect);

            case SkillEffectTargets.Self:
                return(this.mSelfCondEffect);

            default:
                return((CondEffect)null);
            }
        }
Exemple #2
0
        public int GetBuffEffectValue(ParamTypes type, SkillEffectTargets target = SkillEffectTargets.Target)
        {
            BuffEffect buffEffect = this.GetBuffEffect(target);

            if (buffEffect == null)
            {
                return(0);
            }
            BuffEffect.BuffTarget buffTarget = buffEffect[type];
            if (buffTarget == null)
            {
                return(0);
            }
            return((int)buffTarget.value);
        }
Exemple #3
0
        public int CalcBuffEffectValue(ParamTypes type, int src, SkillEffectTargets target = SkillEffectTargets.Target)
        {
            BuffEffect buffEffect = this.GetBuffEffect(target);

            if (buffEffect == null)
            {
                return(src);
            }
            BuffEffect.BuffTarget buffTarget = buffEffect[type];
            if (buffTarget == null)
            {
                return(src);
            }
            return(SkillParam.CalcSkillEffectValue(buffTarget.calcType, (int)buffTarget.value, src));
        }
Exemple #4
0
        public bool BuffSkill(ESkillTiming timing, EElement element, BaseStatus buff, BaseStatus buff_negative, BaseStatus buff_scale, BaseStatus debuff, BaseStatus debuff_negative, BaseStatus debuff_scale, RandXorshift rand = null, SkillEffectTargets buff_target = SkillEffectTargets.Target, bool is_resume = false, List <BuffEffect.BuffValues> list = null)
        {
            if (this.Timing != timing)
            {
                return(false);
            }
            BuffEffect buffEffect = this.GetBuffEffect(buff_target);

            if (buffEffect == null)
            {
                return(false);
            }
            if (!is_resume)
            {
                int rate = (int)buffEffect.param.rate;
                if (rate > 0 && rate < 100)
                {
                    DebugUtility.Assert(rand != null, "発動確率が設定されているスキルを正規タイミングで発動させたにも関わらず乱数生成器の設定がされていない");
                    if ((int)(rand.Get() % 100U) > rate)
                    {
                        return(false);
                    }
                }
            }
            if (list == null)
            {
                if (buff != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, true, false, SkillParamCalcTypes.Add, buff, (List <BuffEffect.BuffValues>)null);
                }
                if (buff_negative != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, true, true, SkillParamCalcTypes.Add, buff_negative, (List <BuffEffect.BuffValues>)null);
                }
                if (buff_scale != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Scale, buff_scale, (List <BuffEffect.BuffValues>)null);
                }
                if (debuff != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, true, false, SkillParamCalcTypes.Add, debuff, (List <BuffEffect.BuffValues>)null);
                }
                if (debuff_negative != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, true, true, SkillParamCalcTypes.Add, debuff_negative, (List <BuffEffect.BuffValues>)null);
                }
                if (debuff_scale != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Scale, debuff_scale, (List <BuffEffect.BuffValues>)null);
                }
            }
            else
            {
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Add, (BaseStatus)null, list);
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Scale, (BaseStatus)null, list);
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Add, (BaseStatus)null, list);
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Scale, (BaseStatus)null, list);
            }
            return(true);
        }
Exemple #5
0
 public int CalcBuffEffectValue(ESkillTiming timing, ParamTypes type, int src, SkillEffectTargets target = SkillEffectTargets.Target)
 {
     if (timing != this.Timing)
     {
         return(src);
     }
     return(this.CalcBuffEffectValue(type, src, target));
 }