private static String getDropshipCritString(Dropship a) { String retVal = " <dcriticals"; String critVal = ""; //crits if (a.isDockCollarDamaged()) { critVal = critVal.concat(" dockingcollar=\"none\""); } if (a.isKFBoomDamaged()) { critVal = critVal.concat(" kfboom=\"none\""); } if (!critVal.equals("")) { // then add beginning and end retVal = retVal.concat(critVal); retVal = retVal.concat("/>\n"); } else { return critVal; } return retVal; }
/** * get a vector of launchable units. This is different from loaded in that * units in recovery cannot launch */ public Vector<Entity> getLaunchableUnits() { Vector<Entity> launchable = new Vector<Entity>(); for (int i = 0; i < troops.size(); i++) { Entity nextUnit = game.getEntity(troops.elementAt(i)); if ((nextUnit.getRecoveryTurn() == 0) && !damaged) { if (nextUnit instanceof Dropship) { Dropship ds = (Dropship) nextUnit; if (!ds.isDockCollarDamaged()) { launchable.add(nextUnit); } } } } return launchable; }
if (ds.isDockCollarDamaged()) { result = false;
public String getCritDamageString() { String toReturn = super.getCritDamageString(); boolean first = toReturn.isEmpty(); if (isDockCollarDamaged()) { if (!first) { toReturn += ", "; } toReturn += "Docking Collar"; first = false; } if (isKFBoomDamaged()) { if (!first) { toReturn += ", "; } toReturn += "K-F Boom"; first = false; } return toReturn; }
+ "</b><br></html>"), gridBagConstraints); int collarHits = 0; if (((Dropship) aero).isDockCollarDamaged()) { collarHits = 1;
@Override public void updateConditionFromEntity(boolean checkForDestruction) { int priorHits = hits; boolean priorBoomDamage = boomDamaged; if(null != unit && unit.getEntity() instanceof Dropship) { if(((Dropship)unit.getEntity()).isDockCollarDamaged()) { hits = 1; } else { hits = 0; } boomDamaged = ((Dropship) unit.getEntity()).isKFBoomDamaged(); if(checkForDestruction && ((hits > priorHits) || (boomDamaged && !priorBoomDamage)) && Compute.d6(2) < campaign.getCampaignOptions().getDestroyPartTarget()) { remove(false); return; } } }
if (ds.isDockCollarDamaged()) { collar = 1;
if (ds.isDockCollarDamaged()) { collar = 1;