/** * return if this BA has reactive armor * @return */ public boolean isReactive() { for (Mounted equip : getMisc()) { if (equip.getType().hasFlag(MiscType.F_REACTIVE)) { return true; } } return false; }
/** * return if this BA has fire resistant armor * * @return */ public boolean isFireResistant() { for (Mounted equip : getMisc()) { if (equip.getType().hasFlag(MiscType.F_FIRE_RESISTANT)) { return true; } } return false; }
@Override public int getVibroClaws() { int claws = 0; for (Mounted mounted : getMisc()) { if (mounted.getType().hasFlag(MiscType.F_VIBROCLAW)) { claws++; } } return claws; }
/** * return if this BA has laser reflective armor * * @return */ public boolean isReflective() { for (Mounted equip : getMisc()) { if (equip.getType().hasFlag(MiscType.F_REFLECTIVE)) { return true; } } return false; }
/** * does this ba mount a myomer booster? * * @return */ public boolean hasMyomerBooster() { for (Mounted mEquip : getMisc()) { MiscType mtype = (MiscType) mEquip.getType(); if (mtype.hasFlag(MiscType.F_MASC) && !mEquip.isInoperable()) { return true; } } return false; }
/** * Returns the <code>Mounted</code> for the manipulator * mounted in the right arm of this <code>BattleArmor</code> squad. * * @return */ public Mounted getRightManipulator(){ for (Mounted m : getMisc()){ if (m.getType().hasFlag(MiscType.F_BA_MANIPULATOR) && (m.getBaMountLoc() == MOUNT_LOC_RARM)){ return m; } } return null; }
/** * Prepare the entity for a new round of action. */ @Override public void newRound(int roundNumber) { // Perform all base-class behavior. super.newRound(roundNumber); // If we're equipped with a Magnetic Mine // launcher, turn it to single shot mode. for (Mounted m : getMisc()) { EquipmentType equip = m.getType(); if (BattleArmor.MINE_LAUNCHER.equals(equip.getInternalName())) { m.setMode("Single"); } } }
/** * Returns the <code>Mounted</code> for the manipulator * mounted in the left arm of this <code>BattleArmor</code> squad. * * @return */ public Mounted getLeftManipulator(){ for (Mounted m : getMisc()){ if (m.getType().hasFlag(MiscType.F_BA_MANIPULATOR) && (m.getBaMountLoc() == MOUNT_LOC_LARM)){ return m; } } return null; }
/** * return if the BA has any kind of active probe * * @return */ public boolean hasActiveProbe() { for (Mounted equip : getMisc()) { if (equip.getType().hasFlag(MiscType.F_BAP) && !(equip.getType().getInternalName() .equals(Sensor.ISIMPROVED) || equip.getType() .getInternalName().equals(Sensor.CLIMPROVED))) { return true; } } return false; }
/** * return if this BA has improved sensors * * @return */ public boolean hasImprovedSensors() { for (Mounted equip : getMisc()) { if (equip.getType().hasFlag(MiscType.F_BAP)) { if (equip.getType().getInternalName().equals(Sensor.ISIMPROVED) || equip.getType().getInternalName() .equals(Sensor.CLIMPROVED)) { return true; } } } return false; }
for (Mounted mounted : getMisc()) { if (mounted.getType().hasFlag(MiscType.F_ECM)) { if (mounted.getType().hasFlag(MiscType.F_ANGEL_ECM)) { for (Mounted misc : getMisc()) { if (misc.getType().hasFlag(MiscType.F_MINE)) { if (misc.getLocation() == LOC_SQUAD) { for (Mounted misc : getMisc()) { if ((misc.getLocation() == LOC_SQUAD) || (misc.getLocation() == i)) {