No edit summary
No edit summary
Line 1: Line 1:
Infantry Units stats and properties can be modified as a whole, by using the '''GameEnums.UnitType_Infantry''' variable:
Infantry Units stats and properties can be modified as a whole, by using the '''GameEnums.UnitType_Infantry''' 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() === GameEnums.UnitType_Ground) {
                    return 30;
                }
            break;
      //rest of the code goes here
      }
 
    }
 
}
</syntaxhighlight>
 
 
Increases the Offense of Ground Units by 30% during the CO Power.


For instance:




Line 14: Line 36:
|style="text-align: center;"|'''MECH'''
|style="text-align: center;"|'''MECH'''
|style="text-align: center;"|'''SNIPER'''
|style="text-align: center;"|'''SNIPER'''
|style="text-align: center;"|'''MOTORBIKE'''<ref>Same Unit as Anti Air</ref>
|style="text-align: center;"|'''MOTORBIKE'''<ref>Same Unit as that from Days of Ruin/Dark Conflict</ref>
|-
|-
|style="text-align: center;"|'''ZCOUNIT_PARTISAN'''
|style="text-align: center;"|'''ZCOUNIT_PARTISAN'''<ref>CO Unit of Kindle, Alexander</ref>
|style="text-align: center;"|'''ZCOUNIT_COMMANDO'''<ref>Same Unit as Md Tank</ref>
|style="text-align: center;"|'''ZCOUNIT_COMMANDO'''<ref>CO Unit of Sensei, Sophie, Sami  </ref>
|style="text-align: center;"|'''ZCOUNIT_RANGER'''<ref>Same Unit as Oozium</ref>
|style="text-align: center;"|'''ZCOUNIT_RANGER'''<ref>CO Unit of Cairn </ref>
|style="text-align: center;"|'''ZCOUNIT_AT_CYCLE'''<ref>Same Unit as Tank</ref>
|style="text-align: center;"|'''ZCOUNIT_AT_CYCLE'''<ref>CO Unit of Grimm, Flak, Roboandy, Beast, Mary </ref>
|}
|}



Revision as of 04:49, 3 March 2023

Infantry Units stats and properties can be modified as a whole, by using the GameEnums.UnitType_Infantry 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
INFANTRY MECH SNIPER MOTORBIKE[1]
ZCOUNIT_PARTISAN[2] ZCOUNIT_COMMANDO[3] ZCOUNIT_RANGER[4] ZCOUNIT_AT_CYCLE[5]


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 that from Days of Ruin/Dark Conflict
  2. CO Unit of Kindle, Alexander
  3. CO Unit of Sensei, Sophie, Sami
  4. CO Unit of Cairn
  5. CO Unit of Grimm, Flak, Roboandy, Beast, Mary