m (1 revision imported)
Line 38: Line 38:
|style="text-align: center;"|'''APC'''
|style="text-align: center;"|'''APC'''
|style="text-align: center;"|'''ARTILLERY'''
|style="text-align: center;"|'''ARTILLERY'''
|style="text-align: center;"|'''FLAK'''
|style="text-align: center;"|'''FLAK'''<ref>Same Unit as Anti Air</ref>
|-
|-
|style="text-align: center;"|'''FLARE'''
|style="text-align: center;"|'''FLARE'''

Revision as of 03:34, 3 March 2023

Notice: Infantry Units are not included in this list, as they are their own Type.

Ground Units stats and properties can be modified as a whole, by using the GameEnums.UnitType_Ground 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_Ground) {
                    return 30;
                }
            break; 
       //rest of the code goes here
       }

    }

}


Increases the Offense of Ground 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:

Ground Units
ANTITANKCANNON APC ARTILLERY FLAK[1]
FLARE HEAVY_TANK[2] HOELLIUM[3] LIGHT_TANK[4]
MEGATANK MISSILE NEOTANK PIPERUNNER
RECON ROCKETTHROWER[5] ZCOUNIT_AUTO_TANK ZCOUNIT_CHAPERON
ZCOUNIT_CRYSTAL_TANK ZCOUNIT_HOT_TANK ZCOUNIT_INTEL_TRUCK ZCOUNIT_IRON_SHIELD_GENERATOR
ZCOUNIT_LOGIC_TRUCK ZCOUNIT_NEOSPIDER_TANK ZCOUNIT_REPAIR_TANK ZCOUNIT_ROYAL_GUARD
ZCOUNIT_SIEGE_CANNON ZCOUNIT_SMUGGLER ZCOUNIT_TANK_HUNTER


Of these, the ones with the ZCOUNIT_ prefix are Units specific to COs that cannot be deployed by the rest.

Notes

  1. ↑ Same Unit as Anti Air
  2. ↑ Same Unit as Md Tank
  3. ↑ Same Unit as Oozium
  4. ↑ Same Unit as Tank
  5. ↑ Same Unit as Rocket Launcher