public static final String BASE_UNIT = "npc_dota_units_base";
public static final String BASE_HERO = "npc_dota_hero_base";
public static final String BASE_ABILITY = "ability_base";
protected static Unit baseUnit(ParserObject baseObject) throws ParserException {
Unit baseUnit = new Unit();
baseUnit.setName("base");
baseUnit.setLevel(baseObject.getInt("Level"));
baseUnit.setAncient(baseObject.optBoolean("IsAncient"));
baseUnit.setNeutral(baseObject.optBoolean("IsNeutralUnitType"));
Unit.Abilities abilities = new Unit.Abilities();
baseUnit.setAbilities(abilities);
Unit.Armor armor = new Unit.Armor();
armor.setPhysical(baseObject.getDouble("ArmorPhysical"));
armor.setMagical(baseObject.getDouble("ArmorMagical"));
baseUnit.setArmor(armor);
Unit.Attack attack = new Unit.Attack();
attack.setAttackCapabilities(baseObject.getString("AttackCapabilities"));
Unit.Attack.Damage damage = new Unit.Attack.Damage();
damage.setDamageType(baseObject.getString("AttackDamageType"));
damage.setMin(baseObject.getInt("AttackDamageMin"));
damage.setMax(baseObject.getInt("AttackDamageMax"));
attack.setDamage(damage);
attack.setRate(baseObject.getDouble("AttackRate"));
attack.setRange(baseObject.getInt("AttackRange"));
attack.setProjectileSpeed(baseObject.getInt("ProjectileSpeed"));
baseUnit.setAttack(attack);
Unit.Attributes attributes = new Unit.Attributes();
attributes.setPrimary(baseObject.getString("AttributePrimary"));
UnitAttribute strength = new UnitAttribute();
strength.setBase(baseObject.getInt("AttributeBaseStrength"));
strength.setGain(baseObject.getDouble("AttributeStrengthGain"));
attributes.setStrength(strength);
UnitAttribute intelligence = new UnitAttribute();
intelligence.setBase(baseObject.getInt("AttributeBaseIntelligence"));
intelligence.setGain(baseObject.getDouble("AttributeIntelligenceGain"));
attributes.setIntelligence(intelligence);
UnitAttribute agility = new UnitAttribute();
agility.setBase(baseObject.getInt("AttributeBaseAgility"));
agility.setGain(baseObject.getDouble("AttributeAgilityGain"));
attributes.setAgility(agility);
baseUnit.setAttributes(attributes);
Unit.Bounty bounty = new Unit.Bounty();
bounty.setXp(baseObject.getInt("BountyXP"));
Unit.Bounty.Gold gold = new Unit.Bounty.Gold();
gold.setMin(baseObject.getInt("BountyGoldMin"));
gold.setMax(baseObject.getInt("BountyGoldMax"));
bounty.setGold(gold);
baseUnit.setBounty(bounty);
Unit.Movement movement = new Unit.Movement();
movement.setMovementCapabilities(baseObject.getString("MovementCapabilities"));
movement.setSpeed(baseObject.getInt("MovementSpeed"));
movement.setTurnRate(baseObject.getDouble("MovementTurnRate"));
baseUnit.setMovement(movement);
Unit.Stats stats = new Unit.Stats();
UnitStatus health = new UnitStatus();
health.setBase(baseObject.getInt("StatusHealth"));
health.setRegeneration(baseObject.getDouble("StatusHealthRegen"));
stats.setHealth(health);
UnitStatus mana = new UnitStatus();
mana.setBase(baseObject.getInt("StatusMana"));
mana.setRegeneration(baseObject.getDouble("StatusManaRegen"));
stats.setMana(mana);
baseUnit.setStats(stats);
Unit.Vision vision = new Unit.Vision();
vision.setDay(baseObject.getInt("VisionDaytimeRange"));
vision.setNight(baseObject.getInt("VisionNighttimeRange"));
baseUnit.setVision(vision);
return baseUnit;
}