예제 #1
0
 public bool CheckTurnip(StatusInstance si)
 {
     if (si.Status.StatusType == StatusType.Frail)
     {
         if (Relics.Any(el => el.Name == nameof(Turnip)))
         {
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
        internal override void Play(EffectSet ef, Player player, IEnemy enemy, int upgradeCount, IList <CardInstance> targets = null, Deck deck = null, long?key = null)
        {
            var exi = player.StatusInstances.SingleOrDefault(el => el.Status.StatusType == StatusType.Strength);

            if (exi == null)
            {
            }
            else
            {
                //we could just double this in place but cleaner to reapply the same status
                var statusCopy = new StatusInstance(exi.Status, exi.Intensity);
                ef.PlayerEffect.Status.Add(statusCopy);
            }
        }
예제 #3
0
        internal override void Play(EffectSet ef, Player player, IEnemy enemy, int upgradeCount, IList <CardInstance> targets = null, Deck deck = null, long?key = null)
        {
            int            dmg;
            StatusInstance si;

            if (upgradeCount == 0)
            {
                dmg = 12;
                si  = new StatusInstance(new Weak(), 2);
            }
            else
            {
                dmg = 14;
                si  = new StatusInstance(new Weak(), 3);
            }
            ef.EnemyEffect.SetInitialDamage(dmg);
            ef.EnemyEffect.Status.Add(si);
        }
예제 #4
0
        internal override void Play(EffectSet ef, Player player, IEnemy enemy, int upgradeCount, IList <CardInstance> targets = null, Deck deck = null, long?key = null)
        {
            int            amt;
            StatusInstance si;

            if (upgradeCount == 0)
            {
                amt = 8;
                si  = new StatusInstance(new Vulnerable(), 2);
            }
            else
            {
                amt = 10;
                si  = new StatusInstance(new Vulnerable(), 3);
            }


            ef.EnemyEffect.SetInitialDamage(amt);
            ef.EnemyEffect.Status.Add(si);
        }
예제 #5
0
        internal override void CardWasPlayed(Card card, IndividualEffect playerSet, IndividualEffect enemySet, int intensity, bool statusIsTargeted, bool playerAction)
        {
            if (card.CardType == CardType.Attack && !statusIsTargeted && enemySet.GetInitialDamage() != null)
            {
                enemySet.DamageAdjustments.Add(new AttackProgression("PenNibDD", (el) =>
                {
                    if (intensity > 0)
                    {
                        //removal of pen nib whenever we play an attack.
                        var negativePenNib = new StatusInstance(new PenNibStatus(), -1);

                        //whoah, this will be applied when the attack is actually resolved.
                        //since here we're
                        playerSet.Status.Add(negativePenNib);

                        return(el.Select(qq => qq > 0 ? qq * 2 : 0).ToList());
                    }
                    return(el);
                }));
            }
        }
예제 #6
0
        public void ApplyStatus(Fight f, Deck d, StatusInstance statusInstance)
        {
            if (CheckTurnip(statusInstance))
            {
                return;
            }
            var exiStatus = StatusInstances.SingleOrDefault(el => el.Status.StatusType == statusInstance.Status.StatusType);

            if (exiStatus == null)
            {
                if (statusInstance.Intensity < 0 && !statusInstance.Status.CanAddNegative)
                {
                    return;
                }

                StatusInstances.Add(statusInstance);
                statusInstance.Apply(f, d, this);
            }
            else
            {
                //combining statuses.  setting up the if this way avoids the ambiguity between flame barrier (scalable, impermanent) and pennib (unscalable, impermanent)
                if (statusInstance.Status.Scalable)
                {
                    exiStatus.Intensity += statusInstance.Intensity; //flame barrier, strength
                }
                else
                {
                    //vuln
                    exiStatus.Duration += statusInstance.Duration;
                }
                if (exiStatus.Duration == 0 || exiStatus.Intensity == 0)
                {
                    StatusInstances.Remove(exiStatus);
                    exiStatus.Unapply(f, d, this);
                }
                //we never apply the new status so it's inactive. we just mined it for intensity.
            }
        }