-----------------------------------------------------------------------------
--  File     : /units/UAL0108/UAL0108_script.lua 
--
--  Author(s): EbolaSoup, Resin Smoker, Optimus Prime, Vissroid 
--
--  Summary  : Aeon light assault walker 
--
--  Copyright © 2010 4DC_V0.8  All rights reserved.
-----------------------------------------------------------------------------

local AWalkingLandUnit = import('/lua/aeonunits.lua').AWalkingLandUnit 
local ADFLaserLightWeapon = import('/lua/aeonweapons.lua').ADFLaserLightWeapon
local AAAZealotMissileWeapon = import('/lua/aeonweapons.lua').AAAZealotMissileWeapon 

UAL0108 = Class(AWalkingLandUnit) { 
    Weapons = { 
        MainGun = Class(ADFLaserLightWeapon) {}, 
        RocketBackpack = Class(AAAZealotMissileWeapon) {},
    }, 
    
    CreateEnhancement = function(self, enh)
        AWalkingLandUnit.CreateEnhancement(self, enh)
        local bp = self:GetBlueprint().Enhancements[enh]
        if enh == 'PersonalShield' then
            self:AddToggleCap('RULEUTC_ShieldToggle')
            self:SetEnergyMaintenanceConsumptionOverride(bp.MaintenanceConsumptionPerSecondEnergy or 0)
            self:SetMaintenanceConsumptionActive()
            self:CreatePersonalShield(bp)
        elseif enh == 'PersonalShieldRemove' then
            self:DestroyShield()
            self:SetMaintenanceConsumptionInactive()
            self:RemoveToggleCap('RULEUTC_ShieldToggle')
        end
    end,       
} 
TypeClass = UAL0108