Exemplo n.º 1
0
 public override void GetChances(PersuasionOptionArgs optionArgs, out float successChance, out float critSuccessChance, out float critFailChance, out float failChance, float difficultyMultiplier)
 {
     successChance     = 1f;
     critSuccessChance = 1f;
     critFailChance    = 0f;
     failChance        = 0f;
 }
 public static void GetChances(PersuasionOptionArgs optionArgs, ref float successChance, ref float critSuccessChance, ref float critFailChance, ref float failChance, float difficultyMultiplier)
 {
     if (BannerlordCheatsSettings.Instance.ConversationAlwaysSuccessful)
     {
         successChance     = 1;
         critSuccessChance = 1;
         failChance        = 0;
         critFailChance    = 0;
     }
 }
 public static void GetChances(PersuasionOptionArgs optionArgs, ref float successChance, ref float critSuccessChance, ref float critFailChance, ref float failChance, float difficultyMultiplier)
 {
     try
     {
         if (BannerlordCheatsSettings.Instance?.ConversationAlwaysSuccessful == true)
         {
             successChance     = 1;
             critSuccessChance = 1;
             failChance        = 0;
             critFailChance    = 0;
         }
     }
     catch (Exception e)
     {
         SubModule.LogError(e, typeof(ConversationAlwaysSuccessful));
     }
 }
Exemplo n.º 4
0
        public static void GetChances(PersuasionOptionArgs optionArgs, ref float successChance, ref float critSuccessChance, ref float critFailChance, ref float failChance, float difficultyMultiplier)
        {
            var attrBonus = new CharacterAttributeBonuses(Hero.MainHero.CharacterObject).PersuadeAddition;

            Logger.Log("Bonus " + attrBonus + "% persuation chance from SOC");
            successChance += attrBonus;
            if (successChance > 1)
            {
                attrBonus    -= successChance - 1;
                successChance = 1;
            }
            critSuccessChance = 0;
            if (optionArgs.GivesCriticalSuccess)
            {
                critSuccessChance = successChance;
                successChance     = 0;
            }
            critFailChance = (critFailChance > attrBonus / 2)
                                ? critFailChance - (attrBonus / 2)
                                : 0;
            failChance = 1 - critSuccessChance - successChance - critFailChance;
        }
Exemplo n.º 5
0
 public override void GetEffectChances(PersuasionOptionArgs option, out float moveToNextStageChance, out float blockRandomOptionChance, float difficultyMultiplier)
 {
     moveToNextStageChance   = 1;
     blockRandomOptionChance = 0;
 }