Air Units: Difference between revisions
Line 31: | Line 31: | ||
Possible values are, along with their weapon names: | Possible values are, along with their weapon names: | ||
{| class="wikitable" | {| class="wikitable" | ||
!colspan="5"|Air Units | !colspan="5"|Air Units !! Weapon Strings | ||
|- | |- | ||
|style="text-align: center;"|'''K_HELI'''<ref>Same Unit as Battlecopters</ref> | |style="text-align: center;"|'''K_HELI'''<ref>Same Unit as Battlecopters</ref> |
Revision as of 20:41, 5 October 2023
Air Units' stats and properties can be modified as a whole, by using the GameEnums.UnitType_Air variable.For instance:
CO_TEST.getOffensiveBonus = function (co, attacker, atkPosX, atkPosY,
defender, defPosX, defPosY, isDefender, action,luckmode, map) {
if (co.getIsCO0() === true) {
switch (co.getPowerMode()) {
case GameEnums.PowerMode_Power:
if (attacker.getUnitType() === GameEnums.UnitType_Air) {
return 30;
}
break;
//rest of the code goes here
}
}
}
Increases the Offense of Air Units by 30% during the CO Power.
Modifying stats or properties of specific Units
Each Unit can be modified through a comparison of the UnitID. The Unit ID can be obtained through unit.getUnitID() And it's of a String type.
Possible values are, along with their weapon names:
Air Units | Weapon Strings | ||||
---|---|---|---|---|---|
K_HELI[1] | T_HELI[2] | DUSTER[3] | BOMBER | STEALTHBOMBER | |
TRANSPORTPLANE | FIGHTER | WATERPLANE[4] | ZCOUNIT_KIROV[5] | BLACK_BOMB |
Of these, the ones with the ZCOUNIT_ prefix are Units specific to COs that cannot be deployed by the rest.