static void createAcBonus()
        {
            var monk     = library.Get <BlueprintCharacterClass>("e8f21e5b58e0569468e420ebea456124");
            var ac_bonus = library.Get <BlueprintFeature>("e241bdfd6333b9843a7bfd674d607ac4");

            ac_bonus.Ranks++;
            foreach (var c in ac_bonus.GetComponents <ContextRankConfig>().ToArray())
            {
                if (c.IsBasedOnClassLevel)
                {
                    ClassToProgression.addClassToContextRankConfig(archetype.GetParentClass(), new BlueprintArchetype[] { archetype }, c, "ElementalAscetic", monk);
                }
                if (c.IsBasedOnCustomProperty) //for balance fixes (class level limiter on wisdom)
                {
                    var property = Helpers.GetField <BlueprintUnitProperty>(c, "m_CustomProperty");
                    var cfg      = property.GetComponent <NewMechanics.ContextValueWithLimitProperty>().max_value;
                    ClassToProgression.addClassToContextRankConfig(archetype.GetParentClass(), new BlueprintArchetype[] { archetype }, cfg, "ElementalAscetic", monk);
                }
            }

            unlock_ac_bonus = library.CopyAndAdd <BlueprintFeature>("2615c5f87b3d72b42ac0e73b56d895e0", "ElementalAsceticACBonusUnlockFeature", "");
            unlock_ac_bonus.ReplaceComponent <MonkNoArmorFeatureUnlock>(m => m.NewFact = ac_bonus);
            unlock_ac_bonus.SetDescription($"When unarmored and unencumbered, an elemental ascetic adds his Wisdom bonus (if any{(Main.settings.balance_fixes_monk_ac ? ", up to his elemental ascetic level" : "")}) to his AC and CMD. In addition, an elemental ascetic gains a +1 bonus to AC and CMD at 4th level. This bonus increases by 1 for every four elemental ascetic levels thereafter, up to a maximum of +5 at 20th level.\n"
                                           + "An elemental ascetic does not receive his element’s defensive wild talent and can never take the expanded defense utility wild talent.");
        }
Exemplo n.º 2
0
        static void createConfidentDefense()
        {
            var monk = library.Get <BlueprintCharacterClass>("e8f21e5b58e0569468e420ebea456124");
            var paladin_proficiencies   = library.Get <BlueprintFeature>("b10ff88c03308b649b50c31611c2fefb");
            var simple_proficiency      = library.Get <BlueprintFeature>("e70ecf1ed95ca2f40b754f1adb22bbdd");
            var martial_proficiency     = library.Get <BlueprintFeature>("203992ef5b35c864390b4e4a1e200629");
            var light_armor_proficiency = library.Get <BlueprintFeature>("6d3728d4e9c9898458fe5e9532951132");

            confident_defense = library.CopyAndAdd(paladin_proficiencies, "IroranPaladinConfidentDefenseFeature", "");
            confident_defense.ReplaceComponent <AddFacts>(a => a.Facts = new BlueprintUnitFact[] { light_armor_proficiency, martial_proficiency, simple_proficiency });


            var scaled_fist_ac = library.Get <BlueprintFeature>("3929bfd1beeeed243970c9fc0cf333f8");

            scaled_fist_ac.SetDescription("");
            scaled_fist_ac.Ranks++;
            foreach (var c in scaled_fist_ac.GetComponents <ContextRankConfig>().ToArray())
            {
                if (c.IsBasedOnClassLevel)
                {
                    //fix it to not to work with normal monk levels
                    var new_c = Helpers.CreateContextRankConfig(ContextRankBaseValueType.SummClassLevelWithArchetype,
                                                                classes: new BlueprintCharacterClass[] { monk },
                                                                type: c.Type,
                                                                archetype: library.Get <BlueprintArchetype>("5868fc82eb11a4244926363983897279"),
                                                                progression: ContextRankProgression.DivStep,
                                                                stepLevel: 4);
                    scaled_fist_ac.ReplaceComponent(c, new_c);
                }
                if (c.IsBasedOnCustomProperty) //for balance fixes (class level limiter on charisma)
                {
                    var property = Helpers.GetField <BlueprintUnitProperty>(c, "m_CustomProperty");
                    var cfg      = property.GetComponent <NewMechanics.ContextValueWithLimitProperty>().max_value;
                    ClassToProgression.addClassToContextRankConfig(archetype.GetParentClass(), new BlueprintArchetype[] { archetype }, cfg, "IroranPaladin", monk);
                }
            }

            confident_defense.AddComponents(Helpers.Create <MonkNoArmorAndMonkWeaponFeatureUnlock>(c => c.NewFact = scaled_fist_ac));
            confident_defense.AddComponents(Helpers.Create <WeaponTrainingMechanics.AddFeatureOnArmor>(a =>
            {
                a.feature         = scaled_fist_ac;
                a.required_armor  = new ArmorProficiencyGroup[] { ArmorProficiencyGroup.Light, ArmorProficiencyGroup.None };
                a.forbidden_armor = new ArmorProficiencyGroup[] { ArmorProficiencyGroup.Buckler, ArmorProficiencyGroup.LightShield, ArmorProficiencyGroup.HeavyShield, ArmorProficiencyGroup.TowerShield };
            }));
            confident_defense.SetNameDescription("Confident Defense",
                                                 $"At 1st level, when wearing light or no armor and not using a shield, an Iroran paladin adds 1 point of his Charisma bonus (if any){(Main.settings.balance_fixes_monk_ac ? " per class level" : "")} as a dodge bonus to his Armor Class. If he is caught flat-footed or otherwise denied his Dexterity bonus, he also loses this bonus. This ability replaces his proficiency with medium armor, heavy armor, and shields.");
        }