|
@@ -304,6 +304,16 @@ public class CardSource : MonoBehaviour
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
+ #region Top card of permanent in the field containing this card
|
|
|
|
|
+
|
|
|
|
|
+ public Permanent TopCardPermanent()
|
|
|
|
|
+ {
|
|
|
|
|
+ return Owner.GetFieldPermanents().Find(permanent =>
|
|
|
|
|
+ (permanent.cardSources.Contains(this)) && !IsFlipped).TopCard.PermanentOfThisCard();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
#region initialize
|
|
#region initialize
|
|
|
|
|
|
|
|
public void Init()
|
|
public void Init()
|
|
@@ -586,6 +596,7 @@ public class CardSource : MonoBehaviour
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region Assembly
|
|
#region Assembly
|
|
|
|
|
+
|
|
|
if (!isEvolution)
|
|
if (!isEvolution)
|
|
|
{
|
|
{
|
|
|
if (HasAssembly)
|
|
if (HasAssembly)
|
|
@@ -609,7 +620,7 @@ public class CardSource : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
if (selectAssemblyClass.playCard == this)
|
|
if (selectAssemblyClass.playCard == this)
|
|
|
{
|
|
{
|
|
|
- if(selectAssemblyClass.selectedAssemblyCards.Count == assemblyCondition.elementCount)
|
|
|
|
|
|
|
+ if (selectAssemblyClass.selectedAssemblyCards.Count == assemblyCondition.elementCount)
|
|
|
Cost -= assemblyCondition.reduceCost;
|
|
Cost -= assemblyCondition.reduceCost;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -617,6 +628,7 @@ public class CardSource : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
Cost = GetChangedCostItselef(Cost, root, targetPermanents, checkAvailability);
|
|
Cost = GetChangedCostItselef(Cost, root, targetPermanents, checkAvailability);
|
|
@@ -634,6 +646,7 @@ public class CardSource : MonoBehaviour
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region base play cost from entity
|
|
#region base play cost from entity
|
|
|
|
|
+
|
|
|
public int BasePlayCostFromEntity
|
|
public int BasePlayCostFromEntity
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
@@ -644,6 +657,7 @@ public class CardSource : MonoBehaviour
|
|
|
return _cEntity_Base.PlayCost;
|
|
return _cEntity_Base.PlayCost;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region get card cost of itself (refered by card effects)
|
|
#region get card cost of itself (refered by card effects)
|
|
@@ -915,7 +929,7 @@ public class CardSource : MonoBehaviour
|
|
|
|
|
|
|
|
return _EffectList;
|
|
return _EffectList;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region whether this card can declare skill
|
|
#region whether this card can declare skill
|
|
@@ -1986,6 +2000,7 @@ public class CardSource : MonoBehaviour
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region card level checked when Assembly
|
|
#region card level checked when Assembly
|
|
|
|
|
+
|
|
|
public List<int> Level_Assembly
|
|
public List<int> Level_Assembly
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
@@ -1994,14 +2009,17 @@ public class CardSource : MonoBehaviour
|
|
|
cardLevel_Assembly.Add(TreatedLevel);
|
|
cardLevel_Assembly.Add(TreatedLevel);
|
|
|
|
|
|
|
|
#region the effects of itself
|
|
#region the effects of itself
|
|
|
|
|
+
|
|
|
EffectList(EffectTiming.None)
|
|
EffectList(EffectTiming.None)
|
|
|
.Filter(cardEffect => cardEffect is IChangeCardLevelForAssemblyEffect && cardEffect.CanUse(null))
|
|
.Filter(cardEffect => cardEffect is IChangeCardLevelForAssemblyEffect && cardEffect.CanUse(null))
|
|
|
.ForEach(cardEffect => cardLevel_Assembly = ((IChangeCardLevelForAssemblyEffect)cardEffect).ChangeCardLevelForAssembly(cardLevel_Assembly, this));
|
|
.ForEach(cardEffect => cardLevel_Assembly = ((IChangeCardLevelForAssemblyEffect)cardEffect).ChangeCardLevelForAssembly(cardLevel_Assembly, this));
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
return cardLevel_Assembly;
|
|
return cardLevel_Assembly;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region whether this card has at least 1 card name checked when digixros that equals the string
|
|
#region whether this card has at least 1 card name checked when digixros that equals the string
|
|
@@ -2331,7 +2349,9 @@ public class CardSource : MonoBehaviour
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region whether this card has [Assembly]
|
|
#region whether this card has [Assembly]
|
|
|
|
|
+
|
|
|
public bool HasAssembly => assemblyCondition != null;
|
|
public bool HasAssembly => assemblyCondition != null;
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region traits
|
|
#region traits
|
|
@@ -2663,7 +2683,7 @@ public class CardSource : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
|
{
|
|
{
|
|
|
- if(_cEntity_Base == null || _cEntity_Base.HasLevel)
|
|
|
|
|
|
|
+ if (_cEntity_Base == null || _cEntity_Base.HasLevel)
|
|
|
{
|
|
{
|
|
|
if (IsFlipped && !IsBeingRevealed)
|
|
if (IsFlipped && !IsBeingRevealed)
|
|
|
return false;
|
|
return false;
|
|
@@ -2804,6 +2824,7 @@ public class CardSource : MonoBehaviour
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region Assembly requirement
|
|
#region Assembly requirement
|
|
|
|
|
+
|
|
|
public AssemblyCondition assemblyCondition
|
|
public AssemblyCondition assemblyCondition
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
@@ -2827,6 +2848,7 @@ public class CardSource : MonoBehaviour
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region whether this card can Burst digivolve
|
|
#region whether this card can Burst digivolve
|
|
@@ -3356,8 +3378,9 @@ public class CardSource : MonoBehaviour
|
|
|
get
|
|
get
|
|
|
{
|
|
{
|
|
|
return EqualsTraits("WG");
|
|
return EqualsTraits("WG");
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region whether this card has "DM" trait
|
|
#region whether this card has "DM" trait
|
|
@@ -3369,7 +3392,7 @@ public class CardSource : MonoBehaviour
|
|
|
return EqualsTraits("DM");
|
|
return EqualsTraits("DM");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region whether this card has "CS" trait
|
|
#region whether this card has "CS" trait
|
|
@@ -3419,10 +3442,34 @@ public class CardSource : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region whether this card has "Sea Animal" trait
|
|
|
|
|
+
|
|
|
|
|
+ public bool HasSeaAnimalTraits
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ return EqualsTraits("Sea Animal");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region whether this card has "Puppet" trait
|
|
|
|
|
+
|
|
|
|
|
+ public bool HasPuppetTraits
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ return EqualsTraits("Puppet");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public class JogressCondition
|
|
public class JogressCondition
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
public JogressCondition(JogressConditionElement[] elements, int cost)
|
|
public JogressCondition(JogressConditionElement[] elements, int cost)
|
|
|
{
|
|
{
|
|
@@ -3562,6 +3609,7 @@ public class AssemblyCondition
|
|
|
this.elementCount = elementCount;
|
|
this.elementCount = elementCount;
|
|
|
this.reduceCost = reduceCost;
|
|
this.reduceCost = reduceCost;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
public AssemblyConditionElement element { get; private set; } = new AssemblyConditionElement(null);
|
|
public AssemblyConditionElement element { get; private set; } = new AssemblyConditionElement(null);
|
|
|
public Func<List<CardSource>, CardSource, bool> CanTargetCondition_ByPreSelecetedList { get; private set; } = null;
|
|
public Func<List<CardSource>, CardSource, bool> CanTargetCondition_ByPreSelecetedList { get; private set; } = null;
|
|
|
|
|
|
|
@@ -3578,6 +3626,7 @@ public class AssemblyConditionElement
|
|
|
|
|
|
|
|
this.skipAllIfNoSelect = skipAllIfNoSelect;
|
|
this.skipAllIfNoSelect = skipAllIfNoSelect;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
public Func<CardSource, bool> CardCondition { get; private set; } = null;
|
|
public Func<CardSource, bool> CardCondition { get; private set; } = null;
|
|
|
public bool skipAllIfNoSelect { get; private set; } = false;
|
|
public bool skipAllIfNoSelect { get; private set; } = false;
|
|
|
}
|
|
}
|