/// <summary> /// Constructor /// </summary> /// <param name="statusName">name of status to be edited</param> public StatusEditor(string statusName) { status = StatusData.GetStatus(statusName); InitializeComponent(); nameBox.Text = statusName; slowDurationBox.Text = status.slowDuration.ToString(); slowMultiplierBox.Text = status.slowMultiplier.ToString(); slowBonusBox.Text = status.slowBonus.ToString(); damageDurationBox.Text = status.extraDamageDuration.ToString(); damageMultiplierBox.Text = status.extraDamageMultiplier.ToString(); damageBonusBox.Text = status.extraDamageBonus.ToString(); dotDurationBox.Text = status.dotDuration.ToString(); dotFrameBox.Text = status.dotFrameDamage.ToString(); dotMoveBox.Text = status.dotMoveDamage.ToString(); stunDurationBox.Text = status.stunDuration.ToString(); fearChanceBox.Text = status.fearChance.ToString(); fearDurationBox.Text = status.fearDuration.ToString(); }
/// <summary> /// Updates the status /// </summary> /// <param name="status">updates status</param> public static void UpdateStatus(Status status) { foreach (Status s in statuses) if (s.name.Equals(status.name)) { s.stunDuration = status.stunDuration; s.slowDuration = status.slowDuration; s.slowMultiplier = status.slowMultiplier; s.slowBonus = status.slowBonus; s.extraDamageDuration = status.extraDamageDuration; s.extraDamageMultiplier = status.extraDamageMultiplier; s.extraDamageBonus = status.extraDamageBonus; s.dotDuration = status.dotDuration; s.dotFrameDamage = status.dotFrameDamage; s.dotMoveDamage = status.dotMoveDamage; return; } statuses.Add(status); }
/// <summary> /// Inflicts the enemy with the status /// </summary> /// <param name="s">name of status</param> public void Inflict(Status s) { if (immune.Contains(s.name)) return; foreach (Status status in statuses) if (status.name.Equals(s.name)) { status.stunDuration = s.stunDuration; status.slowDuration = s.slowDuration; status.extraDamageDuration = s.extraDamageDuration; status.dotDuration = s.dotDuration; if (s.fearDuration > 0) status.fearDuration = s.fearDuration; return; } statuses.Add(s); }