Package megamek.common.units
Class PilotSPAHelper
java.lang.Object
megamek.common.units.PilotSPAHelper
This class contains helper methods for Special Pilot Abilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisSandblasterValid(EquipmentType equipmentType, GameOptions options) Returns true when the given EquipmentType is a valid choice for the Sandblaster SPA, taking into account the given GameOptions, particularly, if TacOps RapidFire Autocannons is in use.static booleanisSandblasterValid(Mounted<?> mounted, GameOptions options) Returns true when the given Mounted equipment is a valid choice for the Sandblaster SPA, taking into account the given GameOptions, particularly, if TacOps RapidFire Autocannons is in use.static booleanisWeaponSpecialistValid(EquipmentType equipmentType, GameOptions options) static booleanisWeaponSpecialistValid(Mounted<?> mounted, GameOptions options) static booleanisWindWalkerValid(Entity entity) Returns true when the given entity is a valid unit type for the Wind Walker SPA.sandblasterValidWeaponNames(Entity entity, GameOptions options) Returns a List of distinct (each occurring only once) weapon names of weapons present on the given Entity that are valid choices for the Sandblaster SPA.sandblasterValidWeapons(Entity entity, GameOptions options) Deprecated, for removal: This API element is subject to removal in a future version.weaponSpecialistValidWeaponNames(Entity entity, GameOptions options) Returns a List of distinct (each occurring only once) weapon names of weapons present on the given Entity that are valid choices for the Weapon Specialist SPA.weaponSpecialistValidWeapons(Entity entity, GameOptions options) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
isWeaponSpecialistValid
- Returns:
- True when the given Mounted equipment is a valid choice for the Weapons Specialist SPA.
-
isWeaponSpecialistValid
public static boolean isWeaponSpecialistValid(EquipmentType equipmentType, @Nullable GameOptions options) - Returns:
- True when the given EquipmentType is a valid choice for the Weapons Specialist SPA.
-
weaponSpecialistValidWeaponNames
public static List<String> weaponSpecialistValidWeaponNames(Entity entity, @Nullable GameOptions options) Returns a List of distinct (each occurring only once) weapon names of weapons present on the given Entity that are valid choices for the Weapon Specialist SPA.- Returns:
- A list of weapon names from the given Entity that are valid choices for the Weapon Specialist SPA
-
weaponSpecialistValidWeapons
@Deprecated(since="0.51.0", forRemoval=true) public static List<Mounted<?>> weaponSpecialistValidWeapons(Entity entity, @Nullable GameOptions options) Deprecated, for removal: This API element is subject to removal in a future version.Returns a List of weapons from those present on the given Entity that are valid choices for the Weapon Specialist SPA. UnlikeweaponSpecialistValidWeaponNames(Entity, GameOptions), weapons appear in this list as often as they are present on the given Entity.- Returns:
- A list of weapons from the given Entity that are valid choices for the Weapon Specialist SPA
-
isSandblasterValid
Returns true when the given Mounted equipment is a valid choice for the Sandblaster SPA, taking into account the given GameOptions, particularly, if TacOps RapidFire Autocannons is in use. When the given GameOptions is null, TacOps RapidFire Autocannons is assumed off. When TacOps RapidFire Autocannons is off, standard ACs are considered invalid.- Returns:
- True when the given EquipmentType is a valid choice for the Sandblaster SPA.
-
isSandblasterValid
public static boolean isSandblasterValid(EquipmentType equipmentType, @Nullable GameOptions options) Returns true when the given EquipmentType is a valid choice for the Sandblaster SPA, taking into account the given GameOptions, particularly, if TacOps RapidFire Autocannons is in use. When the given GameOptions is null, TacOps RapidFire Autocannons is assumed off. When TacOps RapidFire Autocannons is off, standard ACs are considered invalid.- Returns:
- True when the given EquipmentType is a valid choice for the Sandblaster SPA.
-
sandblasterValidWeaponNames
public static List<String> sandblasterValidWeaponNames(Entity entity, @Nullable GameOptions options) Returns a List of distinct (each occurring only once) weapon names of weapons present on the given Entity that are valid choices for the Sandblaster SPA.- Returns:
- A list of weapon names from the given Entity that are valid choices for the Sandblaster SPA
-
sandblasterValidWeapons
@Deprecated(since="0.51.0", forRemoval=true) public static List<Mounted<?>> sandblasterValidWeapons(Entity entity, @Nullable GameOptions options) Deprecated, for removal: This API element is subject to removal in a future version.Returns a List of weapons from those present on the given Entity that are valid choices for the Sandblaster SPA. UnlikesandblasterValidWeaponNames(Entity, GameOptions), weapons appear in this list as often as they are present on the given Entity.- Returns:
- A list of weapons from the given Entity that are valid choices for the Sandblaster SPA
-
isWindWalkerValid
Returns true when the given entity is a valid unit type for the Wind Walker SPA. Wind Walker applies to: aerospace, aircraft, WiGE, Land-Air-Meks, Glider ProtoMeks, and VTOL (while airborne).VTOLs are valid for WindWalker effects only if they are counted as airborne, which only occurs when a VTOL using VTOL movement, as per total warfare 2023 pg 20. VTOL are considered ground units when not using VTOL movement mode. Therefore, Wind Walker, which requires airborne units would only be applicable when VTOL is using VTOL movement mode.
- Parameters:
entity- The entity to check- Returns:
truewhen the given entity is a valid unit type for the Wind Walker SPA.
-