/// <summary> /// Обновляет данные баттла /// </summary> protected override void ParseActionModel() { if (battleModel == null) { battleModel = new VersusBattleModel(); } battleModel.Rival = RappersManager.GetByName(RivalDropdown.captionText.text); battleModel.TextSourse = EnumExt.GetFromDescription <TextSourse>(TextSourceDropdown.captionText.text); battleModel.Strategy = EnumExt.GetFromDescription <BattleStrategy>(StrategyDropdown.captionText.text); battleModel.CheckSocials = CheckSocialToggle.isOn; }
/// <summary> /// Анализирует успешность трэка /// </summary> public static SuccessGrade AnalyzeBattle(VersusBattleModel battleModel) { if (RandomizeGrade()) { return(GetRandomGrade()); } var points = GetStrategyPoint(battleModel.Strategy); points += GetFlowPoints(battleModel.Rival); points += battleModel.TextSourse == TextSourse.Self ? PlayerManager.GetSkills().Vocabulary * 2 : 20; points += battleModel.CheckSocials ? 10 : 0; return(GetGrade(points)); }