Ejemplo n.º 1
0
        private void failCond(Unit target, CondEffect effect, ConditionEffectTypes effect_type, EUnitCondition condition, LogMapTrick.TargetInfo log_mt_ti)
        {
            SceneBattle instance = SceneBattle.Instance;

            if (UnityEngine.Object.op_Implicit((UnityEngine.Object)instance))
            {
                BattleCore battle = instance.Battle;
                if (battle != null)
                {
                    LogFailCondition logFailCondition = battle.Log <LogFailCondition>();
                    logFailCondition.self      = target;
                    logFailCondition.source    = (Unit)null;
                    logFailCondition.condition = condition;
                    TacticsUnitController unitController = instance.FindUnitController(target);
                    if (UnityEngine.Object.op_Implicit((UnityEngine.Object)unitController))
                    {
                        unitController.LockUpdateBadStatus(condition, false);
                    }
                }
            }
            CondAttachment condAttachment = this.createCondAttachment(target, effect, effect_type, condition);

            target.SetCondAttachment(condAttachment);
            if (log_mt_ti == null || !target.IsUnitCondition(condition))
            {
                return;
            }
            log_mt_ti.IsEffective    = true;
            log_mt_ti.FailCondition |= condition;
        }
Ejemplo n.º 2
0
        private void failCond(Unit target, CondEffect effect, ConditionEffectTypes effect_type, EUnitCondition condition)
        {
            CondAttachment condAttachment     = this.createCondAttachment(target, effect, effect_type, condition);
            CondAttachment sameCondAttachment = this.getSameCondAttachment(target, condAttachment);

            if (sameCondAttachment != null)
            {
                sameCondAttachment.turn = condAttachment.turn;
            }
            else
            {
                target.SetCondAttachment(condAttachment);
                if (!WeatherData.mIsEntryConditionLog)
                {
                    return;
                }
                SceneBattle instance = SceneBattle.Instance;
                if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instance))
                {
                    return;
                }
                BattleCore battle = instance.Battle;
                if (battle == null)
                {
                    return;
                }
                LogFailCondition logFailCondition = battle.Log <LogFailCondition>();
                logFailCondition.self      = target;
                logFailCondition.source    = (Unit)null;
                logFailCondition.condition = condition;
                TacticsUnitController unitController = instance.FindUnitController(target);
                if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)unitController))
                {
                    return;
                }
                unitController.LockUpdateBadStatus(condition, false);
            }
        }