Card爆改!

This commit is contained in:
SoulliesOfficial
2025-11-15 12:17:34 -05:00
parent 85bbe2431c
commit 5fe665d0ce
121 changed files with 838 additions and 783 deletions

View File

@@ -9,12 +9,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class BattlefieldExperience : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));

View File

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class BodyAsShield : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Protect>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -10,13 +10,13 @@ namespace Continentis.Mods.Basic.Cards
{
public class Cover : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
AddLogicComponent<CardLogicComponent_Protect>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -11,19 +11,19 @@ namespace Continentis.Mods.Basic.Cards
{
public class DivineSmite : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Attack>();
AddLogicComponent<CardLogicComponent_Protect>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target))));
foreach (CharacterBase protectTarget in CombatMainManager.Instance.characterController.GetAllAllies(user))
{

View File

@@ -9,20 +9,20 @@ namespace Continentis.Mods.Basic.Cards
{
public class EchoOfHonor : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
mainGroup.AddCommand(new Cmd_Function(() =>
{
if (user.deckSubmodule.HandPile.Exclude(this.cardInstance).TryGetRandom(out CardInstance randomHandCard))
if (user.deckSubmodule.HandPile.Exclude(this.card).TryGetRandom(out CardInstance randomHandCard))
{
CardInstance newCard = CardInstance.GenerateCardInstance(randomHandCard.cardLogic, user, "Hand");
CardInstance newCard = CardInstance.GenerateCardInstance(randomHandCard, user, "Hand");
newCard.cardLogic.SetAttribute("StaminaCost", 0);
newCard.GenerateHandCardView("Hand");
}

View File

@@ -9,12 +9,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class EstablishFormation : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);

View File

@@ -9,19 +9,19 @@ namespace Continentis.Mods.Basic.Cards
{
public class FirmBelief : CardLogicBase
{
public override void Initialize()
public override void Initialize(CardInstance card)
{
base.Initialize();
this.eventSubmodule.onInitiativeDiscard.Add("FirmBelief_PlayWhenDiscard",
new PrioritizedCheckAndEffect(() => true, () => this.Play(new List<CharacterBase>(), user)));
base.Initialize(card);
this.card.eventSubmodule.onInitiativeDiscard.Add("FirmBelief_PlayWhenDiscard",
new PrioritizedCheckAndEffect(() => true, () => card.Play(new List<CharacterBase>(), user)));
}
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = SingleCommandGroup(
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -9,7 +9,7 @@ namespace Continentis.Mods.Basic.Cards
{
public class GuardianAura : CardLogicBase
{
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class HeavySlash : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
new Cmd_ParamFunction<CharacterBase>(target =>
{
user.Attack(target, GetFinalDamage(target));
user.Attack(target, GetTargetedFinalDamage(target));
})); //对目标造成伤害
mainGroup.AddCommand(new Cmd_Function(() =>

View File

@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
{
public class IronWall : CardLogicBase
{
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class OathOfCourage : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Defense>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -9,7 +9,7 @@ namespace Continentis.Mods.Basic.Cards
{
public class OathOfHonor : CardLogicBase
{
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
new Cmd_PlayAnimation(user.characterView, "Skill"),

View File

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class Smite : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
new Cmd_ParamFunction<CharacterBase>(target =>
{
user.Attack(target, GetFinalDamage(target));
user.Attack(target, GetTargetedFinalDamage(target));
CreateCharacterBuff<Weak>(GetAttribute("WeakCount")).Apply(target, user, this);
}));

View File

@@ -9,13 +9,13 @@ namespace Continentis.Mods.Basic.Cards
{
public class UtmostStrike : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Attack>();
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
new Cmd_ParamFunction<CharacterBase>(target =>
{
user.Attack(target, GetFinalDamage(target));
user.Attack(target, GetTargetedFinalDamage(target));
})); //对目标造成伤害
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
@@ -38,7 +38,7 @@ namespace Continentis.Mods.Basic.Cards
private bool SelectCondition(CardInstance card)
{
return card.cardLogic.contentSubmodule.cardType is not CardType.Attack;
return card.contentSubmodule.cardType is not CardType.Attack;
}
private void SelectEffect(CardInstance card)