/// <summary>
 /// Causes Zap Tap to inflict Electrified if the BattleEntity equipped isn't afflicted with it.
 /// This bypasses any immunities or other conditions that would prevent it from being afflicted (Ex. Allergic).
 /// </summary>
 private void InflictElectrified()
 {
     if (EntityEquipped.EntityProperties.HasStatus(Enumerations.StatusTypes.Electrified) == false)
     {
         EntityEquipped.AfflictStatus(new ElectrifiedStatus(StatusGlobals.InfiniteDuration), false);
     }
 }
Example #2
0
        private void OnEntityEnteredBattle(BattleEntity entity)
        {
            //Check if the BattleEntity this Badge is equipped to is added to battle
            //If so, grant it one of the Status Effects
            if (EntityEquipped == entity)
            {
                BattleManager.Instance.EntityAddedEvent -= OnEntityEnteredBattle;

                //Get the statuses and choose a random one
                StatusEffect[] statuses   = GetPossibleGrantedStatuses();
                int            randStatus = GeneralGlobals.Randomizer.Next(0, statuses.Length);

                //Despite the badge's effects, the Status Effect isn't guaranteed to be inflicted
                //If you have Feeling Fine equipped in TTYD and get Electrified with Lucky Start,
                //it's not inflicted yet the "LUCKY" text is displayed and the sound plays
                if (EntityEquipped.EntityProperties.TryAfflictStatus(100d, statuses[randStatus]) == true)
                {
                    EntityEquipped.AfflictStatus(statuses[randStatus], true);
                }
            }
        }