AttackMessage AttackHandle(IHitable target, FSMbase sender, float attackPoint) { m.FinalDamage = sender.status.getCurrentStat(STAT.AtkPoint) * attackPoint; if (tempAtkCount == 1) { m.CalcKnockBack(target, sender, 1); } if (m.CriCalculate(sender.status.getCurrentStat(STAT.CriticalPoint), sender.status.getCurrentStat(STAT.CriticalDamage))) { target.status.AddBuff(new Bleeding(5, 3, target)); } return(m); }
AttackMessage TouchHandle(IHitable target, FSMbase sender, float attackPoint) { m.effectType = EffectType.SMALL; m.critEffectType = EffectType.CRIT; m.FinalDamage = sender.status.getCurrentStat(STAT.AtkPoint) * attackPoint; if (m.CriCalculate(sender.status.getCurrentStat(STAT.CriticalPoint), sender.status.getCurrentStat(STAT.CriticalDamage))) { target.status.AddBuff(new Bleeding(5, 3, target)); } targetStuned = new Buff(3, BUFF.Stuned, target, true, true); target.status.AddBuff(targetStuned); return(m); }
public void HandleAttack(attackFunc attack, IHitable target, FSMbase sender, float attackPoint, bool cancelAttack = false, bool isKnockBack = false) { AttackMessage m = attack.Invoke(target, sender, attackPoint); if (!m.criCalculated) { m.CriCalculate(sender.status.getCurrentStat(STAT.CriticalPoint), sender.status.getCurrentStat(STAT.CriticalDamage)); } m.CalcDefense(target, sender); target.TakeAttack(m.FinalDamage, cancelAttack); if (isKnockBack) { target.TakeKnockBack(m.knockBackForce, m.knockBackDir); } var mHit = target as HitableBase; if (effectManager != null) { if (mHit == null) { effectManager.defaultEffect(target, m.isCritical ? m.critEffectType : m.effectType); } } }