int Enemy::getReward() { return getArmorRating() + getAttackRating(); }
void TurretDataComponent::fillAttributeList(AttributeListMessage* alm) { if (getParent() == NULL) return; ManagedReference<InstallationObject*> turret = cast<InstallationObject*>(getParent()); alm->insertAttribute("condition",String::valueOf(turret->getMaxCondition() - turret->getConditionDamage()) + "/" + String::valueOf(turret->getMaxCondition())); if (getArmorRating() == 0) alm->insertAttribute("armorrating", "None"); else if (getArmorRating() == 1) alm->insertAttribute("armorrating", "Light"); else if (getArmorRating() == 2) alm->insertAttribute("armorrating", "Medium"); else if (getArmorRating() == 3) alm->insertAttribute("armorrating", "Heavy"); if (getKinetic() > 90) { StringBuffer txt; txt << round(getKinetic()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_kinetic", txt.toString()); } if (getEnergy() > 90) { StringBuffer txt; txt << round(getEnergy()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_energy", txt.toString()); } if (getElectricity() > 90) { StringBuffer txt; txt << round(getElectricity()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_elemental_electrical", txt.toString()); } if (getStun() > 90) { StringBuffer txt; txt << round(getStun()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_stun", txt.toString()); } if (getBlast() > 90) { StringBuffer txt; txt << round(getBlast()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_blast", txt.toString()); } if (getHeat() > 90) { StringBuffer txt; txt << round(getHeat()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_elemental_heat", txt.toString()); } if (getCold() > 90) { StringBuffer txt; txt << round(getCold()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_elemental_cold", txt.toString()); } if (getAcid() > 90) { StringBuffer txt; txt << round(getAcid()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_elemental_acid", txt.toString()); } if (getLightSaber() > 90) { StringBuffer txt; txt << round(getLightSaber()) << "%"; alm->insertAttribute("cat_armor_special_protection.armor_eff_restraint", txt.toString()); } if (getKinetic() > 0 && getKinetic() <= 90) { StringBuffer txt; txt << round(getKinetic()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_kinetic", txt.toString()); } if (getEnergy() > 0 && getEnergy() <= 90) { StringBuffer txt; txt << round(getEnergy()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_energy", txt.toString()); } if (getElectricity() > 0 && getElectricity() <= 90) { StringBuffer txt; txt << round(getElectricity()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_elemental_electrical", txt.toString()); } if (getStun() > 0 && getStun() <= 90) { StringBuffer txt; txt << round(getStun()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_stun", txt.toString()); } if (getBlast() > 0 && getBlast() <= 90) { StringBuffer txt; txt << round(getBlast()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_blast", txt.toString()); } if (getHeat() > 0 && getHeat() <= 90) { StringBuffer txt; txt << round(getHeat()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_elemental_heat", txt.toString()); } if (getCold() > 0 && getCold() <= 90) { StringBuffer txt; txt << round(getCold()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_elemental_cold", txt.toString()); } if (getAcid() > 0 && getAcid() <= 90) { StringBuffer txt; txt << round(getAcid()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_elemental_acid", txt.toString()); } if (getLightSaber() > 0 && getLightSaber() <= 90) { StringBuffer txt; txt << round(getLightSaber()) << "%"; alm->insertAttribute("cat_armor_effectiveness.armor_eff_restraint", txt.toString()); } if (getKinetic() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_kinetic", "-"); if (getEnergy() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_energy", "-"); if (getElectricity() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_elemental_electrical", "-"); if (getStun() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_stun", "-"); if (getBlast() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_blast", "-"); if (getHeat() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_elemental_heat", "-"); if (getCold() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_elemental_cold", "-"); if (getAcid() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_elemental_acid", "-"); if (getLightSaber() < 0) alm->insertAttribute("cat_armor_vulnerability.armor_eff_restraint", "-"); }