|
|
@@ -7,7 +7,7 @@ using UnityEngine;
|
|
|
public partial class CardEffectFactory
|
|
|
{
|
|
|
#region Trigger effect of [Raid] on oneself
|
|
|
- public static ActivateClass RaidSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, ICardEffect rootCardEffect = null)
|
|
|
+ public static ActivateClass RaidSelfEffect(bool isInheritedEffect, CardSource card, Func<bool> condition, ICardEffect rootCardEffect = null, bool isLinkedEffect = false)
|
|
|
{
|
|
|
Permanent targetPermanent = card.PermanentOfThisCard();
|
|
|
|
|
|
@@ -24,12 +24,12 @@ public partial class CardEffectFactory
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- return RaidEffect(targetPermanent: targetPermanent, isInheritedEffect: isInheritedEffect, condition: CanUseCondition, rootCardEffect: rootCardEffect, card);
|
|
|
+ return RaidEffect(targetPermanent: targetPermanent, isInheritedEffect: isInheritedEffect, condition: CanUseCondition, rootCardEffect: rootCardEffect, card, isLinkedEffect: isLinkedEffect);
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
#region Trigger effect of [Raid]
|
|
|
- public static ActivateClass RaidEffect(Permanent targetPermanent, bool isInheritedEffect, Func<bool> condition, ICardEffect rootCardEffect, CardSource card)
|
|
|
+ public static ActivateClass RaidEffect(Permanent targetPermanent, bool isInheritedEffect, Func<bool> condition, ICardEffect rootCardEffect, CardSource card, bool isLinkedEffect = false)
|
|
|
{
|
|
|
if (targetPermanent == null) return null;
|
|
|
if (targetPermanent.TopCard == null) return null;
|
|
|
@@ -39,10 +39,12 @@ public partial class CardEffectFactory
|
|
|
activateClass.SetUpICardEffect("Raid", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, DataBase.RaidEffectDiscription());
|
|
|
activateClass.SetIsInheritedEffect(isInheritedEffect);
|
|
|
+ activateClass.SetIsLinkedEffect(isLinkedEffect);
|
|
|
|
|
|
if (rootCardEffect != null)
|
|
|
{
|
|
|
activateClass.SetIsInheritedEffect(false);
|
|
|
+ activateClass.SetIsLinkedEffect(false);
|
|
|
activateClass.SetEffectSourcePermanent(targetPermanent);
|
|
|
activateClass.SetRootCardEffect(rootCardEffect);
|
|
|
}
|