文本显示和Command大修
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
SetAttribute("DisplayHellfireStack", GetAttribute("HellfireStack"));
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
buff.Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class ArmyOfTheDead : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CharacterData minion = cardData.GetDerivativeCharacterData(0);
|
||||
CombatMainManager.Instance.characterController.AddCombatNPCs((minion, Fraction.Enemy), (minion, Fraction.Enemy));
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
SetAttribute("DisplayHellfireStack", GetAttribute("HellfireStack"));
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
buff.Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class NecromanticInfusion : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
buff.Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_LifeSteal>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
hellfireBuff?.unitedStackSubmodule.ClearAllStacks();
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override int GetFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_LifeSteal>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Parallel, ExecutionMode.Sequential,
|
||||
singleTargetGroup, singleTargetGroup, singleTargetGroup);
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class CompoundPoison : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
@@ -31,7 +31,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Corrosion>(GetAttribute("BuffStack_Corrosion") * debuffCount).Apply(target, user, this);
|
||||
})
|
||||
);
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Torture : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DrawCards(GetAttribute("DrawCardAmount")));
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
@@ -21,7 +21,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Corrosion>(GetAttribute("BuffStack_Corrosion")).Apply(target, user, this);
|
||||
}
|
||||
}));
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class WoundDeterioration : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.WoundDeterioration>(GetAttribute("BuffStack_WD")).Apply(target, user, this);
|
||||
}));
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class LessRestoration : 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
|
||||
target.combatBuffSubmodule.Dispel(BuffDispelLevel.Basic, user);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,13 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Rouse : 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"),
|
||||
new Cmd_Function(() => user.ModifyStamina(1)));
|
||||
|
||||
return mainGroup;
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ 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)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
@@ -25,7 +25,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
mainGroup.AddCommand(new Cmd_DrawCards(user.deckSubmodule, 1));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
private void SelectEffect(CardInstance card)
|
||||
|
||||
@@ -9,13 +9,13 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Whimsy : 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"),
|
||||
new Cmd_Function(() => user.ModifyMana(1)));
|
||||
|
||||
return mainGroup;
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
@@ -23,8 +23,8 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CardData holyWaterCardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(holyWaterCardData, user.team, "Hand");
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,14 +15,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Protect>();
|
||||
}
|
||||
|
||||
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"),
|
||||
new Cmd_ParamFunction<CharacterBase>((target) =>
|
||||
LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute("BuffCount_Protecting"))));
|
||||
|
||||
return mainGroup;
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Protect>();
|
||||
}
|
||||
|
||||
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"),
|
||||
@@ -24,7 +24,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
new Cmd_ParamFunction<CharacterBase>((target) =>
|
||||
LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute("BuffCount_Protecting"))));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Protect>();
|
||||
}
|
||||
|
||||
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"),
|
||||
@@ -35,7 +35,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
mainGroup.AddCommand(protectCommand);
|
||||
}
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
@@ -31,7 +31,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
Debug.LogWarning("EchoOfHonor: No other cards in hand to copy.");
|
||||
}
|
||||
}));
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Buffs.EstablishFormation>(stack, count).Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -21,14 +21,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Defense>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = SingleCommandGroup(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
new Cmd_Function(() => user.AddBlock(GetAttribute("Block"))),
|
||||
new Cmd_Function(() => user.deckSubmodule.DrawCards(GetAttribute("DrawCardAmount"))));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class GuardianAura : 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.GuardianAura>(GetAttribute("GuardianAuraCount")).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"),
|
||||
@@ -31,7 +31,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Heavy>(false, 1).Apply(user, user, this);
|
||||
})); //对使用者施加沉重状态
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class IronWall : 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<Withstand>(GetAttribute("BuffCount_Withstand")).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Defense>();
|
||||
}
|
||||
|
||||
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"),
|
||||
@@ -25,7 +25,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Consolidate>(GetAttribute("BuffCount_Consolidate")).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -9,13 +9,13 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class OathOfHonor : 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"),
|
||||
new Cmd_Function(() => user.ModifyStamina(GetAttribute("StaminaRestore"))));
|
||||
|
||||
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"),
|
||||
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CreateCharacterBuff<Weak>(GetAttribute("WeakCount")).Apply(target, user, this);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -15,7 +15,7 @@ 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)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
|
||||
|
||||
return mainGroup;
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||
@@ -131,6 +131,65 @@ namespace Continentis.MainGame.Card
|
||||
return GetFinalDamage(target, elementalTags, out _, out _, out _, out _);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取最终伤害
|
||||
/// </summary>
|
||||
/// <param name="elementalTags">元素标签,若为null则使用卡牌的元素标签</param>
|
||||
public virtual int GetUserDamage(List<string> elementalTags = null)
|
||||
{
|
||||
return GetUserDamage(elementalTags, out _, out _, out _, out _);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取在没有指定目标时的最终伤害值
|
||||
/// </summary>
|
||||
protected virtual int GetUserDamage(List<string> elementalTags,
|
||||
out float baseDamageAfterOffset, out float elementalMultiplier, out float magicMultiplier, out float finalMultiplier)
|
||||
{
|
||||
elementalTags ??= GetElementalKeywords();
|
||||
|
||||
//----计算基础伤害增量----
|
||||
int physicsOffset = 0;
|
||||
if (HasKeyword("Physics") || HasKeyword("Slash") || HasKeyword("Prick") || HasKeyword("Strike"))
|
||||
{
|
||||
physicsOffset = user.GetAttribute("PhysicsDamageDealtOffset"); //物理伤害基础增量
|
||||
}
|
||||
|
||||
int magicOffset = 0;
|
||||
if (HasKeyword("Magic") || HasKeyword("Arcane") || HasKeyword("Sorcery"))
|
||||
{
|
||||
magicOffset = user.GetAttribute("MagicDamageDealtOffset"); //魔法伤害基础增量
|
||||
}
|
||||
|
||||
Debug.Log("Magic Offset: " + magicOffset);
|
||||
|
||||
//----计算伤害因数----
|
||||
|
||||
//计算元素伤害加成,注意,“物理Physics”也是一种元素,因此下方没有“通用物理伤害加成”的计算
|
||||
elementalMultiplier = 1;
|
||||
foreach (string element in elementalTags)
|
||||
{
|
||||
elementalMultiplier *= user.GetRawAttribute(element + "DamageDealtMultiplier", 1);
|
||||
}
|
||||
|
||||
//计算通用的魔法伤害加成
|
||||
magicMultiplier = 1;
|
||||
if (HasKeyword("Magic") || HasKeyword("Arcane") || HasKeyword("Sorcery"))
|
||||
{
|
||||
magicMultiplier = user.GetRawAttribute("MagicDamageDealtMultiplier", 1);
|
||||
}
|
||||
|
||||
//计算最终伤害加成
|
||||
finalMultiplier = user.GetRawAttribute("FinalDamageDealtMultiplier", 1);
|
||||
|
||||
//----计算最终伤害----
|
||||
baseDamageAfterOffset = attributeSubmodule.GetCurrentAttribute("Damage") + physicsOffset + magicOffset;
|
||||
|
||||
float finalDamage = baseDamageAfterOffset * elementalMultiplier * magicMultiplier * finalMultiplier;
|
||||
|
||||
return Mathf.RoundToInt(finalDamage);
|
||||
}
|
||||
|
||||
protected virtual int GetFinalDamage(CharacterBase target, List<string> elementalTags,
|
||||
out float baseDamageAfterOffset, out float elementalMultiplier, out float magicMultiplier, out float finalMultiplier)
|
||||
{
|
||||
|
||||
@@ -86,10 +86,8 @@ namespace Continentis.MainGame.Card
|
||||
}
|
||||
|
||||
attributeSubmodule?.RefreshAllModifiedAttributes();
|
||||
Debug.Log(base.attachedCard.GetAttribute("Damage"));
|
||||
CardTextInterpreter.InterpretText(attachedCard);
|
||||
attachedCard.handCardView?.Setup();
|
||||
attachedCard.intentionCardView?.Setup();
|
||||
attachedCard.contentSubmodule.dirtyMark = true;
|
||||
|
||||
Debug.Log(base.attachedCard.contentSubmodule.interpretedFunctionText);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Equipment;
|
||||
using SLSFramework.General;
|
||||
using SLSFramework.UModAssistance;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.MainGame.Card
|
||||
@@ -14,6 +15,7 @@ namespace Continentis.MainGame.Card
|
||||
[Header("Reference")]
|
||||
public CardData cardData;
|
||||
public CardInstance cardInstance;
|
||||
public CompositeDisposable disposables = new CompositeDisposable();
|
||||
|
||||
public ICardOwner owner => cardInstance.owner;
|
||||
public CharacterBase user => cardInstance.user;
|
||||
@@ -82,8 +84,7 @@ namespace Continentis.MainGame.Card
|
||||
public virtual void Initialize()
|
||||
{
|
||||
RefreshCardAttributes();
|
||||
CardTextInterpreter.InterpretText(this);
|
||||
|
||||
|
||||
if (HasKeyword("Instant")) //如果是“瞬发”牌,添加抽牌后立刻打出的事件
|
||||
{
|
||||
eventSubmodule.onDraw.InsertByPriority("Instant", new PrioritizedAction(() =>
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
eventSubmodule.onUntargeting();
|
||||
}
|
||||
|
||||
contentSubmodule.dirtyMark = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -198,7 +200,7 @@ namespace Continentis.MainGame.Card
|
||||
});
|
||||
}));
|
||||
|
||||
CommandQueueManager.Instance.AddCommand(PlayEffect(targetList));
|
||||
CommandQueueManager.Instance.AddCommands(PlayEffect(targetList));
|
||||
CommandQueueManager.Instance.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
eventSubmodule.onAfterPlay.Invoke(targetList);
|
||||
@@ -225,7 +227,7 @@ namespace Continentis.MainGame.Card
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
protected virtual List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -58,8 +58,12 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
attributeGroup.ResetAttribute(attributeName);
|
||||
owner.ApplyAttributeChangesByCard();
|
||||
owner.combatBuffSubmodule.GetAttributeChange(attributeName, out float numeric, out float pAccumulation, out float pMultiplication);
|
||||
attributeGroup.ModifyAttribute(attributeName, numeric, pAccumulation, pMultiplication);
|
||||
owner.user.combatBuffSubmodule.GetGeneralAttributeChange(attributeName, out float cha_numeric, out float cha_pAccumulation, out float cha_pMultiplication);
|
||||
owner.combatBuffSubmodule.GetAttributeChange(attributeName, out float card_numeric, out float card_pAccumulation, out float card_pMultiplication);
|
||||
float final_numeric = cha_numeric + card_numeric;
|
||||
float final_pAccumulation = cha_pAccumulation + card_pAccumulation;
|
||||
float final_pMultiplication = cha_pMultiplication * card_pMultiplication;
|
||||
attributeGroup.ModifyAttribute(attributeName, final_numeric, final_pAccumulation, final_pMultiplication);
|
||||
string displayAttributeName = "Display" + attributeName;
|
||||
if(attributeGroup.current.ContainsKey(displayAttributeName))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SLSFramework.General;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.MainGame.Card
|
||||
@@ -16,6 +17,11 @@ namespace Continentis.MainGame.Card
|
||||
public string originalFunctionText;
|
||||
public string interpretedFunctionText;
|
||||
|
||||
/// <summary>
|
||||
/// 标记:内容已更改,需要刷新
|
||||
/// </summary>
|
||||
public bool dirtyMark;
|
||||
|
||||
public ContentSubmodule(CardLogicBase card) : base(card)
|
||||
{
|
||||
keywords = card.cardData.keywords;
|
||||
@@ -24,9 +30,27 @@ namespace Continentis.MainGame.Card
|
||||
originalFunctionText = card.cardData.functionText.Localize();
|
||||
cardRarity = card.cardData.cardRarity;
|
||||
cardType = card.cardData.cardType;
|
||||
dirtyMark = false;
|
||||
|
||||
Observable.EveryLateUpdate().Subscribe(_ =>
|
||||
{
|
||||
if (dirtyMark)
|
||||
{
|
||||
RefreshContent();
|
||||
dirtyMark = false;
|
||||
}
|
||||
}).AddTo(card.disposables);
|
||||
|
||||
//CardDescriptionInterpreter.InterpretDescription(card);
|
||||
//keywords = CardDescriptionInterpreter.GetKeywords(card.cardData.cardDescription);
|
||||
//Debug.Log($"Extracted Keywords: {string.Join(", ", keywords)}");
|
||||
}
|
||||
|
||||
public void RefreshContent()
|
||||
{
|
||||
CardTextInterpreter.InterpretText(owner);
|
||||
owner.handCardView?.Setup();
|
||||
owner.intentionCardView?.Setup();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,13 +76,12 @@ namespace Continentis.MainGame.Card
|
||||
if (card != null)
|
||||
{
|
||||
cardInstance = card;
|
||||
isOccupied = false;
|
||||
isHovering = false;
|
||||
isSelecting = false;
|
||||
isDuringPlaying = false;
|
||||
}
|
||||
|
||||
isOccupied = false;
|
||||
isHovering = false;
|
||||
isSelecting = false;
|
||||
isDuringPlaying = false;
|
||||
|
||||
|
||||
cardNameText.text = cardLogic.contentSubmodule.cardName;
|
||||
cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
cardImage.sprite = cardLogic.contentSubmodule.cardSprite;
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Continentis.MainGame.Card
|
||||
public override void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
base.OnPointerEnter(eventData);
|
||||
CardTextInterpreter.InterpretText(cardLogic);
|
||||
cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
cardLogic.contentSubmodule.dirtyMark = true;
|
||||
if (CombatUIManager.Instance.selectingCardView == null)
|
||||
{
|
||||
canvas.overrideSorting = true;
|
||||
@@ -114,9 +113,7 @@ namespace Continentis.MainGame.Card
|
||||
currentTargetingCharacterView = null;
|
||||
}
|
||||
|
||||
// 因为目标发生了变化(无论是选中了新的还是取消了),所以统一在这里更新描述
|
||||
CardTextInterpreter.InterpretText(cardLogic);
|
||||
cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
cardLogic.contentSubmodule.dirtyMark = true;
|
||||
}
|
||||
|
||||
Vector3 startPosition = cardTransform.position + new Vector3(0, cardTransform.rect.height * cardTransform.lossyScale.y / 2, 0);
|
||||
@@ -237,8 +234,7 @@ namespace Continentis.MainGame.Card
|
||||
canvas.overrideSorting = false;
|
||||
canvas.sortingOrder = 0;
|
||||
cardLogic.eventSubmodule.onUntargeting();
|
||||
CardTextInterpreter.InterpretText(cardLogic);
|
||||
cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
cardLogic.contentSubmodule.dirtyMark = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,8 +263,7 @@ namespace Continentis.MainGame.Card
|
||||
if (!cardLogic.Play(new List<CharacterBase>() { CombatUIManager.Instance.hoveringCharacterView.character }))
|
||||
{
|
||||
cardLogic.eventSubmodule.onUntargeting();
|
||||
CardTextInterpreter.InterpretText(cardLogic);
|
||||
cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
cardLogic.contentSubmodule.dirtyMark = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
protected override void UntargetingEffect()
|
||||
{
|
||||
card.SetAttribute("DisplayDamage", card.GetAttribute("Damage"));
|
||||
card.SetAttribute("DisplayDamage", card.GetUserDamage());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -50,12 +50,12 @@ namespace Continentis.MainGame.Character
|
||||
{
|
||||
if (attributeSubmodule.coreAttributeGroup.current.ContainsKey(attributeName))
|
||||
{
|
||||
return attributeSubmodule.GetRoundCurrentCoreAttribute(attributeName);
|
||||
return attributeSubmodule.GetCurrentCoreAttribute(attributeName);
|
||||
}
|
||||
|
||||
if (attributeSubmodule.generalAttributeGroup.current.ContainsKey(attributeName))
|
||||
{
|
||||
return attributeSubmodule.GetRoundCurrentGeneralAttribute(attributeName);
|
||||
return attributeSubmodule.GetGeneralAttribute(attributeName);
|
||||
}
|
||||
|
||||
Debug.LogWarning($"Attribute {attributeName} not found in any attribute group.");
|
||||
|
||||
@@ -93,17 +93,20 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
RefreshAttributes();
|
||||
iconSubmodule?.Update();
|
||||
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
|
||||
}
|
||||
|
||||
public override void Remove()
|
||||
{
|
||||
OnBuffRemove();
|
||||
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
|
||||
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
|
||||
}
|
||||
|
||||
public override void UntriggerRemove()
|
||||
{
|
||||
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
|
||||
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Continentis.MainGame.Character
|
||||
/// <returns>是否闪避成功</returns>
|
||||
public bool CheckDodge(int damage)
|
||||
{
|
||||
int dodge = attributeSubmodule.GetRoundCurrentGeneralAttribute("Dodge");
|
||||
int dodge = attributeSubmodule.GetGeneralAttribute("Dodge");
|
||||
|
||||
if (dodge > 0)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ namespace Continentis.MainGame.Character
|
||||
/// <returns>格挡之后的剩余伤害</returns>
|
||||
public int CheckBlock(int damage)
|
||||
{
|
||||
int block = attributeSubmodule.GetRoundCurrentGeneralAttribute("Block");
|
||||
int block = attributeSubmodule.GetGeneralAttribute("Block");
|
||||
|
||||
if (block > 0)
|
||||
{
|
||||
@@ -178,7 +178,7 @@ namespace Continentis.MainGame.Character
|
||||
/// <returns>护盾之后的剩余伤害</returns>
|
||||
public int CheckShield(int damage)
|
||||
{
|
||||
int shield = attributeSubmodule.GetRoundCurrentGeneralAttribute("Shield");
|
||||
int shield = attributeSubmodule.GetGeneralAttribute("Shield");
|
||||
|
||||
if (shield > 0)
|
||||
{
|
||||
|
||||
@@ -30,22 +30,22 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
public partial class AttributeSubmodule
|
||||
{
|
||||
public float GetCurrentCoreAttribute(string attributeName, float defaultValue = 0)
|
||||
public float GetRawCurrentCoreAttribute(string attributeName, float defaultValue = 0)
|
||||
{
|
||||
return coreAttributeGroup.current.GetValueOrDefault(attributeName, defaultValue);
|
||||
}
|
||||
|
||||
public int GetRoundCurrentCoreAttribute(string attributeName, int defaultValue = 0)
|
||||
public int GetCurrentCoreAttribute(string attributeName, int defaultValue = 0)
|
||||
{
|
||||
return coreAttributeGroup.current.GetRoundValue(attributeName, defaultValue);
|
||||
}
|
||||
|
||||
public float GetCurrentGeneralAttribute(string attributeName, float defaultValue = 0)
|
||||
public float GetRawGeneralAttribute(string attributeName, float defaultValue = 0)
|
||||
{
|
||||
return generalAttributeGroup.current.GetValueOrDefault(attributeName, defaultValue);
|
||||
}
|
||||
|
||||
public int GetRoundCurrentGeneralAttribute(string attributeName, int defaultValue = 0)
|
||||
public int GetGeneralAttribute(string attributeName, int defaultValue = 0)
|
||||
{
|
||||
return generalAttributeGroup.current.GetRoundValue(attributeName, defaultValue);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace Continentis.MainGame.Character
|
||||
/// <returns>最终概率</returns>
|
||||
public float Probability(string coreAttributeName, int requirement, bool higherPass = true, int additionalAmount = 0)
|
||||
{
|
||||
return Probability(GetRoundCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
|
||||
return Probability(GetCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -77,7 +77,7 @@ namespace Continentis.MainGame.Character
|
||||
/// <returns>本次检定是否通过</returns>
|
||||
public bool Check(string coreAttributeName, int requirement, bool higherPass = true, int additionalAmount = 0)
|
||||
{
|
||||
return Check(GetRoundCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
|
||||
return Check(GetCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
|
||||
}
|
||||
|
||||
private float Calculate(int value, int requirement)
|
||||
|
||||
@@ -110,8 +110,7 @@ namespace Continentis.MainGame.Combat
|
||||
{
|
||||
var cardLogic = intendedCard.cardInstance.cardLogic;
|
||||
cardLogic.eventSubmodule.onTargeting(intendedCard.targets[0]);
|
||||
CardTextInterpreter.InterpretText(cardLogic);
|
||||
cardLogic.intentionCardView.cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
cardLogic.contentSubmodule.dirtyMark = true;
|
||||
//TODO: 现在仅对第一个目标显示指向,后续可以对多目标进行优化
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
public void SetInfoText(CharacterBase character)
|
||||
{
|
||||
int currentValue = character.attributeSubmodule.GetRoundCurrentGeneralAttribute(currentAttributeName);
|
||||
int maximumValue = character.attributeSubmodule.GetRoundCurrentGeneralAttribute(maximumAttributeName);
|
||||
int currentValue = character.attributeSubmodule.GetGeneralAttribute(currentAttributeName);
|
||||
int maximumValue = character.attributeSubmodule.GetGeneralAttribute(maximumAttributeName);
|
||||
string displayText = currentValue + "/" + maximumValue;
|
||||
resourceText.text = displayText;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,6 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
c.user = CombatMainManager.Instance.currentCharacter;
|
||||
c.cardLogic.RefreshCardAttributes();
|
||||
CardTextInterpreter.InterpretText(c.cardLogic);
|
||||
c.handCardView.Setup(c);
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace SLSFramework.General
|
||||
|
||||
public abstract class CommandBase
|
||||
{
|
||||
public bool insertAtFirst = false;
|
||||
public CommandContext selfContext;
|
||||
|
||||
protected readonly Subject<Unit> forceCompleteSubject = new Subject<Unit>();
|
||||
|
||||
@@ -70,22 +70,27 @@ namespace SLSFramework.General
|
||||
*/
|
||||
}
|
||||
|
||||
public CommandBase AddCommand(CommandBase command, CommandContext context = null)
|
||||
public List<CommandBase> AddCommands(List<CommandBase> command, CommandContext outerContext = null)
|
||||
{
|
||||
return AddCommand(command, true, context);
|
||||
return command.Select(cmd => AddCommand(cmd, outerContext)).ToList();
|
||||
}
|
||||
|
||||
public CommandBase AddCommand(CommandBase command, bool insertAtTail, CommandContext context = null)
|
||||
public CommandBase AddCommand(CommandBase command, CommandContext context = null)
|
||||
{
|
||||
return AddCommand(command, false, context);
|
||||
}
|
||||
|
||||
public CommandBase AddCommand(CommandBase command, bool insertAtFirst, CommandContext context = null)
|
||||
{
|
||||
context ??= new CommandContext();
|
||||
// 将指令和其上下文入队
|
||||
if (insertAtTail)
|
||||
if (insertAtFirst || command.insertAtFirst)
|
||||
{
|
||||
commandQueue.AddLast(Tuple.Create(command, context));
|
||||
commandQueue.AddFirst(Tuple.Create(command, context));
|
||||
}
|
||||
else
|
||||
{
|
||||
commandQueue.AddFirst(Tuple.Create(command, context));
|
||||
commandQueue.AddLast(Tuple.Create(command, context));
|
||||
}
|
||||
|
||||
//Debug.Log($"[Queue] 添加指令: {command.GetType()},队列长度: {commandQueue.Count}");
|
||||
@@ -113,8 +118,9 @@ namespace SLSFramework.General
|
||||
|
||||
// 4. 标记为“忙碌”,并从队列中取出下一个指令。
|
||||
isBusy = true;
|
||||
var nextEntry = commandQueue.First.Value;
|
||||
Tuple<CommandBase, CommandContext> nextEntry = commandQueue.First.Value;
|
||||
commandQueue.RemoveFirst();
|
||||
Debug.Log($"[Queue] 开始执行指令: {nextEntry.Item1.GetType()},队列剩余长度: {commandQueue.Count}");
|
||||
var commandToExecute = nextEntry.Item1;
|
||||
var context = nextEntry.Item2;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -27,8 +27,8 @@ MonoBehaviour:
|
||||
modAuthor: Soullies
|
||||
modVersion: 0.0.1
|
||||
modDescription: Basic Content of Continentis
|
||||
modAssetPath: X:/Projects/Unity/Others/Soulies_Cards/Assets/Mods/Basic
|
||||
modExportPath: X:/Projects/Unity/Others/Soulies_Cards/Assets/ExportedMods
|
||||
modAssetPath: D:\Projects\Continentis\Assets\Mods\Basic
|
||||
modExportPath: D:/Projects/Continentis/Assets/ExportedMods
|
||||
modIcon: {fileID: 2800000, guid: f6735e582463aa3409372b4c7689192c, type: 3}
|
||||
logLevel: 3
|
||||
optimizeMode: 0
|
||||
|
||||
Reference in New Issue
Block a user