You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
762 B
24 lines
762 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "Crash", menuName = "AISkill/Crash")]
|
|
public class Crash : AISkill
|
|
{
|
|
Buff defenceDown = new DefenceBuff(2 , -0.3f);
|
|
public override void ApplySkill(Character self, Character goal)
|
|
{
|
|
self.ChangeMovement(-movementCost);
|
|
self.ChangeMana(-manaCost);
|
|
goal.buffManager.AddBuff(defenceDown);
|
|
goal.ChangeHealth(-self.str * 3 + self.dex * 2);
|
|
goal.ChangePoise(-self.str * 2);
|
|
}
|
|
public override bool CheckRequest(int mana, int movement, Character goal)
|
|
{
|
|
if(goal.GetCurrentPoise() > 0 && mana >= manaCost && movement >= movementCost)
|
|
return true;
|
|
return false;
|
|
}
|
|
}
|