hai! oss! vakarimas-ka!?
it will be a bit harder:
Make an AOF unit to be json based (from this java code convert it to JSON.
steps:
- find a json based unit wich is similar (some kind of archer) - i searched one for you, rohan archer see attached
- copy the file and name it as *human_archer*
- modify every property so the new json will work as the info you see below
- codename and ID of unit: UNIT_ARCHER = 1;
- unit image name 32_unit_archer.png, 32x32px.
u.costTurn = 2;
u.sight = 7; //visiblity range
u.rangeAttack = 5; //attack range (what maximal range it can attack) (1 means only nearby unit)
u.attackTypeArrow = true; //if arrow than some units have defense against that
u.hpMax = 11; //health points
u.armorPierce = 0; //how big the armor against arrows
u.armorNormal = 0; //how big the armor against normal attack
u.power = 5; // u.power of its attack
u.rangeWalk = 3; // how far it can walk
u.canWalkHill = false;
u.canWalkForest = true;
u.canOccupyBuilding = true;
u.canBeCarried = true;
u.bonusHealing = 1; // if this unit have bonus when it is healed by an other unit. 1,1 means 10% bonus.
u.convertResistance = 0; // victim property: 0.2 = 20% -> if priest has 30% than 30 - 30*0,2 => priest has 26% to convert.
bonus(u, a (U_CHEAP_INFANTRY_MELEE, UNIT_ORNITHOPTER), 0.5f);
u.bestAgainstMeGround = U_ANTI_ARCHER;
u.bestAgainstMeWater = U_SHIP_ATTACK;
u.builders = new int[]{ //is it built in a TC? or in an archery range? or a worker builds it?
UNIT_TC,
UNIT_BUILDING_ARCHERY
};
u.modifiers = new int[]{//"type"-s (TECH) that modifies its properties
EFFECT_POISONED_ARROWS,
};
u.revokerTechs = new int[]{ //"type"-s that revokes this as a buildable unit/tech (eg. a crossbowman upgrade revokes archer from the palette)
TECH_UPGRADE_UNIT_CROSSBOWMAN,
};
u.races = new int[] { // only these races can build this
RacesLoader.RACE_HUMAN
};