Hovercraft Units

Revision as of 04:55, 14 September 2023 by XnKradst (talk | contribs) (Created page with "'''Hovercraft Units'''<nowiki/>' stats and properties can be modified as a whole, by using the '''GameEnums.UnitType_Hovercraft''' enumeration variable. For instance: <syntaxhighlight lang="javascript"> 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.g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
HOVERCRAFT ARTILLERYCRAFT HOVERFLAK HEAVY_HOVERCRAFT