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.
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 Execute : Skill
{
protected override void Revise ( )
{
skillName = "处决" ;
description = "趁敌人虚弱时,发起强力攻击干掉对方\n特殊效果: "
+ "噬血:杀死敌人后能够恢复生命值和法力值" ;
}
private void Start ( )
{
manaCost = 10 ;
movementCost = 7 ;
}
public override void ApplySkill ( )
{
damage = self . GetLevel ( ) * 2 + 3 ;
foreach ( var enemy in enemiesInRange )
{
if ( enemy . GetCurrentPoise ( ) = = 0 )
damage = damage * 3 + 8 ;
enemy . ChangeHealth ( - damage ) ;
self . ChangeHealth ( 5 ) ;
if ( enemy . GetCurrentHealth ( ) = = 0 )
{
self . ChangeHealth ( 15 ) ;
self . ChangeMana ( 8 ) ;
self . buffManager . AddBuff ( new AttackBuff ( 3 , 0.3f ) ) ;
}
}
}
public override void ApplySkillState ( )
{
self . SetExecute ( true ) ;
}
public override void RemoveSkillState ( )
{
self . SetExecute ( false ) ;
}
}