|
|
@@ -12,6 +12,7 @@ public class Lampmon_BT12_044 : CEntity_Effect
|
|
|
{
|
|
|
List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
+ #region When Digivolving
|
|
|
if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
@@ -83,56 +84,39 @@ public class Lampmon_BT12_044 : CEntity_Effect
|
|
|
activateClass: activateClass));
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- if (timing == EffectTiming.None)
|
|
|
- {
|
|
|
- int count()
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ //Initial check for your turn effect
|
|
|
+
|
|
|
+ int count()
|
|
|
{
|
|
|
return card.Owner.Enemy.GetBattleAreaDigimons().Count((permanent) => permanent.HasSecurityAttackChanges);
|
|
|
}
|
|
|
|
|
|
- return 0;
|
|
|
- }
|
|
|
+ List<ICardEffect> SecFromLamp = card.PermanentOfThisCard().EffectList(EffectTiming.None).Where(x => x.HashString == "SecAttackFromLampEffect").ToList();
|
|
|
|
|
|
- bool PermanentCondition(Permanent permanent)
|
|
|
- {
|
|
|
- if(CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
- {
|
|
|
- if (permanent == card.PermanentOfThisCard())
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
- bool Condition()
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ if (count() > SecFromLamp.Count())
|
|
|
{
|
|
|
- if (CardEffectCommons.IsOwnerTurn(card))
|
|
|
+ int timesToRunLoop = count() - SecFromLamp.Count();
|
|
|
+
|
|
|
+ for (int i = 0; i < timesToRunLoop; i++)
|
|
|
{
|
|
|
- if (count() >= 1)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonSAttack(
|
|
|
+ targetPermanent: card.PermanentOfThisCard(),
|
|
|
+ changeValue: 1,
|
|
|
+ effectDuration: EffectDuration.UntilEachTurnEnd,
|
|
|
+ activateClass: activateClass,
|
|
|
+ activateAnimation: false,
|
|
|
+ hashstring: "SecAttackFromLampEffect"));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- return false;
|
|
|
}
|
|
|
-
|
|
|
- cardEffects.Add(CardEffectFactory.ChangeSAttackStaticEffect<Func<int>>(PermanentCondition, changeValue: () => 1 * count(), isInheritedEffect: false, card: card, condition: Condition));
|
|
|
}
|
|
|
+ #endregion
|
|
|
|
|
|
- /*
|
|
|
- if (timing == EffectTiming.AfterEffectsActivate || timing == EffectTiming.OnStartTurn || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnUseOption)
|
|
|
+ #region Your Turn
|
|
|
+ if (timing == EffectTiming.AfterEffectsActivate || timing == EffectTiming.OnStartTurn || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnUseOption || timing == EffectTiming.OptionSkill || timing == EffectTiming.SecuritySkill)
|
|
|
{
|
|
|
-
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
activateClass.SetUpICardEffect("Gain Security Attack", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
@@ -172,33 +156,27 @@ public class Lampmon_BT12_044 : CEntity_Effect
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
- if (card.PermanentOfThisCard().Strike < count())
|
|
|
- {
|
|
|
- for (int i = 0; i <= count(); i++)
|
|
|
- {
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectFactory.ChangeSAttackStaticEffect(
|
|
|
- targetPermanent: card.PermanentOfThisCard(),
|
|
|
- changeValue: 1,
|
|
|
- effectDuration: EffectDuration.UntilEachTurnEnd,
|
|
|
- activateClass: activateClass, activateAnimation: false));
|
|
|
- }
|
|
|
- }
|
|
|
+ List<ICardEffect> SecFromLamp = card.PermanentOfThisCard().EffectList(EffectTiming.None).Where(x => x.HashString == "SecAttackFromLampEffect").ToList();
|
|
|
|
|
|
- if(card.PermanentOfThisCard().Strike > count())
|
|
|
+ if(count() > SecFromLamp.Count())
|
|
|
{
|
|
|
- for(int i= 0; i <= count();i++)
|
|
|
+ int timesToRunLoop = count() - SecFromLamp.Count();
|
|
|
+
|
|
|
+ for (int i = 0; i < timesToRunLoop; i++)
|
|
|
{
|
|
|
yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonSAttack(
|
|
|
targetPermanent: card.PermanentOfThisCard(),
|
|
|
- changeValue: -1,
|
|
|
+ changeValue: 1,
|
|
|
effectDuration: EffectDuration.UntilEachTurnEnd,
|
|
|
- activateClass: activateClass, activateAnimation: false));
|
|
|
+ activateClass: activateClass,
|
|
|
+ activateAnimation: false,
|
|
|
+ hashstring: "SecAttackFromLampEffect"));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
- */
|
|
|
+ #endregion
|
|
|
+
|
|
|
return cardEffects;
|
|
|
}
|
|
|
}
|