using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HaloPlugins.Xbox
{
    public class weap : TagDefinition
    {
       public weap() : base("weap", "weapon", 796)
       {
           // Item
           Fields.AddRange(new item().Fields.ToArray());

           // Weap
           Fields.AddRange(new IMetaNode[] {
           new Flags("Flags", new string[] { "Vertical_Heat_Display", "Mutually_Exclusive_Triggers", "Attacks_Automatically_on_Bump", "Must_Be_Readied", "Doesn't_Count_Toward_Maximum", "Aim_Assists_Only_When_Zoomed", "Prevents_Grenade_Throwing", "Must_Be_Picked_Up", "Holds_Triggers_When_Dropped", "Prevents_Melee_Attack", "Detonates_When_Dropped", "Cannot_Fire_At_Maximum_Range", "Secondary_Trigger_Overrides_Grenades", "(OBSOLETE)Does_Not_Depower", "Enables_Integrated_Night_Vision", "AIs_Use_Weapon_Melee_Damage", "Forces_No_Binoculars", "Loop_FP_Firing_Animation", "Prevents_Sprinting", "Cannot_Fire_While_Boosting", "Prevents_Driving", "Prevents_Gunning", "Can_Be_Dual_Wielded", "Can_Only_Be_Dual_Wielded", "Melee_Only", "Cant_Fire_If_Parent_Dead", "Weapon_Ages_With_Each_Kill", "Weapon_Uses_Old_Dual_Fire_Error", "Primary_Trigger_Melee_Attacks", "Cannot_Be_Used_By_Player" }, 32),
           new HaloPlugins.Enum("Secondary Trigger Mode", new string[] { "Normal", "Slaved_To_Primary", "Inhibits_Primary", "Loads_Alternate_Ammunition", "Loads_Multiple_Primary_Ammunition" }, 32),
           new Value("Max Alternate Shots Loaded", typeof(float)),
           new Value("Turn On Time Sec", typeof(float)),
           new Value("Ready Time Sec", typeof(float)),
           new TagReference("Ready_Effect", "****"),
           new TagReference("Ready_Damage_Effect", "jpt!"),
           new Value("Heat Recovery Threshold", typeof(float)),
           new Value("Overheated Threshold", typeof(float)),
           new Value("Heat Detonation Threshold", typeof(float)),
           new Value("Heat Detonation Fraction", typeof(float)),
           new Value("Heat Loss Per Second", typeof(float)),
           new Value("Heat Illumination", typeof(float)),
           new Value("Overheadted Heat Loss Per Second", typeof(float)),
           new TagReference("Overheated", "****"),
           new TagReference("Overheated_Damage_Effect", "jpt!"),
           new TagReference("Detonation", "****"),
           new TagReference("Detonation_Damage_Effect", "jpt!"),
           new TagReference("Player_Melee_Damage", "jpt!"),
           new TagReference("Player_Melee_Response", "jpt!"),
           new Value("Melee Aim Assist Magnetism Angle", typeof(float)),
           new Value("Melee Aim Assist Magnetism Range", typeof(float)),
           new Value("Melee Aim Assist Throttle Magnitude", typeof(float)),
           new Value("Melee Aim Assist Throttle Minimum Distance", typeof(float)),
           new Value("Melee Aim Assist Throttle Maximum Adjustment Angle", typeof(float)),
           new Value("Melee Damage Parameters Damage Pyramid Angles Yaw", typeof(float)),
           new Value("Melee Damage Parameters Damage Pyramid Angles Pitch", typeof(float)),
           new Value("Melee Damage Parameters Damage Pyramid Depth", typeof(float)),
           new TagReference("1st_Hit_Melee_Damage", "****"),
           new TagReference("1st_Hit_Melee_Response_Damage", "****"),
           new TagReference("2nd_Hit_Melee_Damage", "****"),
           new TagReference("2nd_Hit_Melee_Response_Damage", "****"),
           new TagReference("3rd_Hit_Melee_Damage", "****"),
           new TagReference("3rd_Hit_Melee_Response", "****"),
           new TagReference("Lunge_Melee_Damage", "****"),
           new TagReference("Lunge_Melee_Response", "****"),
           new HaloPlugins.Enum("Melee Damage Reporting Type", new string[] { "The_Guardians", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Damage", "Generic_Explosion", "Magnum_Pistol", "Plasma_Pistol", "Needler", "SMG", "Plasma_Rifle", "Battle_Rifle", "Carbine", "Shotgun", "Sniper_Rifle", "Beam_Rifle", "Rocket_Launcher", "Flak_Cannon", "Brute_Shot", "Disintegrator", "Brute_Plasma_Rifle", "Energy_Sword", "Frag_Grenade", "Plasma_Grenade", "Flag_Melee_Damage", "Bomb_Melee_Damage", "Bomb_Explosion_Damage", "Ball_Melee_Damage", "Human_Turret", "Plasma_Turret", "Banshee", "Ghost", "Mongoose", "Scorpion", "Spectre_Driver", "Spectre_Gunner", "Warthog_Driver", "Warthog_Gunner", "Wraith", "Tank", "Sentinal_Beam", "Sentinal_RPG", "Teleporter" }, 16),
           new Value("Magnification Levels", typeof(short)),
           new Value("Magnification Range Lower", typeof(float)),
           new Value("Magnification Range Upper", typeof(float)),
           new Value("Auto Aim Angle Radians", typeof(float)),
           new Value("Auto Aim Range", typeof(float)),
           new Value("Magnetism Angle Radians", typeof(float)),
           new Value("Magnetism Range", typeof(float)),
           new Value("Deviation Angle Radians", typeof(float)),
           new HaloPlugins.Enum("Movement Penalized", new string[] { "Always", "When_Zoomed", "When_Zoomed_or_Reloading" }, 32),
           new Value("Forwards Movement Penalty", typeof(float)),
           new Value("Sideways Movement Penalty", typeof(float)),
           new Padding(16),
           new Value("AI Scariness", typeof(float)),
           new Value("Weapon Power-on Time Sec", typeof(float)),
           new Value("Weapon Power-off Time Sec", typeof(float)),
           new TagReference("Weapon_Power-on_Effect", "****"),
           new TagReference("Weapon_Power-off_Effect", "****"),
           new Value("Age Heat Recovery Penalty", typeof(float)),
           new Value("Age Rate of Fire Penalty", typeof(float)),
           new Value("Age Misfire Start", typeof(float)),
           new Value("Age Misfire Chance", typeof(float)),
           new TagReference("Pickup_Sound", "snd!"),
           new TagReference("Zoom-In_Sound", "snd!"),
           new TagReference("Zoom-Out_Sound", "snd!"),
           new Value("Active Camo Ding", typeof(float)),
           new Value("Active Camo Regrowth Rate", typeof(float)),
           new StringId("Handle Node"),
           new StringId("Weapon Class"),
           new StringId("Weapon Name"),
           new HaloPlugins.Enum("Multiplayer Weapon Type", new string[] { "None", "CTF_Flag", "Oddball_Ball", "Headhunter_Head", "Juggernaught_Powerup" }, 16),
           new HaloPlugins.Enum("Weapon Type", new string[] { "Undefined", "Shotgun", "Needler", "Plasma_Pistol", "Plasma_Rifle", "Rocket_Launcher" }, 16),
           new HaloPlugins.Enum("Tracking Type", new string[] {  }, 32),
           new Padding(16),
           new TagBlock("First Person", 16, -1, new IMetaNode[] { 
               new TagReference("First_Person_Model", "mode"),
               new TagReference("First_Person_Animations", "jmad"),
           }),
           new TagReference("New_HUD_Interface", "****"),
           new TagBlock("Predicted Resource", 8, 2048, new IMetaNode[] { 
               new TagReference("Resource", "****"),
           }),
           new TagBlock("Magazine", 92, 2, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Wastes_Rounds_When_Reloaded", "Every_Round_Must_Be_Chambered" }, 32),
               new Value("Rounds Recharged Per Second", typeof(short)),
               new Value("Rounds Total Initial", typeof(short)),
               new Value("Rounds Total Maximum", typeof(short)),
               new Value("Rounds Total Loaded Maximum", typeof(short)),
               new Value("Max Rounds Held", typeof(int)),
               new Value("Reload Time Seconds", typeof(float)),
               new Value("Rounds Reloaded", typeof(short)),
               new Padding(2),
               new Value("Chamber Time Seconds", typeof(float)),
               new Padding(24),
               new TagReference("Reloading_Effect", "****"),
               new TagReference("Reloading_Damage_Effect", "****"),
               new TagReference("Chambering_Effect", "****"),
               new TagReference("Chambering_Damage_Effect", "****"),
               new TagBlock("Magazines", 12, 8, new IMetaNode[] { 
                   new Value("Rounds", typeof(short)),
                   new Padding(2),
                   new TagReference("Equipment", "eqip"),
               }),
           }),
           new TagBlock("New Triggers", 64, 2, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Autofire_Single_Action_Only" }, 32),
               new HaloPlugins.Enum("Button Used", new string[] { "Right_Trigger", "Left_Trigger", "Melee_Attack_(SP_Only)", "Automated_Fire_(Unassigned)" }, 16),
               new HaloPlugins.Enum("Behavior", new string[] { "Spew", "Latch", "1-Latch_2-Autofire", "Charge", "1-Latch_2-Zoom", "1-Latch_2-Lockon" }, 16),
               new Value("Primary Barrel", typeof(short)),
               new Value("Secondary Barrel", typeof(short)),
               new HaloPlugins.Enum("Prediction", new string[] { "None", "Spew", "Charge" }, 32),
               new Value("Autofire Time", typeof(float)),
               new Value("Autofire Throw", typeof(float)),
               new HaloPlugins.Enum("Secondary Action", new string[] { "Fire", "Charge", "Track", "Fire_Other" }, 32),
               new Value("Charging Time", typeof(float)),
               new Value("Charged Time", typeof(float)),
               new HaloPlugins.Enum("Overcharged Action", new string[] { "None", "Explode", "Discharge" }, 32),
               new Value("Charged Illumination", typeof(float)),
               new Value("Spew Time", typeof(float)),
               new TagReference("Charging_Effect", "****"),
               new TagReference("Charging_Damage_Effect", "****"),
           }),
           new TagBlock("Barrels", 236, 2, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Tracks_Fired_Projectile", "Random_Firing_Effects", "Can_Fire_With_Partial_Ammo", "Projectiles_use_Weapon_Origin", "Ejects_During_Chamber", "Use_Error_When_Unzoomed", "Projectile_Vector_Cannot_Be_Adjusted", "Projectiles_Have_Identical_Error", "Projectiles_Fire_Parallel", "Cant_Fire_When_Others_Firing", "Cant_Fire_When_Others_Recovering", "Don't_Clear_Fire_Bit_After_Recovering", "Stagger_Fire_Across_Multiple_Markers", "Fires_Locked_Projectiles" }, 32),
               new Value("Rounds per Second Min", typeof(float)),
               new Value("Rounds per Second Max", typeof(float)),
               new Value("Acceleration Time Sec", typeof(float)),
               new Value("Deceleration Time Sec", typeof(float)),
               new Value("Barrel Spin Scale", typeof(float)),
               new Value("Blurred Rate Of Fire", typeof(float)),
               new Value("Shots Per Fire Lower", typeof(short)),
               new Value("Shots Per Fire Upper", typeof(short)),
               new Value("Fire Recovery Time Sec", typeof(float)),
               new Value("Soft Recovery Fraction", typeof(float)),
               new Value("Magazine", typeof(short)),
               new Value("Rounds per Shot", typeof(short)),
               new Value("Minimum Rounds Loaded", typeof(short)),
               new Value("Rounds Between Tracers", typeof(short)),
               new StringId("Optional Barrel Marker Name"),
               new HaloPlugins.Enum("Prediction Type", new string[] { "None", "Continuous", "Instant" }, 16),
               new HaloPlugins.Enum("Firing Noise", new string[] { "Silent", "Medium", "Loud", "Shout", "Quiet" }, 16),
               new Value("Error Acceleration Time Sec", typeof(float)),
               new Value("Error Deceleration Time Sec", typeof(float)),
               new Value("Damage Error Lower", typeof(float)),
               new Value("Damage Error Upper", typeof(float)),
               new Value("Dual Weapon Error Acceleration Time Sec", typeof(float)),
               new Value("Dual Weapon Error Deceleration Time Sec", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Dual Weapon Minimum Error Radians", typeof(float)),
               new Value("Dual Weapon Error Angle Lower", typeof(float)),
               new Value("Dual Weapon Error Angle Upper", typeof(float)),
               new Value("Dual Wield Damage Scale", typeof(float)),
               new HaloPlugins.Enum("Distribution Function", new string[] { "Point", "Horizontal_Fan" }, 16),
               new Value("Projectiles per Shot", typeof(short)),
               new Value("Distribution Angle Radians", typeof(float)),
               new Value("Minimum Error", typeof(float)),
               new Value("Error Angle Min", typeof(float)),
               new Value("Error Angle Max", typeof(float)),
               new Value("First Person Offset X", typeof(float)),
               new Value("First Person Offset Y", typeof(float)),
               new Value("First Person Offset Z", typeof(float)),
               new HaloPlugins.Enum("Damage Reporting Type", new string[] { "The_Guardians", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Damage", "Generic_Explosion", "Magnum_Pistol", "Plasma_Pistol", "Needler", "SMG", "Plasma_Rifle", "Battle_Rifle", "Carbine", "Shotgun", "Sniper_Rifle", "Beam_Rifle", "Rocket_Launcher", "Flak_Cannon", "Brute_Shot", "Disintegrator", "Brute_Plasma_Rifle", "Energy_Sword", "Frag_Grenade", "Plasma_Grenade", "Flag_Melee_Damage", "Bomb_Melee_Damage", "Bomb_Explosion_Damage", "Ball_Melee_Damage", "Human_Turret", "Plasma_Turret", "Banshee", "Ghost", "Mongoose", "Scorpion", "Spectre_Driver", "Spectre_Gunner", "Warthog_Driver", "Warthog_Gunner", "Wraith", "Tank", "Sentinal_Beam", "Sentinal_RPG", "Teleporter" }, 32),
               new TagReference("Projectile", "proj"),
               new TagReference("Damage_Effect", "****"),
               new Value("Ejection Port Recovery Time", typeof(float)),
               new Value("Illumination Recovery Time", typeof(float)),
               new Value("Heat Generated Per Round", typeof(float)),
               new Value("Age Generated Per Round", typeof(float)),
               new Value("Overload Time Sec", typeof(float)),
               new Value("Angle Change Per Shot Lower", typeof(float)),
               new Value("Angle Change Per Shot Upper", typeof(float)),
               new Value("Angle Change Acceleration Time Sec", typeof(float)),
               new Value("Angle Change Deceleration Time Sec", typeof(float)),
               new HaloPlugins.Enum("Angle Change Function", new string[] { "Linear", "Early", "Very_Early", "Late", "Very_Late", "Cosine", "Zero", "One" }, 32),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new TagBlock("Firing Effects", 52, 3, new IMetaNode[] { 
                   new Value("Shot Count Lower Bound", typeof(short)),
                   new Value("Shot Count Upper Bound", typeof(short)),
                   new TagReference("Firing_Effect", "****"),
                   new TagReference("Misfire_Effect", "****"),
                   new TagReference("Empty_Effect", "****"),
                   new TagReference("Firing_Damage", "jpt!"),
                   new TagReference("Misfire_Damage", "jpt!"),
                   new TagReference("Empty_Damage", "jpt!"),
               }),
           }),
           new Value("Unknown Calculated Constant", typeof(float)),
           new Value("Unknown Calculated Constant", typeof(float)),
           new Value("Max Movement Acceleration", typeof(float)),
           new Value("Max Movement Velocity", typeof(float)),
           new Value("Max Turning Acceleration", typeof(float)),
           new Value("Max Turning Velocity", typeof(float)),
           new TagReference("Deployed_Vehicle", "vehi"),
           new TagReference("Aged_Effect", "effe"),
           new TagReference("Aged_Weapon", "weap"),
           new Value("FP Weapon Offset i", typeof(float)),
           new Value("FP Weapon Offset j", typeof(float)),
           new Value("FP Weapon Offset k", typeof(float)),
           new Value("FP Scope Size i", typeof(float)),
           new Value("FP Scope Size j", typeof(float)),
           });
       }
    }
}
