public static TraitBuilder Localize <TraitType>(this TraitBuilder builder) where TraitType : CustomTrait
        {
            TraitsLocalization traitsLocalization = BMLocalizationManager.Instance.TraitsLocalization;
            Dictionary <LanguageCode, TraitsLocalization.LocalizedTrait> localizedTraits = traitsLocalization.GetLocalization <TraitType>();

            builder.WithName(new CustomNameInfo(localizedTraits.ToDictionary(entry => entry.Key, entry => entry.Value.Name)));
            builder.WithDescription(new CustomNameInfo(localizedTraits.ToDictionary(entry => entry.Key, entry => entry.Value.Desc)));
            return(builder);
        }
Example #2
0
		private static void Setup()
		{
			TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait<TamperTantrum2>()
					.Localize<TamperTantrum2>()
					.WithUnlock(new TraitUnlock(name, false)
							.SetAvailable(false)
							.SetAvailableInCharacterCreation(false)
							.SetCantLose(true)
							.SetCantSwap(true)
							.SetCharacterCreationCost(5)
							.SetEnabled(true)
					);
Example #3
0
		private static void Setup()
		{
			// TODO move this somewhere else, add localization
			RogueLibs.CreateCustomName(cDialogue.VeiledThreatsAnnoyed, vNameType.Dialogue, new CustomNameInfo("Did you just... threaten me?"));
			
			TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait<VeiledThreats>()
					.Localize<VeiledThreats>()
					.WithUnlock(new TraitUnlock(name, true)
							.SetAvailable(true)
							.SetAvailableInCharacterCreation(true)
							.SetCantLose(true)
							.SetCantSwap(false)
							.SetCharacterCreationCost(5)
							.SetEnabled(true)
					);
Example #4
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Haunted>()
                                        .Localize <Haunted>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-2)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <Haunted>(new BMTraitInfo(name, traitBuilder));
        }
Example #5
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <TDebug>()
                                        .WithName(new CustomNameInfo("00_Debug"))
                                        .WithDescription(new CustomNameInfo("Debug trait. If you see this, I hope you're me."))
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantSwap(true)
                                                    .SetCantLose(true)
                                                    .SetCharacterCreationCost(0)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <TDebug>(new BMTraitInfo(name, traitBuilder));
        }
Example #6
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <FatHead>()
                                        .Localize <FatHead>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-1)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict vTrait.Diminutive
            BMTraitsManager.RegisterTrait <FatHead>(new BMTraitInfo(name, traitBuilder));
        }
Example #7
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <StealthBastardDeluxe>()
                                        .Localize <StealthBastardDeluxe>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(4)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict: vTrait.Loud, vTrait.Bulky
            BMTraitsManager.RegisterTrait <StealthBastardDeluxe>(new BMTraitInfo(name, traitBuilder));
        }
Example #8
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <AfraidOfLoudNoises>()
                                        .Localize <AfraidOfLoudNoises>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(-4)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <AfraidOfLoudNoises>(new BMTraitInfo(name, traitBuilder)
                                                               .WithConflictGroup(ETraitConflictGroup.AfraidOfLoudNoises_DrawNoBlood, ETraitConflictGroup.LimitWeapons)
                                                               );
        }
Example #9
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Charmed2>()
                                        .Localize <Charmed2>()
                                        .WithUnlock(new TraitUnlock(name, false) // TODO trait disabled
                                                    .SetAvailable(false)
                                                    .SetAvailableInCharacterCreation(false)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(10)
                                                    .SetEnabled(false)
                                                    );

            BMTraitsManager.RegisterTrait <Charmed2>(new BMTraitInfo(name, traitBuilder)
                                                     .WithConflictGroup(ETraitConflictGroup.Luck)
                                                     );
        }
Example #10
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <EagleEyes2>()
                                        .Localize <EagleEyes2>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)     // TODO set to false after testing
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(6)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <EagleEyes2>(new BMTraitInfo(name, traitBuilder)
                                                       .WithConflictGroup(ETraitConflictGroup.VisionRange)
                                                       );
        }
Example #11
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <TamperTantrum2>()
                                        .Localize <TamperTantrum2>()
                                        .WithUnlock(new TraitUnlock(name, false)
                                                    .SetAvailable(false)
                                                    .SetAvailableInCharacterCreation(false)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(5)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <TamperTantrum2>(new BMTraitInfo(name, traitBuilder)
                                                           .WithConflictGroup(ETraitConflictGroup.Myopic_Ballistician)
                                                           );
        }
Example #12
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <BlessedStrikes2>()
                                        .Localize <BlessedStrikes2>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(false)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(5)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <BlessedStrikes2>(new BMTraitInfo(name, traitBuilder)
                                                            .WithConflictGroup(ETraitConflictGroup.StrikerTraits)
                                                            );
        }
Example #13
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <MoronTheMerrier>()
                                        .Localize <MoronTheMerrier>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-20)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <MoronTheMerrier>(new BMTraitInfo(name, traitBuilder)
                                                            .WithConflictGroup(ETraitConflictGroup.ExperienceRate)
                                                            );
        }
Example #14
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Reinforcements>()
                                        .Localize <Reinforcements>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(4)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <Reinforcements>(new BMTraitInfo(name, traitBuilder)
                                                           .WithUpgrade(typeof(Reinforcements2))
                                                           );
        }
Example #15
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Wetworker>()
                                        .Localize <Wetworker>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(8)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict with vTrait.Loud
            // TODO recommend vSpecialAbility.Camouflage
            BMTraitsManager.RegisterTrait <Wetworker>(new BMTraitInfo(name, traitBuilder));
        }
Example #16
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <SmoothBrained>()
                                        .Localize <SmoothBrained>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-40)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict vTrait.ExperienceRate
            BMTraitsManager.RegisterTrait <SmoothBrained>(new BMTraitInfo(name, traitBuilder)
                                                          .WithConflictGroup(ETraitConflictGroup.ExperienceRate, ETraitConflictGroup.SmoothBrained_VeryHardOnYourself)
                                                          );
        }
Example #17
0
        private static void Setup()
        {
            // TODO move this somewhere else, add localization
            RogueLibs.CreateCustomName(cDialogue.WarlordSubmission, vNameType.Dialogue, new CustomNameInfo("Okay, okay! You're the boss now!"));

            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Warlord>()
                                        .Localize <Warlord>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(32)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <Warlord>(new BMTraitInfo(name, traitBuilder));
        }
Example #18
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Priors>()
                                        .Localize <Priors>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(3)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict: vTrait.Charismatic, vTrait.TheLaw
            BMTraitsManager.RegisterTrait <Priors>(new BMTraitInfo(name, traitBuilder)
                                                   .WithConflictGroup(ETraitConflictGroup.PoliceStanding)
                                                   );
        }
Example #19
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Polarizing2>()
                                        .Localize <Polarizing2>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(false)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(1)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict: vTrait.Antisocial, vTrait.Charismatic, vTrait.FairGame, vTrait.FriendoftheCommonFolk, vTrait.Malodorous, vTrait.Suspicious, vTrait.Wanted
            BMTraitsManager.RegisterTrait <Polarizing2>(new BMTraitInfo(name, traitBuilder)
                                                        .WithConflictGroup(ETraitConflictGroup.Charisma)
                                                        );
        }
Example #20
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <DareDevil>()
                                        .Localize <DareDevil>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-3)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict with vTrait.Addict
            BMTraitsManager.RegisterTrait <DareDevil>(new BMTraitInfo(name, traitBuilder)
                                                      .WithConflictGroup(ETraitConflictGroup.LimitDrugs)
                                                      );
        }
Example #21
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <VeryHardOnYourself>()
                                        .Localize <VeryHardOnYourself>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-6)
                                                    .SetEnabled(true)
                                                    );

            // TODO prerequisite vTrait.TheLaw, vTrait.Extortionist
            BMTraitsManager.RegisterTrait <VeryHardOnYourself>(new BMTraitInfo(name, traitBuilder)
                                                               .WithConflictGroup(ETraitConflictGroup.SmoothBrained_VeryHardOnYourself)
                                                               );
        }
Example #22
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Carnivore>()
                                        .Localize <Carnivore>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-1)
                                                    .SetEnabled(true)
                                                    );

            // TODO add conflict with vTrait.LimitFood
            // TODO add conflict with vTrait.BananaLover
            BMTraitsManager.RegisterTrait <Carnivore>(new BMTraitInfo(name, traitBuilder)
                                                      .WithConflictGroup(ETraitConflictGroup.LimitFood)
                                                      );
        }
Example #23
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <Sniper>()
                                        .Localize <Sniper>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(4)
                                                    .SetEnabled(true)
                                                    );

            BMTraitsManager.RegisterTrait <Sniper>(new BMTraitInfo(name, traitBuilder)
                                                   .WithUpgrade(typeof(Sniper2))
                                                   .WithConflictGroup(ETraitConflictGroup.Myopic_Sniper)
                                                   .WithRecommendation(typeof(EagleEyes))
                                                   );
        }
Example #24
0
        private static void Setup()
        {
            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <BootLicker>()
                                        .Localize <BootLicker>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(false)
                                                    .SetCantSwap(true)
                                                    .SetCharacterCreationCost(-1)
                                                    .SetEnabled(true)
                                                    );

            // TODO conflict: vTrait.Charismatic, vTrait.CorruptionCosts, vTrait.Wanted, vTrait.TheLaw
            BMTraitsManager.RegisterTrait <BootLicker>(new BMTraitInfo(name, traitBuilder)
                                                       .WithConflictGroup(
                                                           ETraitConflictGroup.PoliceStanding,
                                                           ETraitConflictGroup.BootLicker_Unpleasant
                                                           )
                                                       );
        }
Example #25
0
        private static void Setup()
        {
            // TODO move this somewhere else, add localization
            RogueLibs.CreateCustomName(cDialogue.VeiledThreatsAnnoyed, vNameType.Dialogue, new CustomNameInfo("Did you just... threaten me?"));

            TraitBuilder traitBuilder = RogueLibs.CreateCustomTrait <VeiledThreats>()
                                        .Localize <VeiledThreats>()
                                        .WithUnlock(new TraitUnlock(name, true)
                                                    .SetAvailable(true)
                                                    .SetAvailableInCharacterCreation(true)
                                                    .SetCantLose(true)
                                                    .SetCantSwap(false)
                                                    .SetCharacterCreationCost(5)
                                                    .SetEnabled(true)
                                                    );

            // TODO recommend: vTrait.Extortionist, vTrait.Mugger
            BMTraitsManager.RegisterTrait <VeiledThreats>(new BMTraitInfo(name, traitBuilder)
                                                          .WithConflictGroup(ETraitConflictGroup.Myopic_Ballistician)
                                                          );
        }
Example #26
0
 public BMTraitInfo(string name, TraitBuilder builder)
 {
     Name         = name;
     TraitBuilder = builder;
 }