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

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class Bludgeon : 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,
ExecutionMode.Sequential,
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.1f, target =>
{
user.Attack(target, GetFinalDamage(target));
user.Attack(target, GetTargetedFinalDamage(target));
CreateCharacterBuff<Weak>().Apply(target, user, this);
}));

View File

@@ -11,12 +11,12 @@ namespace Continentis.Mods.Basic.Cards.General.Skills
{
public class Cohesion : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
@@ -28,16 +28,16 @@ namespace Continentis.Mods.Basic.Cards.General.Skills
private bool SelectCondition(CardInstance card)
{
CardType type = card.cardLogic.contentSubmodule.cardType;
CardType type = card.contentSubmodule.cardType;
return type != CardType.Status && type != CardType.Curse;
}
private void SelectEffect(CardInstance card)
{
card.cardLogic.ModifyAttribute("StaminaCost", -1);
card.cardLogic.contentSubmodule.keywords.Add("Retain");
card.cardLogic.contentSubmodule.originalFunctionText += " + $Keyword(\"Retain\")";
card.cardLogic.contentSubmodule.dirtyMark = true;
card.ModifyAttribute("StaminaCost", -1);
card.contentSubmodule.keywords.Add("Retain");
card.contentSubmodule.originalFunctionText += " + $Keyword(\"Retain\")";
card.contentSubmodule.dirtyMark = true;
}
}
}

View File

@@ -12,12 +12,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class CommonHolyWater : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_SelectHandCards>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
@@ -29,7 +29,7 @@ namespace Continentis.Mods.Basic.Cards
public bool SelectCondition(CardInstance card)
{
CardType type = card.cardLogic.contentSubmodule.cardType;
CardType type = card.contentSubmodule.cardType;
return type == CardType.Status || type == CardType.Curse;
}

View File

@@ -9,12 +9,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class Defense : 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,23 +9,23 @@ namespace Continentis.Mods.Basic.Cards
{
public class DualStrike : 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)
{
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, GetFinalDamage(target)))
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target)))
),
new CommandGroup(ExecutionMode.Parallel,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetFinalDamage(target)))
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target)))
));
return new List<CommandBase> { mainGroup };

View File

@@ -7,10 +7,10 @@ namespace Continentis.Mods.Basic.Cards
{
public class Faint : CardLogicBase
{
public override void Initialize()
public override void Initialize(CardInstance card)
{
base.Initialize();
eventSubmodule.onDraw.Add("Basic_Faint", new PrioritizedAction(() =>
base.Initialize(card);
this.card.eventSubmodule.onDraw.Add("Basic_Faint", new PrioritizedAction(() =>
{
user.ModifyStamina(-1);
}));

View File

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

View File

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class FireBolt : 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)
{
base.PlayEffect(targetList);
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
{
user.Attack(target, GetFinalDamage(target));
user.Attack(target, GetTargetedFinalDamage(target));
new Burn(GetAttribute("BuffLayer_Burn")).Apply(target, user, this);
}));

View File

@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
{
public class Guard : CardLogicBase
{
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,18 +9,18 @@ namespace Continentis.Mods.Basic.Cards
{
public class HiddenBlade : 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)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
return new List<CommandBase> { mainGroup };
}

View File

@@ -11,12 +11,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class HolyWaterPreparation : 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)
{
base.PlayEffect(targetList);

View File

@@ -9,12 +9,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class MudBarrier : 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,14 +9,14 @@ namespace Continentis.Mods.Basic.Cards
{
public partial class Oblivion : CardLogicBase
{
public override void Initialize()
public override void Initialize(CardInstance card)
{
base.Initialize();
eventSubmodule.onActionEnd.Add("Basic_Oblivion_ExhaustCard", new PrioritizedAction(() =>
base.Initialize(card);
this.card.eventSubmodule.onActionEnd.Add("Basic_Oblivion_ExhaustCard", new PrioritizedAction(() =>
{
List<CardInstance> handPile = user.deckSubmodule.HandPile;
if (handPile.Contains(cardInstance))
if (handPile.Contains(card))
{
if (handPile.Filtered(CardFilter).TryGetRandom(out CardInstance randomCard))
{
@@ -31,7 +31,7 @@ namespace Continentis.Mods.Basic.Cards
{
private static bool CardFilter(CardInstance card)
{
return card.cardLogic.contentSubmodule.cardType is not CardType.Status and not CardType.Curse;
return card.contentSubmodule.cardType is not CardType.Status and not CardType.Curse;
}
}
}

View File

@@ -9,18 +9,18 @@ namespace Continentis.Mods.Basic.Cards
{
public class Prick : 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)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetTargetedFinalDamage(target))));
return new List<CommandBase> { mainGroup };
}

View File

@@ -10,12 +10,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class RadiantBolt : 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)
{
base.PlayEffect(targetList);
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
{
user.Attack(target, GetFinalDamage(target));
user.Attack(target, GetTargetedFinalDamage(target));
new Blind(GetAttribute("BuffLayer_Blind")).Apply(target, user, this);
}));

View File

@@ -10,18 +10,18 @@ namespace Continentis.Mods.Basic.Cards
{
public class RayOfFrost : 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)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
return new List<CommandBase> { mainGroup };
}

View File

@@ -9,18 +9,18 @@ namespace Continentis.Mods.Basic.Cards
{
public class RecklessAssault : 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)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetTargetedFinalDamage(target))));
return new List<CommandBase> { mainGroup };
}

View File

@@ -9,12 +9,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class Recollection : CardLogicBase
{
protected override void SetUpLogicComponents()
public override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_SelectCustomCards>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards
public void SelectEffect(CardInstance card)
{
CommandQueueManager.Instance.AddCommand(new Cmd_DrawCards(owner.deckSubmodule, new List<CardInstance>() { card }, 0.1f));
CommandQueueManager.Instance.AddCommand(new Cmd_DrawCards(card.deck, new List<CardInstance>() { card }, 0.1f));
}
}
}

View File

@@ -9,18 +9,18 @@ namespace Continentis.Mods.Basic.Cards
{
public class Slash : 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)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target))));
return new List<CommandBase> { mainGroup };
}

View File

@@ -11,12 +11,12 @@ namespace Continentis.Mods.Basic.Cards
{
public class Strike : 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"),
@@ -25,7 +25,7 @@ namespace Continentis.Mods.Basic.Cards
foreach (Cmd_PlayAnimation cmd in mainGroup.GetAllCommands<Cmd_PlayAnimation>())
{
cmd.AddAction<CharacterBase>(0.7f, "Target", target => user.Attack(target, GetFinalDamage(target)));
cmd.AddAction<CharacterBase>(0.7f, "Target", target => user.Attack(target, GetTargetedFinalDamage(target)));
}
return new List<CommandBase> { mainGroup };

View File

@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
{
public class ThinkingCountermeasures : CardLogicBase
{
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
user.deckSubmodule.DrawCards(GetAttribute("DrawCardAmount")));

View File

@@ -9,17 +9,17 @@ namespace Continentis.Mods.Basic.Cards
{
public class WindBlade : 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)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetFinalDamage(target))));
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
return new List<CommandBase> { mainGroup };
}
@@ -29,7 +29,7 @@ namespace Continentis.Mods.Basic.Cards
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
}
public override int GetFinalDamage(CharacterBase target, List<string> elementalTags = null)
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
{
float baseDamageFromSuppress = 0;