@Override public boolean isOutControlTotal() { // due to control roll, heat, shut down, or crew unconscious return (outControl || shutDown || getCrew().isUnconscious()); }
/** * Is this entity shut down or is the crew unconscious? */ @Override public boolean isImmobile() { return isShutDown() || ((crew != null) && crew.isUnconscious()); }
@Override public boolean isOutControlTotal() { return outControl || shutDown || getCrew().isUnconscious(); }
public String getDesc(int pos) { if (isMissing(pos)) { return "[missing]"; } String s = new String(name[pos]); if (hits[pos] > 0) { s += " (" + hits[pos] + " hit(s)"; if (isUnconscious(pos)) { s += " [ko]"; } else if (isDead(pos)) { s += " [dead]"; } s += ")"; } else if (isUnconscious(pos)) { s += " [ko]"; } else if (isDead(pos)) { s += " [dead]"; } return s; }
@Override public boolean isOutControlTotal() { //due to control roll, heat, shut down, or crew unconscious return (isOutControl() || outContact || shutDown || getCrew().isUnconscious()); }
/** * @return A description of the status of crew as a whole */ public String getStatusDesc() { String s = new String(""); if (getHits() > 0) { s += getHits() + " hits"; if (isUnconscious()) { s += " (KO)"; } else if (isDead()) { s += " (dead)"; } } return s; }
/** * @return A description of the status of a single crew member */ public String getStatusDesc(int pos) { if (isMissing(pos)) { return "Missing"; } String s = new String(""); if (getHits(pos) > 0) { s += hits[pos] + " hits"; if (isUnconscious(pos)) { s += " (KO)"; } else if (isDead(pos)) { s += " (dead)"; } } return s; }
/** * @return the initiative bonus this Entity grants for quirks */ public int getQuirkIniBonus() { // command battlemech and and battle computer are not cumulative if (hasQuirk(OptionsConstants.QUIRK_POS_BATTLE_COMP) && !getCrew().isDead() && !getCrew().isUnconscious()) { return 2; } else if (hasQuirk(OptionsConstants.QUIRK_POS_COMMAND_MECH) && !getCrew().isDead() && !getCrew().isUnconscious()) { return 1; } return 0; }
/** * Returns true if the player has a valid unit with the Tactical Genius * pilot special ability. */ public boolean hasTacticalGenius(IPlayer player) { for (Entity entity : entities) { if (entity.hasAbility(OptionsConstants.MISC_TACTICAL_GENIUS) && entity.getOwner().equals(player) && !entity.isDestroyed() && entity.isDeployed() && !entity.isCarcass() && !entity.getCrew().isUnconscious()) { return true; } } return false; }
if ((hits[i] > 0) || isUnconscious(i) || isDead(i)) { Report r2 = new Report(); r2.type = Report.PUBLIC; r2.messageId = 7055; r2.add(hits[i]); if (isUnconscious(i)) { r2.messageId = 7060; r2.choose(true); r2.choose(false); } else if (isUnconscious(i)) { r2.messageId = 7065; r2.choose(true);
/** * This method returns a true if the unit can reasonably escape from the * board. It can be used to determine whether some non-destroyed units * should be considered possible salvage. * * @return */ public boolean canEscape() { if(null == getCrew()) { return false; } //if the crew is unconscious, dead, or ejected, no escape if(getCrew().isUnconscious() || getCrew().isDead() || (getCrew().isEjected() && !(this instanceof EjectedCrew))) { return false; } //what else? If its permaneantly immobilized or shutdown it can't escape //TODO: should stalled and stuck be here? return !isPermanentlyImmobilized(false) && !isShutDown(); }
/** * Returns whether an entity can flee from its current position. Currently * returns true if the entity is on the edge of the board. */ public boolean canFlee() { Coords pos = getPosition(); return (pos != null) && ((getWalkMP() > 0) || (this instanceof Infantry)) && !isProne() && !isStuck() && !isShutDown() && !getCrew().isUnconscious() && ((pos.getX() == 0) || (pos.getX() == (game.getBoard().getWidth() - 1)) || (pos.getY() == 0) || (pos.getY() == (game.getBoard() .getHeight() - 1))); }
|| m.curMode().equals("ECM & Ghost Targets") || m .curMode().equals("ECCM & Ghost Targets")) && !(m.isInoperable() || getCrew().isUnconscious())) { hasGhost = true; && m.curMode().equals("Ghost Targets") && (getTotalCommGearTons() >= 7) && !(m.isInoperable() || getCrew().isUnconscious())) { hasGhost = true;
public boolean hasPassiveShield(int location) { if (isShutDown() || (getCrew().isKoThisRound() || getCrew().isUnconscious())) { return false;
if (isShutDown() || (getCrew().isKoThisRound() || getCrew().isUnconscious())) { return false;
|| (getCrew().isKoThisRound() || getCrew().isUnconscious())) { return false;
|| (getCrew().isKoThisRound() || getCrew().isUnconscious())) { return false;
.isUnconscious())) { return m.getCurrentDamageCapacity(this, m.getLocation()) > 0;
.isUnconscious())) { return m.getCurrentDamageCapacity(this, m.getLocation()) > 0;
pilot.setGunneryAeroM(crew.getGunneryM()); pilot.setHits(crew.getHits(0), 0); pilot.setUnconscious(crew.isUnconscious(0), 0); pilot.setDead(crew.isDead(0), 0); pilot.setDoomed(crew.isDoomed());