public static ImmutableStatsContainerBuilder <TransientStatType> .IBuilder WithPhotonBlastCharge(this ImmutableStatsContainerBuilder <TransientStatType> .IBuilder builder, int statValue) { builder.WithStat(TransientStatType.PhotonBlastCharge, statValue); //fluent return return(builder); }
//TransientStatType Extensions public static ImmutableStatsContainerBuilder <TransientStatType> .IBuilder WithHitPoints(this ImmutableStatsContainerBuilder <TransientStatType> .IBuilder builder, int statValue) { builder.WithStat(TransientStatType.HitPoints, statValue); //fluent return return(builder); }
public static ImmutableStatsContainerBuilder <CombatStatType> .IBuilder WithTechniquePoints(this ImmutableStatsContainerBuilder <CombatStatType> .IBuilder builder, int statValue) { builder.WithStat(CombatStatType.TechniquePoints, statValue); //fluent return return(builder); }
public static ImmutableStatsContainerBuilder <CombatStatType> .IBuilder WithMentalStrength(this ImmutableStatsContainerBuilder <CombatStatType> .IBuilder builder, int statValue) { builder.WithStat(CombatStatType.MentalStrength, statValue); //fluent return return(builder); }
public static ImmutableStatsContainerBuilder <CombatStatType> .IBuilder WithEvasivePower(this ImmutableStatsContainerBuilder <CombatStatType> .IBuilder builder, int statValue) { builder.WithStat(CombatStatType.EvasivePower, statValue); //fluent return return(builder); }
//generic extensions public static ImmutableStatsContainerBuilder <TStatType> .IBuilder WithStat <TStatType>(this ImmutableStatsContainerBuilder <TStatType> .IBuilder builder, TStatType statType, int statValue) where TStatType : struct, IConvertible { //Pretty simple, just initialize the desired stat value. builder[statType] = statValue; //fluent return return(builder); }