Naval Units: Difference between revisions
Line 31: | Line 31: | ||
Possible values are: | Possible values are: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|+ Naval Units and their weapon strings | |||
|- | |- | ||
!Naval Units !!Primary Weapon String!! Secondary Weapon String | |||
|- | |- | ||
|''' | |'''GUNBOAT'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''CANNONBOAT'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''TORPEDOBOAT'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''FRIGATE'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''DESTROYER'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''CRUISER'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''SUBMARINE'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''BATTLECRUISER'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''BATTLESHIP'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''AIRCRAFTCARRIER'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''BLACKBOAT'''||N/A||N/A | ||
|- | |- | ||
|''' | |'''LANDER'''||N/A||N/A | ||
|- | |- | ||
|'''ZCOUNIT_MISSILE_SUB'''<ref>CO Unit of Drake, Greyfield</ref> | |'''WATERMINE'''||N/A||N/A | ||
|- | |||
|'''ZCOUNIT_MISSILE_SUB'''<ref>CO Unit of Drake, Greyfield</ref>||N/A||N/A | |||
|- | |- | ||
|} | |} |
Revision as of 23:52, 5 October 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 | Primary Weapon String | Secondary Weapon String |
---|---|---|
GUNBOAT | N/A | N/A |
CANNONBOAT | N/A | N/A |
TORPEDOBOAT | N/A | N/A |
FRIGATE | N/A | N/A |
DESTROYER | N/A | N/A |
CRUISER | N/A | N/A |
SUBMARINE | N/A | N/A |
BATTLECRUISER | N/A | N/A |
BATTLESHIP | N/A | N/A |
AIRCRAFTCARRIER | N/A | N/A |
BLACKBOAT | N/A | N/A |
LANDER | N/A | N/A |
WATERMINE | N/A | N/A |
ZCOUNIT_MISSILE_SUB[1] | N/A | N/A |
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