if (e.getSensorHits() > 0) { critVal = critVal.concat(" sensors=\""); critVal = critVal.concat(Integer.toString(e.getSensorHits())); critVal = critVal.concat("\"");
if (t.getSensorHits() > 0) { critVal = critVal.concat(" sensors=\""); critVal = critVal.concat(Integer.toString(t.getSensorHits())); critVal = critVal.concat("\"");
panSystem.add(new JLabel("<html><b>" + "Sensor" + "</b><br></html>"), gridBagConstraints); sensorCrit = new CheckCritPanel(4, tank.getSensorHits()); gridBagConstraints.gridx = 1; gridBagConstraints.weightx = 1.0;
@Override public void updateConditionFromEntity(boolean checkForDestruction) { if(null != unit && unit.getEntity() instanceof Tank) { int priorHits = hits; hits = ((Tank)unit.getEntity()).getSensorHits(); if(checkForDestruction && hits > priorHits && Compute.d6(2) < campaign.getCampaignOptions().getDestroyPartTarget()) { remove(false); return; } } }
expected = new ToHitData(mockTank.getCrew().getGunnery(), FireControl.TH_GUNNERY); expected.addModifier(FireControl.TH_MEDIUM_RANGE); Mockito.when(mockTank.getSensorHits()).thenReturn(1); expected.addModifier(1, FireControl.TH_SENSORS); assertToHitDataEquals(expected, testFireControl.guessToHitModifierForWeapon(mockTank, mockShooterState,
sensorHits = ((Tank) ae).getSensorHits(); if (sensorHits > 3) { return "Attacker sensors destroyed.";
if (getSensorHits() < 4) { return CRIT_SENSOR;
final int sensors = ((Tank) shooter).getSensorHits(); if (0 < sensors) { toHit.addModifier(sensors, TH_SENSORS);
int sensors = tank.getSensorHits(); if (sensors > 0) { toHit.addModifier(sensors, "sensor damage");
int sensors = tank.getSensorHits(); if (sensors > 0) { toHit.addModifier(sensors, "sensor damage");