Naval Units: Difference between revisions
(Created page with "Naval Units' stats and properties can be modified as a whole, by using the '''GameEnums.UnitType_Naval''' variable.For instance: <syntaxhighlight lang="javascript"> 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() === Gam...") |
|||
Line 33: | Line 33: | ||
!colspan="10"|Naval Units | !colspan="10"|Naval Units | ||
|- | |- | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''GUNBOAT''' | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''CANNONBOAT''' | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''TORPEDOBOAT''' | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''FRIGATE''' | ||
|- | |- | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''DESTROYER''' | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''CRUISER''' | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''SUBMARINE''' | ||
|style="text-align: center;"|''' | |style="text-align: center;"|'''BATTLECRUISER''' | ||
|style="text-align: center;"|'''BATTLESHIP''' | |||
|- | |||
|style="text-align: center;"|'''AIRCRAFTCARRIER''' | |||
|style="text-align: center;"|'''BLACKBOAT''' | |||
|style="text-align: center;"|'''LANDER''' | |||
|style="text-align: center;"|'''ZCOUNIT_MISSILE_SUB'''<ref>CO Unit of Drake, Greyfield</ref> | |||
|} | |} | ||
Revision as of 05:58, 3 March 2023
Naval Units' stats and properties can be modified as a whole, by using the GameEnums.UnitType_Naval 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_Naval) {
return 30;
}
break;
//rest of the code goes here
}
}
}
Increases the Offense of Naval 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:
Naval Units | |||||||||
---|---|---|---|---|---|---|---|---|---|
GUNBOAT | CANNONBOAT | TORPEDOBOAT | FRIGATE | ||||||
DESTROYER | CRUISER | SUBMARINE | BATTLECRUISER | BATTLESHIP | |||||
AIRCRAFTCARRIER | BLACKBOAT | LANDER | ZCOUNIT_MISSILE_SUB[1] |
Of these, the ones with the ZCOUNIT_ prefix are Units specific to COs that cannot be deployed by the rest.
Notes
- ↑ CO Unit of Drake, Greyfield