public override bool Check( FeatureSelectionState selectionState, UnitDescriptor unit, LevelUpState state) { return(!unit.Ensure <UnitPartSelfEvolution>().hasPermanentEvolution(evolution)); }
public override bool Check( FeatureSelectionState selectionState, UnitDescriptor unit, LevelUpState state) { return(unit.Ensure <UnitPartSelfEvolution>().hasEvolution(evolution) != not);; }
public override bool Check( FeatureSelectionState selectionState, UnitDescriptor unit, LevelUpState state) { return(unit.Ensure <UnitPartSelfEvolution>().getNumEvolutionPoints() >= amount || unit.Progression.Features.HasFact((BlueprintFact)this.feature)); }
private int getRemainingGroupSize(UnitDescriptor unit) { int remaining_group_size = unit.Ensure <UnitPartActivatableAbility>().GetGroupSize(this.group); foreach (var a in unit.ActivatableAbilities) { if (a.Blueprint.Group == group && a.IsOn) { remaining_group_size -= a.Blueprint.WeightInGroup; } } return(remaining_group_size); }
static void Postfix(UnitDescriptor __instance, ref bool __result) { try { if (!__result) { __result = __instance.Ensure <UnitPartConsiderUndeadForHealing>().active(); } } catch (Exception ex) { Main.logger.LogException(ex); } }
public static bool isSwashbucklerWeapon(BlueprintItemWeapon weapon, UnitDescriptor wielder) { // Identical check for Duelist weapons if (weapon.IsMelee && (weapon.Category.HasSubCategory(WeaponSubCategory.Light) || weapon.Category.HasSubCategory(WeaponSubCategory.OneHandedPiercing) || (wielder.State.Features.DuelingMastery && weapon.Category == WeaponCategory.DuelingSword) || wielder.Ensure <DamageGracePart>().HasEntry(weapon.Category))) { return(true); } return(false); }