//--------------------------------------
// bomblauncher
//--------------------------------------
// made by WingedTwilight
//--------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(bomblauncherSwitchEffect)
{
   effectname = "weapons/mortar_activate";
   minDistance = 2.5;
   maxDistance = 2.5;
};

datablock EffectProfile(bomblauncherFireEffect)
{
   effectname = "weapons/mortar_fire";
   minDistance = 2.5;
   maxDistance = 5.0;
};

datablock EffectProfile(bomblauncherReloadEffect)
{
   effectname = "weapons/mortar_reload";
   minDistance = 2.5;
   maxDistance = 2.5;
};

datablock EffectProfile(bomblauncherDryFireEffect)
{
   effectname = "weapons/mortar_dryfire";
   minDistance = 2.5;
   maxDistance = 2.5;
};

datablock EffectProfile(bomblauncherExplosionEffect)
{
   effectname = "explosions/explosion.xpl03";
   minDistance = 30;
   maxDistance = 65;
};

//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(bomblauncherSwitchSound)
{
   filename    = "fx/weapons/mortar_activate.wav";
   description = AudioClosest3d;
   preload = true;
   effect = bomblauncherSwitchEffect;
};

datablock AudioProfile(bomblauncherReloadSound)
{
   filename    = "fx/weapons/mortar_reload.wav";
   description = AudioClosest3d;
   preload = true;
   effect = bomblauncherReloadEffect;
};

// DELETE IF NOT NEEDED
//datablock AudioProfile(bomblauncherIdleSound)
//{
//   filename    = "fx/weapons/weapon.mortarIdle.wav";
//   description = ClosestLooping3d;
//   preload = true;
//};

datablock AudioProfile(bomblauncherFireSound)
{
   filename    = "fx/vehicles/bomber_bomb_projectile.wav";
   description = AudioDefault3d;
   preload = true;
   effect = bomblauncherFireEffect;
};

datablock AudioProfile(bomblauncherProjectileSound)
{
   filename    = "fx/weapons/mortar_projectile.wav";
   description = ProjectileLooping3d;
   preload = true;
};

datablock AudioProfile(bomblauncherExplosionSound)
{
   filename    = "fx/vehicles/bomber_bomb_impact.wav";
   description = AudioBIGExplosion3d;
   preload = true;
   effect = bomblauncherExplosionEffect;
};

datablock AudioProfile(UnderwaterbomblauncherExplosionSound)
{
   filename    = "fx/weapons/mortar_explode_UW.wav";
   description = AudioBIGExplosion3d;
   preload = true;
   effect = bomblauncherExplosionEffect;
};

datablock AudioProfile(bomblauncherDryFireSound)
{
   filename    = "fx/weapons/mortar_dryfire.wav";
   description = AudioClose3d;
   preload = true;
   effect = bomblauncherDryFireEffect;
};

//----------------------------------------------------------------------------
// Bubbles
//----------------------------------------------------------------------------
datablock ParticleData(bomblauncherBubbleParticle)
{
   dragCoefficient      = 0.0;
   gravityCoefficient   = -0.25;
   inheritedVelFactor   = 0.0;
   constantAcceleration = 0.0;
   lifetimeMS           = 1500;
   lifetimeVarianceMS   = 600;
   useInvAlpha          = false;
   textureName          = "special/bubbles";

   spinRandomMin        = -100.0;
   spinRandomMax        =  100.0;

   colors[0]     = "0.7 0.8 1.0 0.4";
   colors[1]     = "0.7 0.8 1.0 0.4";
   colors[2]     = "0.7 0.8 1.0 0.0";
   sizes[0]      = 0.8;
   sizes[1]      = 0.8;
   sizes[2]      = 0.8;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;
};

datablock ParticleEmitterData(bomblauncherBubbleEmitter)
{
   ejectionPeriodMS = 9;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   ejectionOffset   = 0.1;
   velocityVariance = 0.5;
   thetaMin         = 0;
   thetaMax         = 80;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   particles = "bomblauncherBubbleParticle";
};

//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData( bomblauncherSplashParticle )
{
   dragCoefficient      = 1;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = -1.4;
   lifetimeMS           = 300;
   lifetimeVarianceMS   = 0;
   textureName          = "special/droplet";
   colors[0]     = "0.7 0.8 1.0 1.0";
   colors[1]     = "0.7 0.8 1.0 0.5";
   colors[2]     = "0.7 0.8 1.0 0.0";
   sizes[0]      = 0.05;
   sizes[1]      = 0.2;
   sizes[2]      = 0.2;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;
};

datablock ParticleEmitterData( bomblauncherSplashEmitter )
{
   ejectionPeriodMS = 4;
   periodVarianceMS = 0;
   ejectionVelocity = 3;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 50;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   orientParticles  = true;
   lifetimeMS       = 100;
   particles = "bomblauncherSplashParticle";
};


datablock SplashData(bomblauncherSplash)
{
   numSegments = 10;
   ejectionFreq = 10;
   ejectionAngle = 20;
   ringLifetime = 0.4;
   lifetimeMS = 400;
   velocity = 3.0;
   startRadius = 0.0;
   acceleration = -3.0;
   texWrap = 5.0;

   texture = "special/water2";

   emitter[0] = bomblauncherSplashEmitter;

   colors[0] = "0.7 0.8 1.0 0.0";
   colors[1] = "0.7 0.8 1.0 1.0";
   colors[2] = "0.7 0.8 1.0 0.0";
   colors[3] = "0.7 0.8 1.0 0.0";
   times[0] = 0.0;
   times[1] = 0.4;
   times[2] = 0.8;
   times[3] = 1.0;
};

//---------------------------------------------------------------------------
// bomblauncher Shockwaves
//---------------------------------------------------------------------------
datablock ShockwaveData(UnderwaterbomblauncherShockwave)
{
   width = 15.0;
   numSegments = 32;
   numVertSegments = 6;
   velocity = 10;
   acceleration = 20.0;
   lifetimeMS = 900;
   height = 1.0;
   verticalCurve = 0.5;
   is2D = false;

   texture[0] = "special/shockwave4";
   texture[1] = "special/gradient";
   texWrap = 6.0;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

   colors[0] = "0.4 0.4 1.0 0.50";
   colors[1] = "0.4 0.4 1.0 0.25";
   colors[2] = "0.4 0.4 1.0 0.0";

   mapToTerrain = true;
   orientToNormal = false;
   renderBottom = false;
};

datablock ShockwaveData(bomblauncherShockwave)
{
   width = 15.0;
   numSegments = 32;
   numVertSegments = 6;
   velocity = 15;
   acceleration = 20.0;
   lifetimeMS = 5500;
   height = 1.0;
   verticalCurve = 0.5;
   is2D = true;

   texture[0] = "special/shockwave4";
   texture[1] = "special/gradient";
   texWrap = 6.0;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

   colors[0] = "1.0 1.0 0.3 0.50";
   colors[1] = "1.0 1.0 0.3 0.25";
   colors[2] = "1.0 1.0 0.3 0.0";

   mapToTerrain = false;
   orientToNormal = false;
   renderBottom = true;
};


//--------------------------------------------------------------------------
// bomblauncher Explosion Particle effects
//--------------------------------------
datablock ParticleData( bomblauncherCrescentParticle )
{
   dragCoefficient      = 2;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = -0.0;
   lifetimeMS           = 600;
   lifetimeVarianceMS   = 000;
   textureName          = "special/crescent3";
   colors[0]     = "0.7 1.0 0.7 1.0";
   colors[1]     = "0.7 1.0 0.7 0.5";
   colors[2]     = "0.7 1.0 0.7 0.0";
   sizes[0]      = 4.0;
   sizes[1]      = 8.0;
   sizes[2]      = 9.0;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;
};

datablock ParticleEmitterData( bomblauncherCrescentEmitter )
{
   ejectionPeriodMS = 25;
   periodVarianceMS = 0;
   ejectionVelocity = 40;
   velocityVariance = 5.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 80;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   orientParticles  = true;
   lifetimeMS       = 200;
   particles = "bomblauncherCrescentParticle";
};


datablock ParticleData(bomblauncherExplosionSmoke)
{
   dragCoeffiecient     = 0.4;
   gravityCoefficient   = -0.30;   // rises slowly
   inheritedVelFactor   = 0.025;

   lifetimeMS           = 1250;
   lifetimeVarianceMS   = 500;

   textureName          = "particleTest";

   useInvAlpha =  true;
   spinRandomMin = -100.0;
   spinRandomMax =  100.0;

   textureName = "special/Smoke/bigSmoke";

   colors[0]     = "0.7 0.7 0.7 0.0";
   colors[1]     = "0.4 0.4 0.4 0.5";
   colors[2]     = "0.4 0.4 0.4 0.5";
   colors[3]     = "0.4 0.4 0.4 0.0";
   sizes[0]      = 5.0;
   sizes[1]      = 6.0;
   sizes[2]      = 10.0;
   sizes[3]      = 12.0;
   times[0]      = 0.0;
   times[1]      = 0.333;
   times[2]      = 0.666;
   times[3]      = 1.0;



};

datablock ParticleEmitterData(bomblauncherExplosionSmokeEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 0;

   ejectionOffset = 8.0;


   ejectionVelocity = 1.25;
   velocityVariance = 1.2;

   thetaMin         = 0.0;
   thetaMax         = 90.0;

   lifetimeMS       = 500;

   particles = "bomblauncherExplosionSmoke";

};

//---------------------------------------------------------------------------
// Underwater Explosion
//---------------------------------------------------------------------------
datablock ParticleData(UnderwaterExplosionSparks)
{
   dragCoefficient      = 0;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 500;
   lifetimeVarianceMS   = 350;
   textureName          = "special/crescent3";
   colors[0]     = "0.4 0.4 1.0 1.0";
   colors[1]     = "0.4 0.4 1.0 1.0";
   colors[2]     = "0.4 0.4 1.0 0.0";
   sizes[0]      = 3.5;
   sizes[1]      = 3.5;
   sizes[2]      = 3.5;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;

};

datablock ParticleEmitterData(UnderwaterExplosionSparksEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;
   ejectionVelocity = 17;
   velocityVariance = 4;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 60;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   orientParticles  = true;
   lifetimeMS       = 100;
   particles = "UnderwaterExplosionSparks";
};

datablock ParticleData(bomblauncherExplosionBubbleParticle)
{
   dragCoefficient      = 0.0;
   gravityCoefficient   = -0.25;
   inheritedVelFactor   = 0.0;
   constantAcceleration = 0.0;
   lifetimeMS           = 7500;
   lifetimeVarianceMS   = 600;
   useInvAlpha          = false;
   textureName          = "special/bubbles";

   spinRandomMin        = -100.0;
   spinRandomMax        =  100.0;

   colors[0]     = "0.7 0.8 1.0 0.0";
   colors[1]     = "0.7 0.8 1.0 0.4";
   colors[2]     = "0.7 0.8 1.0 0.0";
   sizes[0]      = 2.0;
   sizes[1]      = 4.0;
   sizes[2]      = 6.0;
   times[0]      = 0.0;
   times[1]      = 0.8;
   times[2]      = 1.0;
};
datablock ParticleEmitterData(bomblauncherExplosionBubbleEmitter)
{
   ejectionPeriodMS = 5;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   ejectionOffset   = 7.0;
   velocityVariance = 0.5;
   thetaMin         = 0;
   thetaMax         = 80;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   particles = "bomblauncherExplosionBubbleParticle";
};

datablock DebrisData( UnderwaterbomblauncherDebris )
{
   emitters[0] = bomblauncherExplosionBubbleEmitter;

   explodeOnMaxBounce = true;

   elasticity = 0.4;
   friction = 0.2;

   lifetime = 10.5;
   lifetimeVariance = 0.2;

   numBounces = 1;
};

datablock ExplosionData(UnderwaterbomblauncherSubExplosion1)
{
   explosionShape = "disc_explosion.dts";
   faceViewer           = true;
   delayMS = 100;
   offset = 3.0;
   playSpeed = 1.5;

   sizes[0] = "0.75 0.75 0.75";
   sizes[1] = "1.0  1.0  1.0";
   sizes[2] = "0.5 0.5 0.5";
   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

};

datablock ExplosionData(UnderwaterbomblauncherSubExplosion2)
{
   explosionShape = "disc_explosion.dts";
   faceViewer           = true;
   delayMS = 50;
   offset = 3.0;
   playSpeed = 0.75;

   sizes[0] = "1.5 1.5 1.5";
   sizes[1] = "1.5 1.5 1.5";
   sizes[2] = "1.0 1.0 1.0";
   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;
};

datablock ExplosionData(UnderwaterbomblauncherSubExplosion3)
{
   explosionShape = "disc_explosion.dts";
   faceViewer           = true;
   delayMS = 0;
   offset = 0.0;
   playSpeed = 0.5;

   sizes[0] = "1.0 1.0 1.0";
   sizes[1] = "2.0 2.0 2.0";
   sizes[2] = "1.5 1.5 1.5";
   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

};

datablock ExplosionData(UnderwaterbomblauncherExplosion)
{
   soundProfile   = UnderwaterbomblauncherExplosionSound;

   shockwave = UnderwaterbomblauncherShockwave;
   shockwaveOnTerrain = true;

   subExplosion[0] = UnderwaterbomblauncherSubExplosion1;
   subExplosion[1] = UnderwaterbomblauncherSubExplosion2;
   subExplosion[2] = UnderwaterbomblauncherSubExplosion3;

   emitter[0] = bomblauncherExplosionBubbleEmitter;
   emitter[1] = UnderwaterExplosionSparksEmitter;

   shakeCamera = true;
   camShakeFreq = "8.0 9.0 7.0";
   camShakeAmp = "100.0 100.0 100.0";
   camShakeDuration = 1.3;
   camShakeRadius = 25.0;
};


//---------------------------------------------------------------------------
// Explosion
//---------------------------------------------------------------------------
datablock ExplosionData(bomblauncherExplosion)
{
   explosionShape = "disc_explosion.dts";
   playSpeed = 1.5;
   soundProfile   = bomblauncherExplosionEffect;
   faceViewer = true;

   sizes[0] = "10.5 10.5 10.5";
   sizes[1] = "10.5 10.5 10.5";
   sizes[2] = "10.5 10.5 10.5";

   shakeCamera = true;
   camShakeFreq = "6.0 7.0 7.0";
   camShakeAmp = "70.0 70.0 70.0";
   camShakeDuration = 1.0;
   camShakeRadius = 80.0;
};

//---------------------------------------------------------------------------
// Smoke particles
//---------------------------------------------------------------------------
datablock ParticleData(bomblauncherSmokeParticle)
{
   dragCoeffiecient     = 0.4;
   gravityCoefficient   = -0.3;   // rises slowly
   inheritedVelFactor   = 0.125;

   lifetimeMS           =  1200;
   lifetimeVarianceMS   =  200;
   useInvAlpha          =  true;
   spinRandomMin        = -100.0;
   spinRandomMax        =  100.0;

   animateTexture = false;

   textureName = "special/Smoke/bigSmoke";

   colors[0]     = "0.7 1.0 0.7 0.5";
   colors[1]     = "0.3 0.7 0.3 0.8";
   colors[2]     = "0.0 0.0 0.0 0.0";
   sizes[0]      = 1.0;
   sizes[1]      = 2.0;
   sizes[2]      = 4.5;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;

};


datablock ParticleEmitterData(bomblauncherSmokeEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 3;

   ejectionVelocity = 2.25;
   velocityVariance = 0.55;

   thetaMin         = 0.0;
   thetaMax         = 40.0;

   particles = "bomblauncherSmokeParticle";
};


//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
//datablock GrenadeProjectileData(bomblauncherShot)
//{
//   projectileShapeName = "bomb.dts";
//   emitterDelay        = -1;
//   directDamage        = 0.0;
//   hasDamageRadius     = true;
//   indirectDamage      = 1.0;
//   damageRadius        = 20.0;
//   radiusDamageType    = $DamageType::bomblauncher;
//   kickBackStrength    = 2500;
//
//   explosion           = "bomblauncherExplosion";
//   underwaterExplosion = "UnderwaterbomblauncherExplosion";
//   velInheritFactor    = 0.5;
//   splash              = bomblauncherSplash;
//   depthTolerance      = 10.0; // depth at which it uses underwater explosion
//
//   baseEmitter         = bomblauncherSmokeEmitter;
//   bubbleEmitter       = bomblauncherBubbleEmitter;
//
//   grenadeElasticity = 0.15;
//   grenadeFriction   = 0.4;
//   armingDelayMS     = 1000;
//   muzzleVelocity    = 50.7;
//   drag              = 0.1;
//
//  sound			 = bomblauncherProjectileSound;
//
//   hasLight    = false;
//   lightRadius = 4;
//   lightColor  = "0.05 0.2 0.05";
//
//   hasLightUnderwaterColor = false;
//   underWaterLightColor = "0.05 0.075 0.2";
//
//};
datablock GrenadeProjectileData(bomblauncherShot)
{
   projectileShapeName  = "weapon_missile_projectile.dts";
   scale = "30 30 30";
   emitterDelay         = -1;
   directDamage         = 0.5;
   hasDamageRadius      = true;
   indirectDamage       = 0.2;
   damageRadius         = 50;
   radiusDamageType     = $DamageType::bomblauncher;
   kickBackStrength     = 2000;

   //explosion            = "DiscExplosion";
   velInheritFactor     = 1.0;

   grenadeElasticity    = 0.25;
   grenadeFriction      = 0.4;
   armingDelayMS        = 250.0;
   muzzleVelocity       = 60.7;
   drag                 = 0.3;

   minRotSpeed          = "60.0 60.0 60.0";
   maxRotSpeed          = "80.0 80.0 80.0";
   scale                = "1.7 1.7 1.7";

   sound                = bomblauncherProjectileSound;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------

datablock ItemData(bomblauncherAmmo)
{
   className = Ammo;
   catagory = "Ammo";
   shapeFile = "ammo_mortar.dts";
   mass = 1;
   elasticity = 0.2;
   friction = 0.6;
   pickupRadius = 2;
	pickUpName = "some bomblauncher ammo";

   computeCRC = true;

};

//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(bomblauncher)
{
   className = Weapon;
   catagory = "Spawn Items";
   shapeFile = "weapon_mortar.dts";
   image = bomblauncherImage;
   mass = 1;
   elasticity = 0.2;
   friction = 0.6;
   pickupRadius = 2;
	pickUpName = "a bomblauncher gun";

   computeCRC = true;
   emap = true;
};

datablock ShapeBaseImageData(bomblauncherImage)
{
   className = WeaponImage;
   shapeFile = "turret_missile_large.dts";
   item = bomblauncher;
   usesEnergy = true;
   fireEnergy = 3;
   minEnergy = 3;
   offset = "0 0 0";
   emap = true;

   projectile = bomblauncherShot;
   projectileType = GrenadeProjectile;

   stateName[0] = "Activate";
   stateTransitionOnTimeout[0] = "ActivateReady";
   stateTimeoutValue[0] = 0.2;
   stateSequence[0] = "Activate";
   stateSound[0] = bomblauncherSwitchSound;

   stateName[1] = "ActivateReady";
   stateTransitionOnLoaded[1] = "Ready";
   stateTransitionOnNoAmmo[1] = "NoAmmo";

   stateName[2] = "Ready";
   stateTransitionOnNoAmmo[2] = "NoAmmo";
   stateTransitionOnTriggerDown[2] = "Fire";
   //stateSound[2] = bomblauncherIdleSound;

   stateName[3] = "Fire";
   stateSequence[3] = "Recoil";
   stateTransitionOnTimeout[3] = "Reload";
   stateTimeoutValue[3] = 0.2;
   stateFire[3] = true;
   stateRecoil[3] = LightRecoil;
   stateAllowImageChange[3] = false;
   stateScript[3] = "onFire";
   stateSound[3] = bomblauncherFireSound;

   stateName[4] = "Reload";
   stateTransitionOnNoAmmo[4] = "NoAmmo";
   stateTransitionOnTimeout[4] = "Ready";
   stateTimeoutValue[4] = 0.5;
   stateAllowImageChange[4] = false;
   stateSequence[4] = "Reload";
   stateSound[4] = bomblauncherReloadSound;

   stateName[5] = "NoAmmo";
   stateTransitionOnAmmo[5] = "Reload";
   stateSequence[5] = "NoAmmo";
   stateTransitionOnTriggerDown[5] = "DryFire";

   stateName[6]       = "DryFire";
   stateSound[6]      = bomblauncherDryFireSound;
   stateTimeoutValue[6]        = 1.5;
   stateTransitionOnTimeout[6] = "NoAmmo";
};

//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
//==============================
//   Audio
//==============================
datablock AudioProfile(plasmaExpSound)
{
   filename    = "fx/explosions/explosion.xpl10.wav";
   description = AudioExplosion3d;
   effect = PlasmaExpEffect;
};
//==============================
//   ShockWave
//==============================
datablock ShockwaveData(PlasmaSpreadShockShockwave)
{
   width = 64.0;
   numSegments = 32;
   numVertSegments = 6;
   velocity = 9.0;
   acceleration = 9.0;
   lifetimeMS = 6650;
   height = 5.0;
   verticalCurve = 0.5;
   is2D = false;

   texture[0] = "special/shockwave4";
   texture[1] = "special/gradient";
   texWrap = 6.0;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

   colors[0] = "1.0 0.8 0.4 0.50";
   colors[1] = "1.0 0.6 0.3 0.25";
   colors[2] = "1.0 0.4 0.2 0.0";

   mapToTerrain = false;
   orientToNormal = false;
   renderBottom = true;
};
//==============================
//   Sparkz
//==============================
datablock ParticleData(NukeSparksParticle)
{
    dragCoefficient = 0;
    gravityCoefficient = 0;
    windCoefficient = 0;
    inheritedVelFactor = 0.2;
    constantAcceleration = 0;
    lifetimeMS = 887;
    lifetimeVarianceMS = 459;
    useInvAlpha = 0;
    spinRandomMin = 0;
    spinRandomMax = 0;
    textureName = "special/bigspark";
    times[0] = 0;
    times[1] = 0.5;
    times[2] = 1;
    colors[0] = "0.560000 0.360000 0.260000 1.000000";
    colors[1] = "0.560000 0.360000 0.260000 1.000000";
    colors[2] = "1.000000 0.360000 0.260000 0.000000";
    sizes[0] = 2.03226;
    sizes[1] = 2.03226;
    sizes[2] = 2.03226;
};

datablock ParticleEmitterData(NukeSparksEmitter)
{
    ejectionPeriodMS = 1;
    periodVarianceMS = 0;
    ejectionVelocity = 12;
    velocityVariance = 6.75;
    ejectionOffset =   0;
    thetaMin = 0;
    thetaMax = 90;
    phiReferenceVel = 0;
    phiVariance = 360;
    overrideAdvances = 0;
    orientParticles= 1;
    orientOnVelocity = 1;
    particles = "NukeSparksParticle";
};
//==============================
//   Sub Explosions
//==============================
datablock ExplosionData(SlowPlasmaSubExplosion1)
{
   explosionShape = "effect_plasma_explosion.dts";
   faceViewer           = true;

   delayMS = 50;

   offset = 5.0;

   playSpeed = 0.1;

   sizes[0] = "1.5 1.5 1.5";
   sizes[1] = "3.0 3.0 3.0";
   times[0] = 0.0;
   times[1] = 1.0;

};

datablock ExplosionData(SlowPlasmaSubExplosion2)
{
   explosionShape = "effect_plasma_explosion.dts";
   faceViewer           = true;

   delayMS = 100;

   offset = 0.1;

   playSpeed = 0.1;

   sizes[0] = "5.0 5.0 5.0";
   sizes[1] = "8.0 8.0 8.0";
   times[0] = 0.0;
   times[1] = 1.0;
};

datablock ExplosionData(PlasmaNukeTopExplosion1)
{
   explosionShape = "effect_plasma_explosion.dts";
   faceViewer           = true;

   delayMS = 50;

   offset = 5.0;

   playSpeed = 0.1;

   sizes[0] = "1.5 1.5 1.5";
   sizes[1] = "3.0 3.0 3.0";
   times[0] = 0.0;
   times[1] = 1.0;

};

datablock ExplosionData(PlasmaNukeTopExplosion2)
{
   explosionShape = "effect_plasma_explosion.dts";
   faceViewer           = true;

   delayMS = 100;

   offset = 7.0;

   playSpeed = 0.1;

   sizes[0] = "8.0 8.0 8.0";
   sizes[1] = "9.0 9.0 9.0";
   times[0] = 0.0;
   times[1] = 1.0;
};
//----------------------------------------------------------------------------
// Debris
//----------------------------------------------------------------------------

datablock ParticleData(FalloutSmokeParticle)
{
    dragCoefficient = 0;
    gravityCoefficient = 0;
    windCoefficient = 0;
    inheritedVelFactor = 0.2;
    constantAcceleration = 0;
    lifetimeMS = 6451;
    lifetimeVarianceMS = 645;
    useInvAlpha = 0;
    spinRandomMin = -60;
    spinRandomMax = 60;
    textureName = "particleTest";
    times[0] = 0;
    times[1] = 0.129032;
    times[2] = 1;
    colors[0] = "1.000000 0.384000 0.000000 1.000000";
    colors[1] = "1.000000 0.328000 0.000000 0.500000";
    colors[2] = "0.000000 0.000000 0.000000 0.000000";
    sizes[0] = 0;
    sizes[1] = 1;
    sizes[2] = 1;
};

datablock ParticleEmitterData(FalloutSmokeEmitter)
{
    ejectionPeriodMS = 7;
    periodVarianceMS = 1;
    ejectionVelocity = 1;
    velocityVariance = 0.2;
    ejectionOffset =   0;
    thetaMin = 0;
    thetaMax = 40;
    phiReferenceVel = 0;
    phiVariance = 360;
    overrideAdvances = 0;
    orientParticles= 0;
    orientOnVelocity = 1;
    particles = "FalloutSmokeParticle";
};


datablock DebrisData( Fallout )
{
   emitters[0] = FalloutSmokeEmitter;

   explodeOnMaxBounce = true;

   elasticity = 0.4;
   friction = 0.2;

   lifetime = 13110;
   lifetimeVariance = 11100;

   numBounces = 20;
};

//==============================
//   Radius explosion data
//==============================
datablock ParticleData(PlasmaBombSplashExplosionParticle)
{
   dragCoefficient      = 2;
   gravityCoefficient   = 0.2;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 900;
   lifetimeVarianceMS   = 225;
   textureName          = "particleTest";
   colors[0]     = "0.56 0.36 0.26 1.0";
   colors[1]     = "0.56 0.36 0.26 0.0";
   sizes[0]      = 3;
   sizes[1]      = 5;
};

datablock ParticleEmitterData(PlasmaBombSplashExplosionEmitter)
{
   ejectionPeriodMS = 7;
   periodVarianceMS = 0;
   ejectionVelocity = 32;
   velocityVariance = 10;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 60;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   particles = "PlasmaBombSplashExplosionParticle";
};


datablock ExplosionData(PlasmaBurstColExplosion)
{
  // explosionShape = "effect_plasma_explosion.dts";
   soundProfile   = plasmaExpSound;
   particleEmitter = PlasmaBombSplashExplosionEmitter;
   emitter[0] = NukeSparksEmitter;
   particleDensity = 250;
   particleRadius = 1.25;
   faceViewer = true;
   //shockwave = PlasmaSpreadShockShockwave;
   //shockwaveOnTerrain = false;

   subExplosion[0] = SlowPlasmaSubExplosion1;
   subExplosion[1] = SlowPlasmaSubExplosion2;
   debris = Fallout;
   debrisThetaMin = 10;
   debrisThetaMax = 50;
   debrisNum = 2;
   debrisVelocity = 26.0;
   debrisVelocityVariance = 7.0;
   shakeCamera = true;
   camShakeFreq = "10.0 6.0 9.0";
   camShakeAmp = "20.0 20.0 20.0";
   camShakeDuration = 1.5;
   camShakeRadius = 200.0;
};

datablock ExplosionData(PlasmaBurstBottomExplosion)
{
  // explosionShape = "effect_plasma_explosion.dts";
   soundProfile   = plasmaExpSound;
   particleEmitter = PlasmaBombSplashExplosionEmitter;
   emitter[0] = NukeSparksEmitter;
   particleDensity = 250;
   particleRadius = 1.25;
   faceViewer = true;
   shockwave = PlasmaSpreadShockShockwave;
   shockwaveOnTerrain = false;

   subExplosion[0] = PlasmaNukeSubExplosion1;
   subExplosion[1] = PlasmaNukeSubExplosion2;
      debris = Fallout;
   debrisThetaMin = 10;
   debrisThetaMax = 50;
   debrisNum = 2;
   debrisVelocity = 26.0;
   debrisVelocityVariance = 7.0;
   shakeCamera = true;
   camShakeFreq = "10.0 6.0 9.0";
   camShakeAmp = "20.0 20.0 20.0";
   camShakeDuration = 1.5;
   camShakeRadius = 200.0;
};

datablock ExplosionData(PlasmaBurstTopExplosion)
{
  // explosionShape = "effect_plasma_explosion.dts";
   soundProfile   = plasmaExpSound;
   particleEmitter = PlasmaBombSplashExplosionEmitter;
   emitter[0] = NukeSparksEmitter;
   particleDensity = 250;
   particleRadius = 1.25;
   faceViewer = true;
   shockwave = PlasmaSpreadShockShockwave;
   shockwaveOnTerrain = false;

   subExplosion[0] = PlasmaNukeTopExplosion1;
   subExplosion[1] = PlasmaNukeTopExplosion2;
      debris = Fallout;
   debrisThetaMin = 10;
   debrisThetaMax = 50;
   debrisNum = 4;
   debrisVelocity = 26.0;
   debrisVelocityVariance = 7.0;
   shakeCamera = true;
   camShakeFreq = "10.0 6.0 9.0";
   camShakeAmp = "20.0 20.0 20.0";
   camShakeDuration = 1.5;
   camShakeRadius = 200.0;
};
datablock LinearProjectileData(PPPC)
{
   projectileShapeName = "turret_muzzlepoint.dts";
   emitterDelay        = -1;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.50;
   damageRadius        = 7.5;
   radiusDamageType    = $DamageType::Plasma;
   kickBackStrength    = 1750;

   //sound 				= discProjectileSound;
   explosion           = "PlasmaBurstColExplosion";
   underwaterExplosion = "PlasmaBurstColExplosion";
   //splash              = DiscSplash;

   dryVelocity       = 90;
   wetVelocity       = 50;
   velInheritFactor  = 0.5;
   fizzleTimeMS      = 100;
   lifetimeMS        = 140;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 15.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = 5000;

   activateDelayMS = 200;
};

datablock LinearProjectileData(PPPC2)
{
   projectileShapeName = "turret_muzzlepoint.dts";
   emitterDelay        = -1;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.50;
   damageRadius        = 7.5;
   radiusDamageType    = $DamageType::Plasma;
   kickBackStrength    = 1750;
   explosion           = "PlasmaBurstColExplosion";
   underwaterExplosion = "PlasmaBurstColExplosion";
   dryVelocity       = 90;
   wetVelocity       = 50;
   velInheritFactor  = 0.5;
   fizzleTimeMS      = 100;
   lifetimeMS        = 140;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 15.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = 5000;
   activateDelayMS = 200;
};

datablock LinearProjectileData(PPPCT)
{
   projectileShapeName = "turret_muzzlepoint.dts";
   emitterDelay        = -1;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.50;
   damageRadius        = 7.5;
   radiusDamageType    = $DamageType::Plasma;
   kickBackStrength    = 1750;
   explosion           = "PlasmaBurstTopExplosion";
   underwaterExplosion = "PlasmaBurstTopExplosion";
   dryVelocity       = 90;
   wetVelocity       = 50;
   velInheritFactor  = 0.5;
   fizzleTimeMS      = 100;
   lifetimeMS        = 100;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 15.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = 5000;
   activateDelayMS = 200;
};

datablock LinearProjectileData(PPPCB)
{
   projectileShapeName = "turret_muzzlepoint.dts";
   emitterDelay        = -1;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.50;
   damageRadius        = 7.5;
   radiusDamageType    = $DamageType::Plasma;
   kickBackStrength    = 1750;
   explosion           = "PlasmaBurstTopExplosion";
   underwaterExplosion = "PlasmaBurstTopExplosion";
   dryVelocity       = 0;
   wetVelocity       = 0;
   velInheritFactor  = 0.5;
   fizzleTimeMS      = 0;
   lifetimeMS        = 0;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 15.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = 5000;
   activateDelayMS = 200;
};


//function MortarImage::onFire(%data, %obj, %slot)
//{
// for(%i = 0; %i < 1; %i++)
// {
//schedule(0, 0, "jet", %obj);
//}
   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//      %obj.decInventory(%data.ammo,1);
//   return %p;
//}



function bomblauncherShot::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC2";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 4; %i++)
      {
      %vector = "0 0 1";
     %p = new (%projectileType)()
     {
        dataBlock        = %projectile;
        initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
           for(%i = 0; %i < 4; %i++)
      {
      %vector = "0 0 0";
      %Q = new (%projectileType)()
      {
         dataBlock        = PPPCB;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
     };

      MissionCleanup.add(%Q);
     }
    Parent::onExplode(%data, %proj, %pos, %mod);

}

function PPPC2::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      //%projectileSpread = 2.88;
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function PPPC::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC2";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}
function PPPC2::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      //%projectileSpread = 2.88;
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function PPPC::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC2";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function PPPC2::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      //%projectileSpread = 2.88;
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function PPPC::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC2";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function PPPC2::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPC";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      //%projectileSpread = 2.88;
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function PPPC::onExplode(%data, %proj, %pos, %mod)
{
%projectile = "PPPCT";
%projectileType = "LinearProjectile";
      for(%i = 0; %i < 1; %i++)
      {
      %vector = "0 0 1";
      %p = new (%projectileType)()
      {
         dataBlock        = %projectile;
         initialDirection = %vector;
         initialPosition  = %pos;
         sourceObject     = %proj.sourceObject;
         sourceSlot       = -1;
         vehicleObject    = 0;
      };

      MissionCleanup.add(%p);
     }
     Parent::onExplode(%data, %proj, %pos, %mod);
}

function bomblauncherImage::onmount(%this, %obj, %slot)
{
      %message = "BombLauncher!";
      CommandToClient(%obj.client, 'BottomPrint', %message, 2, 1 );
}
