/** * Confirm that the given entity can fire the indicated equipment. * * @return <code>true</code> if the equipment can be fired by the entity; * <code>false</code> otherwise. */ public boolean canFire() { return canFire(false); }
if (mount.canFire()) {
if (mount.canFire()) {
if ((type.hasFlag(MiscType.F_MINE) || type.hasFlag(MiscType.F_VEHICLE_MINE_DISPENSER)) && mount.canFire()) { StringBuffer message = new StringBuffer(); message.append(entity.getLocationName(mount.getLocation()))
&& args[3].equalsIgnoreCase("ALL")) { for (Mounted weapon : ce().getWeaponList()) { if (weapon.canFire() && !weapon.isFired()) { fire(ce().getEquipmentNum(weapon), target);
rac_damage = rac_damage + (4 * (test_weapon.getDamage())); } else { if (equip.canFire()) { other_damage += test_weapon.getDamage(); if (test_weapon.getMediumRange() > clearance_range) {
+ (4 * (test_weapon.getDamage())); } else { if (equip.canFire()) { other_damage += test_weapon.getDamage(); if (test_weapon.getMediumRange() > clearance_range) {
Mockito.when(mockWeapon.canFire()).thenReturn(true); Mockito.when(mockWeapon.getLocation()).thenReturn(Mech.LOC_RARM); Mockito.when(mockShooter.getEquipmentNum(Mockito.eq(mockWeapon))).thenReturn(MOCK_WEAPON_ID); Mockito.when(mockWeapon.canFire()).thenReturn(false); expected = new ToHitData(FireControl.TH_WEAP_CANNOT_FIRE); assertToHitDataEquals(expected, testFireControl.guessToHitModifierForWeapon(mockShooter, mockShooterState,
if (!weapon.canFire()) { return new ToHitData(TH_WEAP_CANNOT_FIRE);
if (!weapon.canFire(isStrafing)) { return "Weapon is not in a state where it can be fired"; WeaponType bayWType = ((WeaponType) m.getType()); boolean bayWUsesAmmo = (bayWType.getAmmoType() != AmmoType.T_NA); if (m.canFire()) { if (bayWUsesAmmo) { if ((m.getLinked() != null) && (m.getLinked().getUsableShotsLeft() > 0)) {
if (!weapon.canFire()) { return new ToHitData(TH_WEAP_CANNOT_FIRE);