更新
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Base;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 初级侦测术:移除目标的 DodgeRemoveAmount 点闪避。
|
||||
/// </summary>
|
||||
public class BasicDetection : CardLogicBase
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
Cmd.Do(() => {
|
||||
int amount = GetAttribute("DodgeRemoveAmount");
|
||||
int currentDodge = target.GetAttribute(CharacterAttributes.Dodge);
|
||||
int removeAmount = UnityEngine.Mathf.Min(amount, currentDodge);
|
||||
|
||||
if (removeAmount > 0)
|
||||
{
|
||||
target.ModifyAttribute(CharacterAttributes.Dodge, -removeAmount);
|
||||
target.characterView.hudContainer.UpdateAllHUD();
|
||||
}
|
||||
})
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user