Line 29: Line 29:
!Hovercraft Units !!Primary Weapon String!! Secondary Weapon String
!Hovercraft Units !!Primary Weapon String!! Secondary Weapon String
|-
|-
|'''HOVERCRAFT'''||WEAPON_HOVERVULCAN_CANNON||N/A
|'''HOVERCRAFT'''||WEAPON_HOVERCRAFT_GUN||WEAPON_HOVERCRAFT_MG
|-
|-
|'''ARTILLERYCRAFT'''||WEAPON_CANNON||N/A
|'''ARTILLERYCRAFT'''||WEAPON_CANNON||N/A

Revision as of 23:06, 5 October 2023

Hovercraft Units' stats and properties can be modified as a whole, by using the GameEnums.UnitType_Hovercraft enumeration variable. For instance:

this.getOffensiveBonus = function (co, attacker, atkPosX, atkPosY,
    defender, defPosX, defPosY, isDefender, action, luckmode, map)
{
    if (co.getIsCO0() === true)
    {
        if (co.getPowerMode() === GameEnums.PowerMode_Power)
        {
            if (attacker.getUnitType() === GameEnums.UnitType_Hovercraft)
            {
                return 30;
            }
        }
    }
    return 0;
};

Increases the firepower of hovercraft units by 30% during the CO Power.

Modifying stats or properties of specific Units

Each unit can be modified through a comparison of the Unit ID. The Unit ID can be obtained through unit.getUnitID(), and it's of a string type.

Possible values are:

Hovercraft Units and their weapon strings
Hovercraft Units Primary Weapon String Secondary Weapon String
HOVERCRAFT WEAPON_HOVERCRAFT_GUN WEAPON_HOVERCRAFT_MG
ARTILLERYCRAFT WEAPON_CANNON N/A
HOVERFLAK WEAPON_HOVERVULCAN_CANNON N/A
HEAVY_HOVERCRAFT WEAPON_HEAVY_HOVERCRAFT_GUN WEAPON_HEAVY_HOVERCRAFT_MG