//frost armor 60 public static async void frost_armor(Players player, float how_long) { if (spells.isPositiveCondAllreadyHere(player, 60)) { return; } float base_armor = 200f; player.Armor += base_armor; player.animation_id = 2; player.reset_animation_for_one(); string ID_cond = player.get_symb_for_IDs(); for (float i = how_long; i > 0; i -= 0.2f) { player.set_condition(CondType.co, 60, ID_cond, i); try { foreach (var searched_ID in player.conditions) { if (player.conditions[searched_ID.Key].GetDataForPacketSending().Contains("dt")) { int _spell = player.conditions[searched_ID.Key].GetCurrentSpellNumber(); if ((SpellSystem.GetSpellMainPurpose(_spell) == SpellMainPurpose.making_damage_close || SpellSystem.GetSpellMainPurpose(_spell) == SpellMainPurpose.making_damage_close_after_close_up) && SpellSystem.GetSpellCategory(_spell) == SpellTypeCategory.physical) { foreach (Players pl in starter.SessionsPool[player.Session_ID].LocalPlayersPool.Values) { if (pl.conditions.ContainsKey(searched_ID.Key) && pl.player_id != player.player_id) { if (functions.assess_chance(5))//5 { if (!pl.is_cond_here_by_type_and_spell(CondType.co, 64)) { frozen(player, pl, 3); } } else if (functions.assess_chance(10))//10 { if (!pl.is_cond_here_by_type_and_spell(CondType.co, 58)) { freezed(player, pl, 3); } } else if (functions.assess_chance(20))//20 { if (!pl.is_cond_here_by_type_and_spell(CondType.co, 59)) { freezing_slow(player, pl, 5); } } } } } } } } catch (Exception ex) { Console.WriteLine(DateTime.Now + ": error in making somebody burning when strike fire armor - spell61 -" + ex); } await Task.Delay(200); player.ActionForConditionByChekingIndex(ref i, how_long, 60); } player.Armor -= base_armor; player.remove_condition_in_player(ID_cond); }