架构大更
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
@@ -14,17 +13,16 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
CardData cardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(cardData, user.team, "Hand");
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
CardData cardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(cardData, user.team, "Hand");
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class AmbushStance : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.AmbushStance>(GetAttribute("BuffStack")).Apply(target, user, this);
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return ForEachTarget(targetList, target =>
|
||||
Cmd.After(0.05f, () =>
|
||||
CreateCharacterBuff<Buffs.AmbushStance>(GetAttribute("BuffStack")).Apply(target, user, this)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
@@ -14,28 +14,26 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup( targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
new Cmd_ParamFunction<CharacterBase>(target =>
|
||||
{
|
||||
_sharpnessCount = 0;
|
||||
if (user.combatBuffSubmodule.HasBuff<Buffs.Sharpness>())
|
||||
Cmd.Sequential(
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
_sharpnessCount = user.combatBuffSubmodule.GetBuff<Buffs.Sharpness>().unitedStackSubmodule.stackAmount;
|
||||
}
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
}),
|
||||
new Cmd_ParamFunction<CharacterBase>(target =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.Sharpness>(_sharpnessCount).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
_sharpnessCount = 0;
|
||||
if (user.combatBuffSubmodule.HasBuff<Buffs.Sharpness>())
|
||||
_sharpnessCount = user.combatBuffSubmodule.GetBuff<Buffs.Sharpness>().unitedStackSubmodule.stackAmount;
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
}),
|
||||
Cmd.Do(() =>
|
||||
CreateCharacterBuff<Buffs.Sharpness>(_sharpnessCount).Apply(user, user, this)
|
||||
)
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
@@ -14,21 +14,20 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
}));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
CreateCharacterBuff<Sharpness>(GetAttribute("BuffStack")).Apply(user, user, this);
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
CreateCharacterBuff<Sharpness>(GetAttribute("BuffStack")).Apply(user, user, this)
|
||||
));
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
|
||||
@@ -1,37 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class CompoundPoison : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
{
|
||||
CreateCharacterBuff<Weak>(GetAttribute("BuffStack_Weak")).Apply(target, user, this);
|
||||
}),
|
||||
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
Cmd.After(0.05f, () =>
|
||||
CreateCharacterBuff<Weak>(GetAttribute("BuffStack_Weak")).Apply(target, user, this)
|
||||
),
|
||||
Cmd.After(0.05f, () =>
|
||||
{
|
||||
var debuffCount = 0;
|
||||
foreach (var buff in target.combatBuffSubmodule.buffList)
|
||||
{
|
||||
if (buff.buffType == MainGame.BuffType.Negative)
|
||||
{
|
||||
debuffCount++;
|
||||
}
|
||||
}
|
||||
CreateCharacterBuff<Corrosion>(GetAttribute("BuffStack_Corrosion") * debuffCount).Apply(target, user, this);
|
||||
})
|
||||
);
|
||||
return new List<CommandBase> { mainGroup };
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Continentis.MainGame.Card;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
@@ -12,19 +12,15 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
new Cmd_ParamFunction<CharacterBase>(target =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
||||
@@ -37,7 +33,7 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
}
|
||||
return baseDamage + extraDamage;
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Default();
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class FlashTerror : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.01f, target =>
|
||||
return ForEachTarget(targetList, target =>
|
||||
Cmd.After(0.01f, () =>
|
||||
{
|
||||
if (target != user)
|
||||
{
|
||||
CreateCharacterBuff<Buffs.Vulnerable>(GetAttribute("BuffStack")).Apply(target, user, this);
|
||||
}
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class KnifeTrick : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
new Cmd_Function(() =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.KnifeTrick>(GetAttribute("BuffStack_KnifeTrick")).Apply(user, user, this);
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.Do(() =>
|
||||
CreateCharacterBuff<Buffs.KnifeTrick>(GetAttribute("BuffStack_KnifeTrick")).Apply(user, user, this)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class Stealth : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
var mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
user.deckSubmodule.ReshuffleDeck();
|
||||
}));
|
||||
mainGroup.AddCommand(user.deckSubmodule.DrawCards(GetAttribute("DrawCount")));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return Cmd.Sequential(
|
||||
Cmd.Do(() => user.deckSubmodule.ReshuffleDeck()),
|
||||
user.deckSubmodule.DrawCards(GetAttribute("DrawCount"))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class Torture : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DrawCards(GetAttribute("DrawCount")));
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.01f, target =>
|
||||
{
|
||||
CreateCharacterBuff<Corrosion>(GetAttribute("BuffStack")).Apply(target, user, this);
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
|
||||
return ForEachTarget(targetList, target =>
|
||||
Cmd.After(0.01f, () =>
|
||||
CreateCharacterBuff<Corrosion>(GetAttribute("BuffStack")).Apply(target, user, this)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
{
|
||||
public class WoundDeterioration : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.WoundDeterioration>(GetAttribute("BuffStack"), GetAttribute("DamageCount")).Apply(target, user, this);
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return ForEachTarget(targetList, target =>
|
||||
Cmd.After(0.05f, () =>
|
||||
CreateCharacterBuff<Buffs.WoundDeterioration>(GetAttribute("BuffStack"), GetAttribute("DamageCount"))
|
||||
.Apply(target, user, this)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
using Continentis.MainGame;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Cleric
|
||||
{
|
||||
public class BlessedHolyWater : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
CardData cardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(cardData, user.team, "Hand");
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
CardData cardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(cardData, user.team, "Hand");
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Cleric
|
||||
@@ -16,38 +14,36 @@ namespace Continentis.Mods.Basic.Cards.Cleric
|
||||
AddLogicComponent<CardLogicComponent_GenerateCards>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
//Get powe cards in hand
|
||||
var powerCards = new List<CardInstance>();
|
||||
foreach (var card in user.deckSubmodule.HandPile)
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
if (card.contentSubmodule.cardType == MainGame.Card.CardType.Power)
|
||||
var powerCards = new List<CardInstance>();
|
||||
foreach (var card in user.deckSubmodule.HandPile)
|
||||
{
|
||||
powerCards.Add(card);
|
||||
if (card.contentSubmodule.cardType == MainGame.Card.CardType.Power)
|
||||
powerCards.Add(card);
|
||||
}
|
||||
}
|
||||
|
||||
if (powerCards.TryGetRandom(out CardInstance randomPowerCard))
|
||||
{
|
||||
var copyCount = GetAttribute("CopyCount");
|
||||
for (int i = 0; i < copyCount; i++)
|
||||
if (powerCards.TryGetRandom(out CardInstance randomPowerCard))
|
||||
{
|
||||
CardInstance newCard = CardInstance.GenerateCardInstance(randomPowerCard, user, "Hand");
|
||||
newCard.cardLogic.SetAttribute("StaminaCost", 0);
|
||||
newCard.GenerateHandCardView("Hand");
|
||||
var copyCount = GetAttribute("CopyCount");
|
||||
for (int i = 0; i < copyCount; i++)
|
||||
{
|
||||
CardInstance newCard = CardInstance.GenerateCardInstance(randomPowerCard, user, "Hand");
|
||||
newCard.cardLogic.SetAttribute("StaminaCost", 0);
|
||||
newCard.GenerateHandCardView("Hand");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("ChainBlessing: No other power cards in hand to copy.");
|
||||
}
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("ChainBlessing: No power cards in hand to copy.");
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic
|
||||
{
|
||||
@@ -13,24 +13,22 @@ namespace Continentis.Mods.Basic
|
||||
{
|
||||
public class DivineProtection : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
|
||||
{
|
||||
user.AddBlock(GetAttribute("Block"));
|
||||
}));
|
||||
Cmd.After(0.2f, () => user.AddBlock(GetAttribute("Block")))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
{
|
||||
CreateCardBuff<Buffs.DivineProtection>(GetAttribute("BlockStack")).Apply(card, user, this);
|
||||
card.contentSubmodule.dirtyMark = true;
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return mainGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace Continentis.Mods.Basic
|
||||
{
|
||||
@@ -14,24 +13,22 @@ namespace Continentis.Mods.Basic
|
||||
{
|
||||
public class DivinePunishment : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
}));
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
{
|
||||
CreateCardBuff<Buffs.DivinePunishment>(GetAttribute("DamageStack")).Apply(card, user, this);
|
||||
card.contentSubmodule.dirtyMark = true;
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return mainGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards.Cleric
|
||||
{
|
||||
public class Faith : CardLogicBase
|
||||
{
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = user.deckSubmodule.DrawCards(GetAttribute("DrawCount"));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
return user.deckSubmodule.DrawCards(GetAttribute("DrawCount"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user