@Override public void updateConditionFromPart() { if(null != unit) { if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(hits); } } }
@Override public void updateConditionFromPart() { if(null != unit) { if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(3); } } }
@Override public void fix() { super.fix(); if(null != unit) { if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(0); } } }
a.setEngineHits(Integer.parseInt(engine));
dealt += getSI() - finalSI; setSI(finalSI); setEngineHits(Math.max(3, getEngineHits()));
@Override public void fix() { super.fix(); if(null != unit) { if(unit.getEntity() instanceof Mech) { unit.repairSystem(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE); } if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(0); } if(unit.getEntity() instanceof Tank) { ((Tank)unit.getEntity()).engineFix(); } if(unit.getEntity() instanceof Protomech) { ((Protomech)unit.getEntity()).setEngineHit(false); } } }
@Override public void updateConditionFromPart() { if(null != unit) { if(unit.getEntity() instanceof Mech) { unit.destroySystem(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE); } if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(((Aero)unit.getEntity()).getMaxEngineHits()); } if(unit.getEntity() instanceof Tank) { ((Tank)unit.getEntity()).engineHit(); } if(unit.getEntity() instanceof Protomech) { ((Protomech)unit.getEntity()).setEngineHit(true); } } }
((Aero)unit.getEntity()).setEngineHits(0); ((Aero)unit.getEntity()).setEngineHits(hits);
@Override public void remove(boolean salvage) { if(null != unit) { unit.destroySystem(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE); if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(((Aero)unit.getEntity()).getMaxEngineHits()); } Part spare = campaign.checkForExistingSparePart(this); if(!salvage) { campaign.removePart(this); } else if(null != spare) { spare.incrementQuantity(); campaign.removePart(this); } unit.removePart(this); Part missing = getMissingPart(); unit.addPart(missing); campaign.addPart(missing, 0); } setUnit(null); updateConditionFromEntity(false); }
@Override public void remove(boolean salvage) { if(null != unit) { if(unit.getEntity() instanceof Mech) { unit.destroySystem(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE); } if(unit.getEntity() instanceof Aero) { ((Aero)unit.getEntity()).setEngineHits(((Aero)unit.getEntity()).getMaxEngineHits()); } if(unit.getEntity() instanceof Tank) { ((Tank)unit.getEntity()).engineHit(); } if(unit.getEntity() instanceof Protomech) { ((Protomech)unit.getEntity()).setEngineHit(true); } Part spare = campaign.checkForExistingSparePart(this); if(!salvage) { campaign.removePart(this); } else if(null != spare) { spare.incrementQuantity(); campaign.removePart(this); } unit.removePart(this); Part missing = getMissingPart(); unit.addPart(missing); campaign.addPart(missing, 0); } setUnit(null); }
aero.setEngineHits(engineCrit.getHits());