文本显示和Command大修
This commit is contained in:
@@ -18,13 +18,13 @@ namespace Continentis.Mods.Basic
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
private bool SelectCondition(CardInstance card)
|
||||
|
||||
@@ -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,12 +22,28 @@ namespace Continentis.Mods.Basic.Cards
|
||||
templates.Add(new Cmd_PlayAnimation(user.characterView, "Attack"));
|
||||
for (int i = 0; i < GetAttribute("AttackCount"); i++) //多段攻击(段数可变)情况的处理
|
||||
{
|
||||
templates.Add(new Cmd_ParamFunction<CharacterBase>(0.4f, target => user.Attack(target, GetFinalDamage(target))));
|
||||
templates.Add(new Cmd_ParamFunction<CharacterBase>(0.4f, target =>
|
||||
{
|
||||
user.Attack(target, GetFinalDamage(target));
|
||||
Debug.Log("攻击命令触发");
|
||||
}));
|
||||
}
|
||||
|
||||
CommandGroup occupiedGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(1, ()=>
|
||||
{
|
||||
Debug.Log("不插队指令,先于攻击触发,如果先执行抽牌说明插队成功");
|
||||
}));
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Sequential, templates.ToArray());
|
||||
|
||||
return mainGroup;
|
||||
CommandGroup finalGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=>
|
||||
{
|
||||
Debug.Log("不插队指令");
|
||||
}));
|
||||
CommandGroup firstGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=>
|
||||
{
|
||||
Debug.Log("插队指令,先抽牌");
|
||||
}), new Cmd_DrawCards(user.deckSubmodule, 1));
|
||||
firstGroup.insertAtFirst = true;
|
||||
|
||||
return new List<CommandBase> { occupiedGroup, mainGroup, finalGroup, firstGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class ConcentratedSpellcasting : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Buffs.ConcentratedSpellcasting>(GetAttribute("BuffStack_ConcentratedSpellcasting")).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
CreateCharacterBuff<Resonance>(GetAttribute("BuffStack_Resonance")).Apply(user, user, this);
|
||||
}));
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -15,22 +15,21 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().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_FarSighted_SelectionCommandTitle".Localize(), 1);
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
private void SelectEffect(CardInstance card)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
@@ -25,7 +25,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Burn>(GetAttribute("BuffStack_Burn")).Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class FlameInscription : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
@@ -18,7 +18,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Buffs.FlameInscription>(GetAttribute("BuffStack_FlameInscription")).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Haste : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
@@ -18,7 +18,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Buffs.Haste>().Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class IdentifyWeakness : 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"),
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Vulnerable>(GetAttribute("BuffCount_Vulnerable")).Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Scorch : 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"),
|
||||
@@ -23,7 +23,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
}
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
user.Attack(target, GetFinalDamage(target));
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
Reference in New Issue
Block a user