-----------------------------------------------------------------------------
--  File     : /units/xsl0202/xsl0202_unit.bp
--
--  Author(s): EbolaSoup, Resin Smoker, Optimus Prime, Vissroid 
--
--  Summary  : Seraphim Heavy Bot Script (Modded for unit phasing)
--
--  Copyright © 2010 4DC_V0.8  All rights reserved.
----------------------------------------------------------------------------- 
UnitBlueprint {
    AI = { 
        TargetBones = {
            'Torso',
        },
    },
    Audio = {
        AmbientMove = Sound {
            Bank = 'XSL',
            Cue = 'XSL0202_Move_Loop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        Destroyed = Sound {
            Bank = 'XSL_Destroy',
            Cue = 'XSL_Destroy_Land_Med',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StartMove = Sound {
            Bank = 'XSL',
            Cue = 'XSL0202_Move_Start',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StopMove = Sound {
            Bank = 'XSL',
            Cue = 'XSL0202_Move_Stop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        UISelection = Sound {
            Bank = 'SeraphimSelect',
            Cue = 'Seraphim_Select_Bot',
            LodCutoff = 'UnitMove_LodCutoff',
        },
    },
    Buffs = {
        Regen = {
            Level1 = 2,
            Level2 = 4,
            Level3 = 6,
            Level4 = 8,
            Level5 = 10,
        },
    },
    BuildIconSortPriority = 20,
    Categories = {
        'PRODUCTFA',
        'SELECTABLE',
        'BUILTBYTIER2FACTORY',
        'BUILTBYTIER3FACTORY',
        'SERAPHIM',
        'MOBILE',
        'LAND',
        'TECH2',
        'DIRECTFIRE',
        'VISIBLETORECON',
        'RECLAIMABLE',
        'BOT',
        'OVERLAYDIRECTFIRE',
        'PHASING',          
    },
    CollisionOffsetZ = 0,
    Defense = {
        AirThreatLevel = 0,
        ArmorType = 'Normal',
        EconomyThreatLevel = 0,
        Health = 2300,
        MaxHealth = 2300,
        RegenRate = 0,
        SubThreatLevel = 0,
        SurfaceThreatLevel = 6,
        Phasing = {
            -- Added for Phasing ability  
            PhaseMesh = '/mods/4DC_V0.8/hook/units/xsl0202/xsl0202_phase_mesh',
            StandardMesh = '/mods/4DC_V0.8/hook/units/xsl0202/xsl0202_standard_mesh',          
            PhasePercent = 33,
            StartsOn = true,
        },         
    },
    Description = '<LOC xsl0202_desc>Assault Bot',
    Display = {
        Abilities = {
            '33% Phasing', 
        },       
        AnimationDeath = {
            {
                Animation = '/units/XSL0202/XSL0202_ADeath.sca',
                AnimationRateMax = 1.5,
                AnimationRateMin = 0.5,
                Weight = 100,
            },
            {
                Animation = '/units/XSL0202/XSL0202_ADeath02.sca',
                AnimationRateMax = 1.5,
                AnimationRateMin = 0.5,
                Weight = 100,
            },
            {
                Animation = '/units/XSL0202/XSL0202_ADeath03.sca',
                AnimationRateMax = 1.5,
                AnimationRateMin = 0.5,
                Weight = 100,
            },
        },
        AnimationWalk = '/units/xsl0202/xsl0202_Awalk.sca',
        Mesh = {
            IconFadeInZoom = 130,
            LODs = {
                {
                    AlbedoName = '/units/xsl0202/xsl0202_albedo.dds',
                    MeshName = '/units/xsl0202/xsl0202_lod0.scm',
                    SpecularName = '/units/xsl0202/xsl0202_specteam.dds',
                    NormalsName = '/units/xsl0202/XSL0202_normalsTS.dds',             
                    ShaderName = 'Seraphim',
                    LookupName = '/textures/environment/Falloff_seraphim_lookup.dds',           
                    LODCutoff = 130,
                },
                {
                    AlbedoName = '/units/xsl0202/xsl0202_lod1_albedo.dds',
                    MeshName = '/units/xsl0202/xsl0202_lod1.scm',            
                    SpecularName = '/units/xsl0202/xsl0202_lod1_specteam.dds',
                    NormalsName = '/units/xsl0202/XSL0202_lod1_normalsTS.dds',               
                    ShaderName = 'Seraphim',            
                    LODCutoff = 215,            
                }, 
            },
        },
        MovementEffects = {
            Land = {
                Effects = {
                    {
                        Bones = {
                            'Left_Exhaust',
                            'Right_Exhaust',
                        },
                        Scale = 0.5,
                        Type = 'GroundKickup01',
                    },
                },
                Footfall = {
                    Bones = {
                        {
                            FootBone = 'Left_Exhaust',
                            HipBone = 'Left_Leg_B01',
                            KneeBone = 'Left_Leg_B03',
                            Type = 'FootFall02',
                        },
                        {
                            FootBone = 'Right_Exhaust',
                            HipBone = 'Right_Leg_B01',
                            KneeBone = 'Right_Leg_B03',
                            Type = 'FootFall02',
                        },
                    },
                },
            },
        },
        PlaceholderMeshName = 'UXL0001',
        SpawnRandomRotation = true,
        TransportAnimation = {
            {
                Animation = '/mods/4DC_V0.8/hook/units/XSL0202/XSL0202_afold.sca',            
                Weight = 100,
            },
        },
        TransportDropAnimation = {
            {
                Animation = '/mods/4DC_V0.8/hook/units/XSL0202/XSL0202_aunfold.sca',              
                Weight = 100,
            },
        },
        UniformScale = 0.05,
    },
    Economy = {
        BuildCostEnergy = 1800,
        BuildCostMass = 360,
        BuildTime = 1600,
        TeleportEnergyMod = 0.15,
        TeleportMassMod = 1,
        TeleportTimeMod = 0.01,
        MaintenanceConsumptionPerSecondEnergy = 15,  -- Added for Phasing ability          
    },
    General = {
        Category = 'Direct Fire',
        Classification = 'RULEUC_MilitaryVehicle',
        CommandCaps = {
            RULEUCC_Attack = true,
            RULEUCC_CallTransport = true,
            RULEUCC_Capture = false,
            RULEUCC_Guard = true,
            RULEUCC_Move = true,
            RULEUCC_Nuke = false,
            RULEUCC_Patrol = true,
            RULEUCC_Reclaim = false,
            RULEUCC_Repair = false,
            RULEUCC_RetaliateToggle = true,
            RULEUCC_Stop = true,
            RULEUCC_Transport = false,
        },
        FactionName = 'Seraphim',
        Icon = 'land',
        OrderOverrides = {
            -- Added for Phasing ability  
            RULEUTC_SpecialToggle = {
                bitmapId = 'shield-dome',
                helpText = 'Phasing',
            },
        },          
        TechLevel = 'RULEUTL_Advanced',
        ToggleCaps = {
            -- Added for Phasing ability  
            RULEUTC_SpecialToggle = true,
        },          
        UnitName = '<LOC xsl0202_name>Ilshavoh',
        UnitWeight = 1,
    },
    Intel = {
        VisionRadius = 20,
    },
    Interface = {
        HelpText = '<LOC xsl0202_help>Assault Bot',
    },
    LifeBarHeight = 0.075,
    LifeBarOffset = 0.2,
    LifeBarSize = 0.95,
    Physics = {
        BankingSlope = 0,
        BuildOnLayerCaps = {
            LAYER_Air = false,
            LAYER_Land = true,
            LAYER_Orbit = false,
            LAYER_Seabed = false,
            LAYER_Sub = false,
            LAYER_Water = false,
        },
        DragCoefficient = 0.2,
        MaxAcceleration = 2.9,
        MaxBrake = 2.9,
        MaxSpeed = 2.9,
        MaxSpeedReverse = 0,
        MaxSteerForce = 3,
        MeshExtentsX = 1,
        MeshExtentsY = 0.5,
        MeshExtentsZ = 1,
        MinSpeedPercent = 0,
        MotionType = 'RULEUMT_Land',
        RotateOnSpot = false,
        TurnRadius = 2,
        TurnRate = 45,
    },
    SelectionSizeX = 0.55,
    SelectionSizeZ = 0.5,
    SelectionThickness = 0.7,
    SizeX = 1,
    SizeY = 1.1,
    SizeZ = 0.9,
    StrategicIconName = 'icon_land2_directfire',
    ModIconName = '4dc',
    StrategicIconSortPriority = 125,
    Transport = {
        TransportClass = 2,
    },
    Veteran = {
        Level1 = 9,
        Level2 = 18,
        Level3 = 27,
        Level4 = 35,
        Level5 = 42,
    },
    Weapon = {
        {
            AboveWaterTargetsOnly = true,
            Audio = {
                Fire = Sound {
                    Bank = 'XSL_Weapon',
                    Cue = 'XSL0202_AireAuBolter',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            BallisticArc = 'RULEUBA_LowArc',
            CollideFriendly = false,
            Damage = 35,
            DamageRadius = 0,
            DamageType = 'Normal',
            DisplayName = 'Aire-au Bolter',
            FireTargetLayerCapsTable = {
                Land = 'Land|Water|Seabed',
                Water = 'Land|Water|Seabed',
            },
            FiringTolerance = 1,
            Label = 'MainGun',
            MaxRadius = 26,
            MuzzleChargeDelay = 0,
            MuzzleSalvoDelay = 0,
            MuzzleSalvoSize = 1,
            MuzzleVelocity = 30,
            ProjectileId = '/projectiles/SDFAireauBolter01/SDFAireauBolter01_proj.bp',
            ProjectileLifetimeUsesMultiplier = 1.15,
            ProjectilesPerOnFire = 1,
            RackBones = {
                {
                    MuzzleBones = {
                        'Right_Muzzle',
                    },
                    RackBone = 'Right_Arm',
                },
                {
                    MuzzleBones = {
                        'Left_Muzzle',
                    },
                    RackBone = 'Left_Arm',
                },
            },
            RackFireTogether = false,
            RackRecoilDistance = 0,
            RackReloadTimeout = 10,
            RackSalvoChargeTime = 0,
            RackSalvoReloadTime = 0,
            RackSalvoSize = 1,
            RackSlavedToTurret = true,
            RangeCategory = 'UWRC_DirectFire',
            RateOfFire = 3,
            TargetCheckInterval = 0.66,
            TargetPriorities = {
                'SPECIALHIGHPRI',
                'TECH1 MOBILE',
                'TECH2 MOBILE',
                'TECH3 MOBILE',
                'STRUCTURE DEFENSE',
                'SPECIALLOWPRI',
                'ALLUNITS',
            },
            TargetRestrictDisallow = 'UNTARGETABLE',
            TrackingRadius = 1.15,
            TurretBoneDualMuzzle = 'Left_Muzzle',
            TurretBoneDualPitch = 'Left_Arm',
            TurretBoneMuzzle = 'Right_Muzzle',
            TurretBonePitch = 'Right_Arm',
            TurretBoneYaw = 'Torso',
            TurretDualManipulators = true,
            TurretPitch = 0,
            TurretPitchRange = 60,
            TurretPitchSpeed = 60,
            TurretYaw = 0,
            TurretYawRange = 180,
            TurretYawSpeed = 180,
            Turreted = true,
            WeaponCategory = 'Direct Fire',
            WeaponRepackTimeout = 0,
            WeaponUnpacks = false,
        },
    },
    Wreckage = {
        Blueprint = '/props/DefaultWreckage/DefaultWreckage_prop.bp',
        EnergyMult = 0,
        HealthMult = 0.9,
        MassMult = 0.9,
        ReclaimTimeMultiplier = 1,
        WreckageLayers = {
            Air = false,
            Land = true,
            Seabed = false,
            Sub = false,
            Water = false,
        },
    },
}
