文本显示和Command大修

This commit is contained in:
SoulliesOfficial
2025-11-08 09:50:55 -05:00
parent 3f1e04dee7
commit b2e9e84c52
78 changed files with 293 additions and 244 deletions

View File

@@ -15,7 +15,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
ExecutionMode.Sequential,
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards
CreateCharacterBuff<Weak>().Apply(target, user, this);
}));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -16,14 +16,14 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> 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, "Card_Basic_Cohesion_SelectionCommandTitle".Localize(), 1);
return mainGroup;
return new List<CommandBase> { mainGroup };
}
private bool SelectCondition(CardInstance card)
@@ -37,8 +37,7 @@ namespace Continentis.Mods.Basic.Cards
card.cardLogic.ModifyAttribute("StaminaCost", -1);
card.cardLogic.contentSubmodule.keywords.Add("Retain");
card.cardLogic.contentSubmodule.originalFunctionText += " + $Keyword(\"Retain\")";
CardTextInterpreter.InterpretText(card.cardLogic, true);
card.handCardView.Setup();
card.cardLogic.contentSubmodule.dirtyMark = true;
}
}
}

View File

@@ -17,14 +17,14 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_SelectHandCards>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> 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 mainGroup;
return new List<CommandBase> { mainGroup };
}
public bool SelectCondition(CardInstance card)

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Defense>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Skill"),
new Cmd_Function(0.2f, () => user.AddBlock(GetAttribute("Block"))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetFinalDamage(target)))
));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_GenerateCards>().SetFilter(CardFilter);
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -29,7 +29,7 @@ namespace Continentis.Mods.Basic.Cards
}
}));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
private bool CardFilter(CardData cardData)

View File

@@ -15,7 +15,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards
new Burn(GetAttribute("BuffLayer_Burn")).Apply(target, user, this);
}));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
{
public class Guard : CardLogicBase
{
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Skill"),
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
protectingBuff.Apply(user, user, this);
}));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
}
}

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetFinalDamage(target))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
CardInstance.GenerateCardInstance(holyWaterCardData, user.team, "Hand");
}));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
}
}

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Defense>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Skill"),
new Cmd_Function(0.2f, () => user.AddBlock(GetAttribute("Block"))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetFinalDamage(target))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -15,7 +15,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards
new Blind(GetAttribute("BuffLayer_Blind")).Apply(target, user, this);
}));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -15,7 +15,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected 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))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(0.1f, target => user.Attack(target, GetFinalDamage(target))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_SelectCustomCards>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
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 mainGroup;
return new List<CommandBase> { mainGroup };
}
public void SelectEffect(CardInstance card)

View File

@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
base.PlayEffect(targetList);
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Attack"),
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetFinalDamage(target))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

@@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Attack"),
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
cmd.AddAction<CharacterBase>(0.7f, "Target", target => user.Attack(target, GetFinalDamage(target)));
}
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()

View File

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

View File

@@ -14,14 +14,14 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
protected 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))));
return mainGroup;
return new List<CommandBase> { mainGroup };
}
public override void ApplyAttributeChangesByCard()