예제 #1
0
        private bool actionHeal(Unit target, LogMapTrick.TargetInfo log_mt_ti)
        {
            int num = 0;

            if (!target.IsUnitCondition(EUnitCondition.DisableHeal))
            {
                int val = this.calcHeal(target);
                num = target.CalcParamRecover(val);
            }
            if (num < 0)
            {
                return(false);
            }
            target.Heal(num);
            if (log_mt_ti != null)
            {
                log_mt_ti.IsEffective = true;
                log_mt_ti.Heal        = num;
            }
            return(true);
        }
예제 #2
0
        public void ExecuteGimmickEffect(Unit gimmick, Unit target, LogMapEvent log = null)
        {
            switch (this.GimmickType)
            {
            case EEventGimmick.Heal:
                int num = 0;
                if (!target.IsUnitCondition(EUnitCondition.DisableHeal))
                {
                    int hp  = (int)target.MaximumStatus.param.hp;
                    int val = hp * this.IntValue / 100;
                    num = Math.Min(target.CalcParamRecover(val), hp - (int)target.CurrentStatus.param.hp);
                }
                target.Heal(num);
                if (log == null)
                {
                    break;
                }
                log.heal = num;
                break;

            case EEventGimmick.AtkUp:
            case EEventGimmick.DefUp:
            case EEventGimmick.MagUp:
            case EEventGimmick.MndUp:
            case EEventGimmick.RecUp:
            case EEventGimmick.SpdUp:
            case EEventGimmick.CriUp:
            case EEventGimmick.LukUp:
            case EEventGimmick.MovUp:
                BuffAttachment buff = this.MakeBuff(gimmick, target);
                target.SetBuffAttachment(buff, false);
                if (log == null)
                {
                    break;
                }
                BattleCore.SetBuffBits(buff.status, ref log.buff, ref log.debuff);
                break;
            }
        }