// free for all game mode

if (!$gameModeAdded["LandDispute"])
{
$gameModeAdded["LandDispute"] = true;
$gameModeName[$nGameMode] = "LandDispute";
$gameModePrintName[$nGameMode] = "Land Dispute";
$gameModePrintInServerList[$nGameMode] = false;
$nGameMode ++;
}

$restartOnDeath = true;

$nUCLives = 2;

$nContinues = 2;


////////////////////////////////////////////////////////////////////////////////
// initialisation stuff







// called when the server loads the map
function LandDispute::ServerStarted(%this)
{
   $GMMissionArea = MissionArea;

   $nSlots = 24;

   $nEnemies = 0;

   $nEnemiesToSpawn = 0;

   // we don't reset the disputer
   if (!$restartingEscapade)
      $disputer = 0;

   $waveN = 0;

   $nEnemiesToSpawn ++;
   $boss = addEnemy(BossED1, "0 0 0", 0, 1, -1, true);

   $boss.setShapeName("Edge");
   $boss.client.name = "Edge";

   $boss.useExaggeratedAnim = true;
   disactivateSword($boss);

   $fightInfo.landDisputeMode = true;
   $fightInfo.duringWave = false;
   $fightInfo.setBoss($boss);

   $landDisputeEscapade = "r1";

   if (!$restartingEscapade)
   {
      if ($landDisputeEscapade $= "r1")
      {
         $escapade = createRandomEscapade($LDRandLevel[1]);
         $escapade.startText = "What piffle was this?  I faced wave upon wave of interminable fools.";
         $randomLevel = true;
      }
      else if ($landDisputeEscapade $= "r2")
      {
         $escapade = createRandomEscapade($LDRandLevel[2]);
         $escapade.startText = "They would never stop coming, but I would never start caring.";
         $randomLevel = true;
      }
      else if ($landDisputeEscapade $= "r3")
      {
         $escapade = createRandomEscapade($LDRandLevel[3]);
         $escapade.startText = "This could be slightly more testing: my skills were stretched.";
         $randomLevel = true;
      }
      else if ($landDisputeEscapade $= "r4")
      {
         $escapade = createRandomEscapade($LDRandLevel[4]);
         $escapade.startText = "Infinite enemies?  If only I had infinite time...";
         $randomLevel = true;
      }
      else if ($landDisputeEscapade $= "r5")
      {
         $escapade = createRandomEscapade($LDRandLevel[5]);
         $escapade.startText = "Some things in life seem impossible...";
         $randomLevel = true;
      }
      else if ($landDisputeEscapade $= "r6")
      {
         $escapade = createRandomEscapade($LDRandLevel[6]);
         $escapade.startText = "Some things in life are impossible...";
         $randomLevel = true;
      }
      else if ($landDisputeEscapade !$= "")
      {
         $escapade = $landDisputeEscapade;
         $randomLevel = false;
      }
      else
      {
         $escapade = TestEscapade1;
         $randomLevel = false;
      }
   }

   


   $encounterNumber = 0;

   $botTaunts = false;

   $bossFight = false;

   //debug
   //TutorialBox_back.setVisible(1);
   //TutorialBox.setVisible(1);

   //$playerAutoTaunt = true;

   $clientPrintText = "Welcome to Land Dispute, click to start.";


   setUCText("");


   // client side stuff
   enemyRubies.setVisible(0);
   enemyScore.setVisible(0);
   enemyBlue.setVisible(0);
   $dontUseEnemyScores = true;


   // client side!
   
   $savedPRTC = $pref::Net::PacketRateToClient;
   $savedPRTS = $pref::Net::PacketRateToServer;

   $pref::Net::PacketRateToClient = 32;
   $pref::Net::PacketRateToServer = 32;


   if ($landDisputeEscapade $= "BonusEscapade")
      $charliePlay = alxPlay(CharlieStretch);


   //bossTauntPose();
}



function bossTauntPose()
{
   cancel($bossTauntPoseSchedule);

   %t = $bossTauntPose[getRandom(0, $nBossTauntPoses - 1)];

// clientside!

   $boss.playTauntPose(%t);


   if ($me.getGhostIndex($boss) && $me.getGhostIndex($boss) != -1)
   {
      ServerConnection.resolveGhost($me.getGhostIndex($boss)).playTauntPose(%t);
   }
   %time = 3000 + getRandom() * 5000;
   
   
   $bossTauntPoseSchedule = schedule(%time, 0, "bossTauntPose");
}


function stopBossTaunting()
{
   cancel($bossTauntPoseSchedule);

}


function bossShoutTaunt()
{

   if (!$pref::bowdlerise)
   {
      %taunt = $bossTaunt[getRandom(0,$nBossTaunts-1)];

      ServerConnection.resolveGhost($me.getGhostIndex($boss)).playAudio(1, %taunt);
   }
}


function getContinuePoint()
{
   %contPoint = 0;
   %i = 0;
   
   
   while ($escapade.continuePoint[%i] !$= "" && $escapade.continuePoint[%i] < $encounterNumber)
   {
      %contPoint = $escapade.continuePoint[%i];
      %i ++;
   }

   return %contPoint;
}

function restartEscapade()
{
   // find the continue point

   if ($nContinues > 0)
   {
      %contPoint = getContinuePoint();
      $nContinues = 0;
   }
   else
   {
      %contPoint = 0;
   }

   $restartingEscapade = true;

   cancel($waveSchedule);
   
   for (%i = 0; %i < $nEnemiesToSpawn; %i ++)
      cancel($spawnSchedule[%i]);


   for (%i = 0; %i < $nEnemies; %i ++)
      dtOnDeath($enemy[%i], false);


   dtOnDeath($boss, false);


   // re-run serverStarted to get everything back to start
   $currentGameMode.ServerStarted();
   

   // set the current escapade from the continue point
   $encounterNumber = %contPoint;

   
   setRubies($disputer, $nUCLives);

   if (%contPoint != 0)
      setUCText("I had a chance to take them by surprise, re-emerge into their midst...");
   else
      setUCText("I would have to battle every one of the planet's ludicrous denizens again...");

  
   schedule(1000, 0, "eval", "$restartingEscapade = false;");
}



function finishEscapade()
{
   if ($escapade $= PEscapade1)
      $pref::landDisputeLevel2Unlocked = true;
   else if ($escapade $= PEscapade2)
      $pref::landDisputeLevel3Unlocked = true;
   else if ($escapade $= PEscapade3)
      $pref::landDisputeLevel4Unlocked = true;
   else if ($escapade $= PEscapade4)
      $pref::landDisputeLevel5Unlocked = true;
   else if ($escapade $= PEscapade5)
      $pref::landDisputeLevel6Unlocked = true;

   if ($escapade $= PEscapade6)
      commandToClient($disputer, 'SetBottomPrintText', "Well done, you have finished Land Dispute!", -1);
   else
      commandToClient($disputer, 'SetBottomPrintText', "Well done, you have finished the level!", -1);
   
   //schedule(5000, 0, "commandToClient", $disputer, 'Disconnect');
}


function addEnemy(%enemyDesc, %pos, %desAngle, %nSpawn, %waveID, %excludeFromList)
{
   $nEnemiesToSpawn --;

   %enemy = serverCmdAddBotRequest(0, %enemyDesc.character, %enemyDesc.initialAIState, 1, 0, %enemyDesc.weapon, false, %pos);
   
   %enemy.hittingMult = %enemyDesc.hittingMult;
   %enemy.beingHitMult = %enemyDesc.beingHitMult;
   %enemy.armour = %enemyDesc.armour;
   %enemy.altSwordType1 = %enemyDesc.altSwordType1;
   %enemy.altSwordType2 = %enemyDesc.altSwordType2;
   %enemy.numberToSpawn = %nSpawn;
   %enemy.waveID = %waveID;
   %enemy.useExaggeratedAnim = true;

   if ($desAngle !$= "")
      %enemy.desiredAngle = %desAngle;

   if (!%excludeFromlist)
   {
      $enemy[$nEnemies] = %enemy;  
      %enemy.ELI = $nEnemies;  // ELI stands for Enemy List Index
      $nEnemies ++;
   }

   %enemy.group = %enemyDesc.group;
   updateInvincibilityGroups();

   return %enemy;
}


function removeEnemyFromList(%index)
{
   if (%index !$= "" && %index < $nEnemies)
   {
      $enemy[%index] = $enemy[$nEnemies - 1];
      $enemy[%index].ELI = %index;
      $nEnemies --;
   }
   else
     error("RemoveEnemyFromlist called with unreasonable index: " @ %index);

   if ($currentEncounter.formationEncounter)
   {
      if ($enemy[%index] == $formationLeader && $nEnemies > 0)
      {
         $formationLeader = $enemy[0];

         $formationLeader.setAIState($formationLeaderAIState);

         for (%i = 1; %i < $nEnemies; %i++)
         {
            $enemy[%i].setAIState(Formation);
            $enemy[%i].setTargetRuby($formationLeader);
         }
      }
   }
}


function updateInvincibilityGroups()
{
   %lowestGroup = 1000;

   for (%i = 0; %i < $nEnemies; %i ++)
   {
      if ($enemy[%i].group !$= "" && $enemy[%i].group < %lowestGroup)
         %lowestGroup = $enemy[%i].group; 
   }

   for (%j = 0; %j < $nEnemies; %j ++)
   {
      if ($enemy[%j].group > %lowestGroup)
         $enemy[%j].invincible = true;
      else
         $enemy[%j].invincible = false;
   }
}


function addWave(%wave)
{
   $currentWave = %wave;

   %i = 0;

   %start = 0;
   
   %timeOffset = 0;

   while (%wave.enemy[%i] !$= "")
   {
      spawnEnemyFromWave(%wave, %i, %timeOffset, %wave.eNum[%i] - 1);

      %timeOffset += 700;  
      %i ++;
   }

   commandToClient($disputer, 'playSound', "NewWaveSound");

}


function spawnEnemyFromWave(%wave, %i, %timeOffset, %nLeft)
{
      //if (%wave.enemyRel[%i] $= "boss")
      ///   %start = getWords($boss.getTransform(), 0, 2);
      //else
      
      %start = getWords($disputer.player.getTransform(), 0, 2);

      %pos = VectorAdd(%start, %wave.formation.pos[%i]);

      //error("SPAWNING " @ %start @ "   " @ %wave.formation.pos[%i] @ "   " @ %pos);
      
      %tdpos = getWords(%pos, 0, 1);
      %height = getWord(%pos, 2);
      %minHeight = getTerrainOrWaterHeight(%tdPos) + 10;

      if (%height < %minHeight)
         %height = %minHeight;

      %pos = %tdpos SPC %height;

      // we stagger the release so that lots of Player::onNewDataBlock calls don't cause massive slowdown

      
      $spawnSchedule[$nEnemiesToSpawn] = schedule(%timeOffset, 0, "addEnemy", %wave.enemy[%i], %pos, %wave.formation.angle[%i], %nLeft, %i, false);
      $nEnemiesToSpawn ++;
}



function waveEnded()
{   
   if ($currentEncounter.wave[$waveN] !$= "")
   {
      if ($currentEncounter.waveGap !$= "")
         %g = $currentEncounter.waveGap;
      else
         %g = 2000;

      $waveSchedule = schedule(%g, 0, "addWave", $currentEncounter.wave[$waveN]);
      $waveN ++;  
   }
   else
   {
      encounterEnded();
   }
}



function processEncounterLevel(%encounter)
{
   %level = 3;

   for (%i = 0; %encounter.wave[%i] !$= ""; %i ++)
   {
      for (%j = 0; %encounter.wave[%i].enemy[%j] !$= ""; %j ++)
      {
         processEnemyLevel(%level, %encounter.wave[%i].enemy[%j]);
      }
   }
}


function processEnemyLevel(%level, %enemy)
{

}


function startEncounter()
{
   if ($escapade.encounter[$encounterNumber] $= "")
   {
      return;
   }

   bossShoutTaunt();

   
   $currentEncounter = $escapade.encounter[$encounterNumber];

   if ($escapade.text[$encounterNumber] !$= "")
      setUCText($escapade.text[$encounterNumber]);
   else
      setUCText($escapade.startText);

   //debugging
   messageAll('Nothing', "Encounter: " @ $currentEncounter);
   echo("Encounter: " @ $currentEncounter);
   TutorialText.setText("Encounter: " @ $currentEncounter);


   if ($escapade == PEscapade3 && $encounterNumber == 11)
   {
      spawnBonusRuby();
   }
   else if ($escapade == PEscapade3 && $encounterNumber == 12)
   {
      safeDeleteItem($bonusRuby);
   }


   $encounterNumber ++;
   


   processEncounterLevel($currentEncounter);

   addWave($currentEncounter.wave[0]);

   if ($currentEncounter.formationEncounter)
   {
      $formationLeader = $enemy[0];

      $formationLeaderAIState = $currentEncounter.wave[0].enemy[0].initialAIState;

      for (%i = 1; %i < $nEnemies; %i++)
      {
         $enemy[%i].setAIState(Formation);
      }
   }

   

   $waveN = 1;

   $fightInfo.duringWave = true;


}


function spawnBonusRuby()
{
   %ruby = new Item()
   {
      dataBlock = Ruby;
      particleMode = 1;
      gameModeItem = true;
      scale = $rubyScale;
   };


   %ruby.setTransform("-2500 -3000 300 1 0 0 0");

   MissionCleanUp.add(%ruby);

   $bonusRuby = %ruby;
}



function LandDispute::playerHitItem(%this, %player, %item)
{
   if (%player == $disputer.player && %item == $bonusRuby)
   {
      $bonusLevelFound = true;
      setUCText("I found a strange ruby!  It felt like a door to a different place...");

      safeDeleteItem(%item);

   }
}


function encounterEnded()
{
   if ($currentEncounter.healthBoost $= "")
      %boost = 25;
   else
      %boost = $currentEncounter.healthBoost;

   if ($escapade.encounter[$encounterNumber] $= "")
   {
      startBossFight();

      // we get all our health back before BOSSY
      %boost = 100;
   }
   else
   {
      setUCText("I was forced to pursue him!");

      bossTakenDamage();
   }

      //$boss.schedule("3500", "setAIState", "BossAttackDamaged");
      




   $disputer.player.setDamageLevel($disputer.player.getDamageLevel() - %boost);

   commandToClient($disputer, 'playSound', "WinWaveSound");

   $fightInfo.duringWave = false;


}


function bossTakenDamage()
{
   stopBossTaunting();

   if ($bossFight)
      return;

   $boss.setAIState(BossRunningAway);





   //%angle = getRandom() * 2 * 3.1415;
   //%radius = 250 + getRandom() * 150;
   
   //echo(%averageX SPC %averageY SPC %angle SPC %radius);
   
   //%spawnX = mSin(%angle) * %radius + getWord($boss.getTransform(), 0);
   //%spawnY = mCos(%angle) * %radius + getWord($boss.getTransform(), 1);

   //%spawnZ = getTerrainOrWaterHeight(%spawnX SPC %spawnY) + 10;

   //%np = %spawnX SPC %spawnY SPC %spawnZ;
   //$boss.targetPos = %np;

   //error("new loc: " @ %np);

   //$boss.setAIState(BossRunningToPoint);
}


function bossContacted()
{
   bossTauntPose();

   if (!$bossFight && !$restartingEscapade && !$disputer.player.isDying())
      startEncounter();

   error("BOSS CONTACTED");
}



function startBossFight()
{
   $boss.hittingMult = $escapade.bossHittingMult;
   $boss.beingHitMult = $escapade.bossBeingHitMult;

   setUCText($escapade.bossText);

   $boss.setAIState("ChaseFacingOff");
   $bossFight = true;

   activateSword($boss);
}



///////////////////////////////////////////////////////////////////////////////
// player/client management stuff

// new client entering the game
function LandDispute::ClientEnterGame(%this, %client)
{
   if (!$disputer && !%client.isABot)
   {
      $disputer = %client;
      
      setRubies($disputer, $nUCLives);
   }
}

// client fully loaded
function LandDispute::ClientFullyLoaded(%this, %client)
{
   commandToClient(%client, 'setVisible', "JoinFightButton", 1);
   commandToClient(%client, 'setVisible', "AddBotButton", 1);
   commandToClient(%client, 'setVisible', "DuelChallengeButton", 0);
   commandToClient(%client, 'setVisible', "DuelAcceptButton", 0);
   commandToClient(%client, 'setVisible', "ChallengeBotButton", 0);

   setUCText($escapade.startText);

   // clientside

   if ($pref::firstLandDisputeRun)
   {
      contextHelp();
      helpfilelist.setselectedrow(13);
      $pref::firstLandDisputeRun = false;
   }
}



// returns true if this client is allowed to join the match
function LandDispute::CanJoinMatch(%this, %client)
{
   return ((%client == $disputer && !$restartingEscapade) || %client.isABot);

}

// called on a player joining the match.  Newclient indicates whether the client has been in the match before
function LandDispute::JoinMatch(%this, %client, %character, %newClient, %team)
{
   // debug
   // %client.player.beingHitMult = 0.001;

   if (%client == $disputer)
   {
      setTeam(%client, 0);
      hideCenterPrint();
   }
   else
      setTeam(%client, 1);

   %client.player.rechargeWhileStill = false;


   
}

// called on a client dropping for any reason
function LandDispute::ClientDropped(%this, %client, %reason)
{

}

// called on a client leaving the match
function LandDispute::ClientLeavingMatch(%this, %client)
{
   cancel(%client.botResurrectSchedule);
}

// called on player death or client leaving the match
function LandDispute::RemovePlayer(%this, %player)
{

}

// call the client and tell him what colours we want the IFFs to be
function LandDispute::SendClientIFFInfo(%this, %client)
{
   commandToClient(%client, 'setIFFColours', "0 1 0", "1 0 0", "0 0 1", "0 1 1", false);
}

//////////////////////////////////////////////////////////////////
// action stuff

function LandDispute::playerHasNewTarget(%this, %player, %target)
{

}



// called on a player-player collision
function LandDispute::OnHit(%this, %hiter, %hitee, %myHitbox, %hisHitbox, %myForce, %hisForce, %myMult, %hisMult, %winner, %myV2, %hisV2)
{
   if (!$bossFight && (%hiter == $boss || %hitee == $boss))
      return 0;
   else
      return standardHitDamage(%hiter, %hitee, %myHitbox, %hisHitbox, %myForce, %hisForce, %myMult, %hisMult, %winner, %myV2, %hisV2);
}








// called when a player is killed by an opponent
function LandDispute::OnKilled(%this, %killee, %killer)
{
   echo(%killer SPC "FFA killed" SPC %killee);

   if (!%killer.isABot)
      %killer.client.incScore(1);
   else
      incBotScore(%killer.client, 1);
}

// called on a player's death
function LandDispute::OnDeath(%this, %player)
{
   if (!$restartingEscapade)
   {
   if (%player.isABot && %player != $boss)
   {
      // we are just deleting all the players, so we MUSN'T REORDER THEM
      if (!$restartingEscapade)
         removeEnemyFromlist(%player.ELI);

      if (!$restartingEscapade)
      {
         if (%player.numberToSpawn > 0)
         {
            spawnEnemyFromWave($currentWave, %player.waveID, 1000, %player.numberToSpawn - 1);
         }
         else
         {
            // to stop flickering as a new member arrives, we only update the inv groups
            // when an entire squad have been killed
            updateInvincibilityGroups();

            if ($nEnemies == 0 && $nEnemiesToSpawn == 0)
               waveEnded();
         }
      }      
   }
   else if (%player == $disputer.player)
   {
      

      if ($restartOnDeath && $disputer.rubies == 0)
      {
         $restartingEscapade = true;

         clientCmdSetCenterPrintText("You have lost all your lives, and while resting Edge's ranks have swelled to their previous level", 10000);

         //lets give everything a chance to settle down
         schedule(3000, 0, "restartEscapade");


      }
      else
         setRubies($disputer, $disputer.rubies - 1);
   }
   else if (%player == $boss)
   {
      finishEscapade();
   }

   }
}

/////////////////////////////////////////////////////////////////////
// mission area stuff

// called when the player enters the MissionArea mission area struct
function LandDispute::OnEnterMissionArea(%this, %player)
{
   
}

// called when the player leaves the MissionArea mission area struct
function LandDispute::OnLeaveMissionArea(%this, %player)
{
  
}

////////////////////////////////////////////////////////////////////
// ball stuff

// player collides with the ball
function LandDispute::PlayerHitBall(%this, %player, %hitboxID, %ball)
{

}

function LandDispute::OnMissionEnded(%this)
{
   cancel($waveSchedule);
   
   alxStop($charliePlay);

   for (%i = 0; %i < $nEnemiesToSpawn; %i ++)
      cancel($spawnSchedule[%i]);

   
   // client side stuff
   enemyRubies.setVisible(1);
   enemyScore.setVisible(1);
   enemyBlue.setVisible(1);

   $dontUseEnemyScores = false;

   stopBossTaunting();

   hideUCTextBox();

   $pref::Net::PacketRateToClient = $savedPRTC;
   $pref::Net::PacketRateToServer = $savedPRTS;
}



function setUCText(%s)
{
   UHText.setText(%s);

   // client side stuff??!!
   UHTextBack.setVisible(1);
   UHTextBox.setVisible(1);
   UHTextOverlay.setVisible(1);
}


function hideUCTextBox()
{
   // client side stuff
   UHTextBack.setVisible(0);
   UHTextBox.setVisible(0);
   UHTextOverlay.setVisible(0);
}



// extra LD taunts

new AudioProfile(BossTauntBeginToImagine)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/beginToImagine.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntBelongWithDregs)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/belongWithDregs.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntBlitheringDrunkenTwit)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/blitheringDrunkenTwit.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntCruelty)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/cruelty.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntDearFriends)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/dearFriends.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntEnjoyYourselves)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/fineEnjoyYourselves.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntLongRant)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/longRant.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntMyCongrats)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/myCongratsLong.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntOhLook)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/ohLook.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntSoBeIt)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/soBeIt.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntStabInSleep)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/stabInSleep.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntThoseSwords)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/thoseSwords.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntVeryTouching)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/veryTouching.ogg";
  description = BossTauntSfx;
  preload = true;
};

new AudioProfile(BossTauntYouWeaklingScum)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bossTaunts/youWeaklingScum.ogg";
  description = BossTauntSfx;
  preload = true;
};





///Edge taunts expertly scripted by Paul

new AudioProfile(EdgeTauntYouAreInPain)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/youAreInPain.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntWeAreNotMonsters)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/weAreNotMonsters.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntVeryWell)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/veryWell.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntUnanimity)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/unanimity.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntTheDiscovery)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/theDiscovery.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntTheProvocation)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/theProvocation.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntThankYou)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/thankYou.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntTestTheEffect)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/testTheEffect.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntSuchAPity)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/suchAPity.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntSoKind)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/soKind.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntOfCourse)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/ofCourse.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntNoDoubt)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/noDoubt.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntMaybeThisDevice)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/maybeThisDevice.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntIllGiveYouSomeTime)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/illGiveYouSomeTime.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntIfIMayHaveYourAttention)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/ifIMayHaveYourAttention.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntIAmSorry)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/iAmSorry.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntIAmGettingSilly)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/iAmGettingSilly.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntLongRant)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/edgeLongRant.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntClearlyTooStubborn)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/clearlyTooStuborn.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntBravo)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bravo.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntBestToSeparate)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/bestToSeparate.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntAsLongAsItTakes)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/asLongAsItTakes.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntASadLoss)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/aSadLoss.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntASadLoss)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/aSadLoss.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntAllGoodDogs)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/allGoodDogs.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntALittleLessImmortal)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/aLittleLessImmortal.ogg";
  description = TauntSFX;
  preload = true;
};

new AudioProfile(EdgeTauntAhGood)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/ahGood.ogg";
  description = TauntSFX;
  preload = true;
};



new AudioDescription(CharlieSfx)
{
   volume       = 0.8;
   isLooping  = true;
   is3D          = false;
   ReferenceDistance = 30;
   MaxDistance= 100.0;
   type     = $GuiAudioType;
};

new AudioProfile(CharlieStretch)
{
  filename    = "~/data/sound/taunts/OJ/unholyCrusade/charlieStretch.ogg";
  description = CharlieSfx;
  preload = true;
};

