架构大更
This commit is contained in:
@@ -4,7 +4,6 @@ using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -15,24 +14,24 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
ExecutionMode.Sequential,
|
||||
ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.1f, target =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
CreateCharacterBuff<Weak>().Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return ForEachTarget(
|
||||
targetList,
|
||||
target => Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.1f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
CreateCharacterBuff<Weak>().Apply(target, user, this);
|
||||
})
|
||||
),
|
||||
ExecutionMode.Sequential);
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Strike();
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Strike();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.General.Skills
|
||||
{
|
||||
@@ -16,14 +14,13 @@ namespace Continentis.Mods.Basic.Cards.General.Skills
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
CommandGroup mainGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>()
|
||||
.AddSelectionCommands(ref mainGroup, "Card_Basic_Cohesion_SelectionCommandTitle".Localize(), 1);
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
private bool SelectCondition(CardInstance card)
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -17,14 +14,13 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup, "Select at most 3 Status or Curse cards to be exhausted.", 3);
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
CommandGroup mainGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>()
|
||||
.AddSelectionCommands(ref mainGroup, "Select at most 3 Status or Curse cards to be exhausted.", 3);
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
public bool SelectCondition(CardInstance card)
|
||||
@@ -32,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CardType type = card.contentSubmodule.cardType;
|
||||
return type == CardType.Status || type == CardType.Curse;
|
||||
}
|
||||
|
||||
|
||||
public void SelectEffect(CardInstance card)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(card.deck.ExhaustCard(card));
|
||||
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,21 +13,24 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Sequential,
|
||||
new CommandGroup(ExecutionMode.Parallel,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
|
||||
// 对每个目标顺序执行两段攻击,每段各播一次动画
|
||||
return ForEachTarget(
|
||||
targetList,
|
||||
target => Cmd.Sequential(
|
||||
Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
),
|
||||
new CommandGroup(ExecutionMode.Parallel,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
)
|
||||
),
|
||||
ExecutionMode.Sequential);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,22 +13,19 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>().SetFilter(CardFilter);
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
List<CardData> filtered = LogicComponent<CardLogicComponent_GenerateCards>().GetFilteredGlobalCardData();
|
||||
if(filtered.TryGetRandom(out CardData cardData))
|
||||
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
CardInstance.GenerateCardInstance(cardData, user, "Hand").GenerateHandCardView("Hand");
|
||||
}
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
List<CardData> filtered = LogicComponent<CardLogicComponent_GenerateCards>().GetFilteredGlobalCardData();
|
||||
if (filtered.TryGetRandom(out CardData cardData))
|
||||
CardInstance.GenerateCardInstance(cardData, user, "Hand").GenerateHandCardView("Hand");
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
private bool CardFilter(CardData cardData)
|
||||
|
||||
@@ -4,7 +4,6 @@ using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -15,19 +14,18 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
|
||||
Cmd.After(0.2f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
new Burn(GetAttribute("BuffLayer_Burn")).Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
})
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -4,25 +4,23 @@ using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Guard : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
new Cmd_ParamFunction<CharacterBase>((target) =>
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
Protected protectedBuff = CreateCharacterBuff<Protected>();
|
||||
protectedBuff.Apply(target, user, this);
|
||||
Protecting protectingBuff = CreateCharacterBuff<Protecting>(target, GetAttribute("BuffCount_Protecting"), protectedBuff);
|
||||
protectingBuff.Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
})
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,17 +13,16 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Prick();
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -16,19 +13,18 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
CardData holyWaterCardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(holyWaterCardData, user.team, "Hand");
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
CardData holyWaterCardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(holyWaterCardData, user.team, "Hand");
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,15 +13,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Defense>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = SingleCommandGroup(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
new Cmd_Function(0.2f, () => user.AddBlock(GetAttribute("Block"))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.After(0.2f, () => user.AddBlock(GetAttribute("Block")))
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,15 +10,11 @@ namespace Continentis.Mods.Basic.Cards
|
||||
base.Initialize(card);
|
||||
this.card.eventSubmodule.onActionEnd.Add("Basic_Oblivion_ExhaustCard", new PrioritizedAction(() =>
|
||||
{
|
||||
List<CardInstance> handPile = user.deckSubmodule.HandPile;
|
||||
var handPile = user.deckSubmodule.HandPile;
|
||||
|
||||
if (handPile.Contains(card))
|
||||
{
|
||||
if (handPile.Filtered(CardFilter).TryGetRandom(out CardInstance randomCard))
|
||||
{
|
||||
if (handPile.Filtered(CardFilter).TryGetRandom(out var randomCard))
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(randomCard));
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,17 +13,16 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.1f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Prick();
|
||||
|
||||
@@ -4,7 +4,6 @@ using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -15,19 +14,18 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
|
||||
Cmd.After(0.2f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
new Blind(GetAttribute("BuffLayer_Blind")).Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
})
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -3,8 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -15,15 +13,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,17 +13,16 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.1f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Prick();
|
||||
|
||||
@@ -3,7 +3,6 @@ using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -14,17 +13,16 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_SelectCustomCards>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
CommandGroup mainGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
List<CardInstance> discardedCards = user.deckSubmodule.DiscardPile;
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectCustomCards>()
|
||||
.AddSelectionCommands(ref mainGroup, discardedCards, "Select a non-status or non-curse card.", 1);
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
|
||||
public void SelectEffect(CardInstance card)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(new Cmd_DrawCards(card.deck, new List<CardInstance>() { card }, 0.1f));
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using SLSFramework.UModAssistance;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
@@ -16,19 +13,16 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
// 旧版使用 Cmd_PlayAnimation.AddAction 在动画 70% 处注入伤害,
|
||||
// 现改为 Cmd.Parallel 同步触发动画与延迟伤害,保留 0.7s 等效延迟
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"));
|
||||
|
||||
foreach (Cmd_PlayAnimation cmd in mainGroup.GetAllCommands<Cmd_PlayAnimation>())
|
||||
{
|
||||
cmd.AddAction<CharacterBase>(0.7f, "Target", target => user.Attack(target, GetTargetedFinalDamage(target)));
|
||||
}
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
Cmd.After(0.7f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -2,20 +2,15 @@ using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class ThinkingCountermeasures : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
user.deckSubmodule.DrawCards(GetAttribute("DrawCardAmount")));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return user.deckSubmodule.DrawCards(GetAttribute("DrawCardAmount"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,32 +14,30 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
|
||||
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
||||
{
|
||||
float baseDamageFromSuppress = 0;
|
||||
|
||||
|
||||
if (target is CombatNPC npc && user.IsOpponent(npc))
|
||||
{
|
||||
baseDamageFromSuppress = npc.actionCountThisRound == 0 ? 4f : 0f;
|
||||
}
|
||||
|
||||
|
||||
base.GetFinalDamage(target, elementalTags, out float baseDamageAfterOffset, out float elementalAmplifier, out float magicAmplifier, out float finalAmplifier);
|
||||
|
||||
|
||||
float finalDamage = (baseDamageAfterOffset + baseDamageFromSuppress) * elementalAmplifier * magicAmplifier * finalAmplifier;
|
||||
|
||||
return Mathf.RoundToInt(finalDamage);
|
||||
|
||||
Reference in New Issue
Block a user