Astraeus Player's Guide

Dynamic Units

DYNAMIC UNITS

The Design Method



public void design()

{

    setFrame(Frame.MEDIUM);

    setStyle(Style.WEDGE);

    // This unit will use a different weapon against fast teams and slow teams

    if(getPlayer().getAverageEnemyMaxSpeed() > 40)
    {

        addWeapon(new MachineGun(this));

        addWeapon(new MachineGun(this));

    }

    else

    {

        addWeapon(new Megacannon(this));

    }


    // You can write code that keeps adding something until there is no space left.

    while(hasComponentSlotsOpen())

    {

        addUpgrade(new Plating(this));

    }

}

Things To Watch Out For...


You can even make the same unit have two different frames.  In this example, Ares' Phalanx changes from Medium to Heavy based on what the opponent builds.

Example #1:  Countering Light Units

Example #2Against Medium or Heavy Units

UNIT ROLES vs. UNIT EQUIPMENT

Define Units By Role, Not Equipment



Example Unit Roles


In this image you'll see two types of Units that Dionysus controls - the Centaur (Tank) and the Satyr (Damage).   


Both can change out their gear, but has code to make them perform their specific role regardless of the exact weapon.

In this example, the Centaur identified the opponent was mostly small units with shields.

In this example, the Centaur identified the opponent had a lot of structure and range.