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.

46 lines
1.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ForceMove : Skill
{
protected override void Revise()
{
skillName = "虚无的牵引";
description = "将前方的敌人向自己拖拽,敌人会难以移动\n特殊效果“招架”敌人攻击时将会受到生命伤害和韧性伤害";
}
Buff parry = new Parry();
private void Start()
{
manaCost = 8;
movementCost = 12;
}
public override void ApplySkill()
{
Vector2 reverse = self.GetLookDirection();
if(reverse == Vector2.up) reverse = Vector2.down;
else if(reverse == Vector2.down) reverse = Vector2.up;
else if(reverse == Vector2.left) reverse = Vector2.right;
else if(reverse == Vector2.right) reverse = Vector2.left;
foreach(var enemy in enemiesInRange)
{
if(enemy.groupNumber != self.groupNumber)
{
enemy.ForceMove(reverse);
enemy.ForceMove(reverse);
enemy.ForceMove(reverse);
Buff movementDebuff = new MovementBuff(1, -2);
enemy.buffManager.AddBuff(movementDebuff);
}
}
}
public override void ApplySkillState()
{
self.buffManager.AddSpecial(parry);
}
public override void RemoveSkillState()
{
self.buffManager.RemoveSpecial(parry);
}
}