Exemple #1
0
 protected sealed override void OnUnsuppress(StatusSuppressionTypes statusSuppressionType)
 {
     if (statusSuppressionType == StatusSuppressionTypes.Effects)
     {
         EntityAfflicted.EntityProperties.AddPayback(Paybackholder);
     }
 }
Exemple #2
0
        /// <summary>
        /// Unsuppresses the Status Effect in a particular way.
        /// </summary>
        /// <param name="statusSuppressionType">The StatusSuppressionTypes of how the Status Effect should be unsuppressed.</param>
        public void Unsuppress(StatusSuppressionTypes statusSuppressionType)
        {
            //If this Status Effect isn't suppressed in this way, there's nothing to unsuppress, so return
            if (IsSuppressed(statusSuppressionType) == false)
            {
                Debug.LogWarning($"{StatusType} on {EntityAfflicted.Name} is not {statusSuppressionType} suppressed, so it cannot be unsuppressed!");
                return;
            }

            //Subtract from the number of times this Status Effect is suppressed in this way
            SuppressionStates[statusSuppressionType]--;

            int value = SuppressionStates[statusSuppressionType];

            //Check if this Status Effect should no longer be suppressed in this way
            if (SuppressionStates[statusSuppressionType] <= 0)
            {
                SuppressionStates.Remove(statusSuppressionType);

                //Tell this Status Effect to unsuppress itself in this way
                OnUnsuppress(statusSuppressionType);
            }

            Debug.Log($"Status {StatusType} was unsuppressed by {statusSuppressionType} on {EntityAfflicted.Name}. {value} suppressions of this type remain!");
        }
 protected override void OnUnsuppress(StatusSuppressionTypes statusSuppressionType)
 {
     if (statusSuppressionType == Enumerations.StatusSuppressionTypes.Effects)
     {
         //Immediately re-disable all categories when unsuppressed
         foreach (KeyValuePair <MoveCategories, int> moveCategory in CategoriesDisabled)
         {
             EntityAfflicted.EntityProperties.DisableMoveCategory(moveCategory.Key);
         }
     }
 }
Exemple #4
0
        /// <summary>
        /// Suppresses the Status Effect in a particular way.
        /// </summary>
        /// <param name="statusSuppressionType">The StatusSuppressionTypes of how the Status Effect should be suppressed.</param>
        public void Suppress(StatusSuppressionTypes statusSuppressionType)
        {
            //If this Status Effect isn't suppressed this way, add a new entry
            if (IsSuppressed(statusSuppressionType) == false)
            {
                SuppressionStates.Add(statusSuppressionType, 0);

                //Tell this Status Effect to suppress itself in this way the first time
                OnSuppress(statusSuppressionType);
            }

            //Add to the number of times this Status Effect is suppressed in this way
            SuppressionStates[statusSuppressionType]++;

            int value = SuppressionStates[statusSuppressionType];

            Debug.Log($"Status {StatusType} was suppressed by {statusSuppressionType} on {EntityAfflicted.Name} {value} time(s)!");
        }
Exemple #5
0
 /// <summary>
 /// Tells whether the Status Effect is suppressed in a certain way or not.
 /// </summary>
 /// <param name="statusSuppressionType">The StatusSuppressionTypes of how the Status Effect is suppressed.</param>
 /// <returns>true if the Status Effect is suppressed in this way, otherwise false.</returns>
 public bool IsSuppressed(StatusSuppressionTypes statusSuppressionType)
 {
     return(SuppressionStates.ContainsKey(statusSuppressionType));
 }
Exemple #6
0
 /// <summary>
 /// What the StatusEffect does to the entity when it's unsuppressed in a particular way.
 /// </summary>
 /// <param name="statusSuppressionType">The type of suppression.</param>
 protected abstract void OnUnsuppress(StatusSuppressionTypes statusSuppressionType);