public StatusEffect(StatusEffect s) { effectType = s.effectType; effectValue = s.effectValue; numTurns = s.numTurns; effectApplyTime = s.effectApplyTime; }
//Function used for managing abnormal status effects //callID lets this function know where it was called from public void ManageSpecialEffects(EffectApplyTime applyTime) { if (applyTime == EffectApplyTime.EndCharTurn) //called from endturn { int stealthIndex = GetStatusIndex(EffectType.Stealth); if (stealthIndex != -1) { //stealth only ended by actions, if still active at end of turn extend until next turn statusEffects[stealthIndex].numTurns += 1; } } }
public void ApplyStatusEffects(EffectApplyTime applyTime) { for (int i = 0; i < statusEffects.Count; i++) { if (statusEffects[i].effectApplyTime == applyTime) { statusEffects[i].ApplyStatusEffect(this); //remove the effect if it is done if (statusEffects[i].isFinished()) { RemoveStatusEffect(statusEffects[i].effectType); } } } }