示例#1
0
        private CondAttachment createCondAttachment(Unit target, CondEffect effect, ConditionEffectTypes type, EUnitCondition condition)
        {
            if (type == ConditionEffectTypes.None)
            {
                return((CondAttachment)null);
            }
            if (effect == null)
            {
                return((CondAttachment)null);
            }
            CondAttachment condAttachment = new CondAttachment(effect.param);

            condAttachment.user         = (Unit)null;
            condAttachment.skill        = (SkillData)null;
            condAttachment.skilltarget  = SkillEffectTargets.Self;
            condAttachment.CondId       = effect.param.iname;
            condAttachment.IsPassive    = (OBool)false;
            condAttachment.UseCondition = ESkillCondition.None;
            condAttachment.CondType     = type;
            condAttachment.Condition    = condition;
            condAttachment.turn         = effect.turn;
            condAttachment.CheckTiming  = effect.param.chk_timing;
            condAttachment.CheckTarget  = target;
            if (condAttachment.IsFailCondition())
            {
                condAttachment.IsCurse = effect.IsCurse;
            }
            condAttachment.SetupLinkageBuff();
            return(condAttachment);
        }
示例#2
0
        private CondAttachment createCondAttachment(Unit target, CondEffect effect, ConditionEffectTypes type, EUnitCondition condition)
        {
            if (type == ConditionEffectTypes.None)
            {
                return((CondAttachment)null);
            }
            CondAttachment condAttachment = new CondAttachment();

            condAttachment.user         = (Unit)null;
            condAttachment.skill        = (SkillData)null;
            condAttachment.IsPassive    = (OBool)(effect.param.chk_timing == EffectCheckTimings.Eternal);
            condAttachment.UseCondition = ESkillCondition.Weather;
            condAttachment.CondType     = type;
            condAttachment.Condition    = condition;
            int num = (int)effect.turn;

            if (num < 2)
            {
                num = 2;
            }
            condAttachment.turn        = (OInt)num;
            condAttachment.CheckTiming = effect.param.chk_timing;
            condAttachment.CheckTarget = target;
            if (condAttachment.IsFailCondition())
            {
                condAttachment.IsCurse = effect.IsCurse;
            }
            return(condAttachment);
        }