PlayerModifiers modify = new PlayerModifiers();
public IProfile DEADPOOL()
			{
			var p= new IProfile();
			p.Skin = new IProfileClothingItem("Normal", "Skin2", "ClothingDarkRed");
			p.Head = new IProfileClothingItem("none", "ClothingRed");
			p.ChestOver = new IProfileClothingItem("StuddedVest", "ClothingDarkGray", "ClothingDarkGray");
			p.ChestUnder = new IProfileClothingItem("BodyArmor", "ClothingDarkRed");
			p.Waist = new IProfileClothingItem("Sash", "ClothingGray");
			p.Legs = new IProfileClothingItem("PantsBlack", "ClothingDarkRed", "ClothingLightGray");
			p.Feet = new IProfileClothingItem("BootsBlack", "ClothingDarkGray");
        p.Accessory = new IProfileClothingItem("GasMask2", "ClothingDarkRed", "ClothingLightGray");
        p.Hands = new IProfileClothingItem("SafetyGlovesBlack", "ClothingDarkGray");
			return p; 	
			}
public IProfile DEADPOOLDEATH()
			{
			var p2= new IProfile();
			p2.Skin = new IProfileClothingItem("Normal", "Skin2", "ClothingDarkRed");
			p2.Head = new IProfileClothingItem("none", "ClothingRed");
			p2.ChestOver = new IProfileClothingItem("StuddedVest", "ClothingDarkGray", "ClothingDarkGray");
			p2.ChestUnder = new IProfileClothingItem("BodyArmor", "ClothingDarkRed");
			p2.Waist = new IProfileClothingItem("Sash", "ClothingGray");
			p2.Legs = new IProfileClothingItem("PantsBlack", "ClothingDarkRed", "ClothingLightGray");
			p2.Feet = new IProfileClothingItem("BootsBlack", "ClothingDarkGray");
        p2.Accessory = new IProfileClothingItem("none" , "ClothingDarkGray");
        p2.Hands = new IProfileClothingItem("SafetyGlovesBlack", "ClothingDarkGray");
			return p2; 	
			}



public void OnStartup()
{      		
	   Game.PlaySound("ChurchBell1", Vector2.Zero);
	   Game.PlaySound("Piston1", Vector2.Zero);
	   Game.PlaySound("MacheteDraw", Vector2.Zero);					
      IObjectTimerTrigger Timer1 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer1.SetIntervalTime(410);Timer1.SetRepeatCount(0);Timer1.SetScriptMethod("DeadpoolCuracion");Timer1.Trigger();
      IObjectTimerTrigger Timer2 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer2.SetIntervalTime(10);Timer2.SetRepeatCount(0);Timer2.SetScriptMethod("DeadpoolKatana");Timer2.Trigger();
      IObjectTimerTrigger Timer3 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer3.SetIntervalTime(420);Timer3.SetRepeatCount(0);Timer3.SetScriptMethod("DeadpoolTeleportacion");Timer3.Trigger();
      IObjectTimerTrigger Timer4 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer4.SetIntervalTime(300);Timer4.SetRepeatCount(0);Timer4.SetScriptMethod("DeadpoolVelocidad");Timer4.Trigger();
      IObjectTimerTrigger Timer5 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer5.SetIntervalTime(1);Timer5.SetRepeatCount(1);Timer5.SetScriptMethod("CrearDeadpools");Timer5.Trigger();
      IObjectTimerTrigger Timer6 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer6.SetIntervalTime(1);Timer6.SetRepeatCount(0);Timer6.SetScriptMethod("DeadpoolDeath");Timer6.Trigger();
      IObjectTimerTrigger Timer7 = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");Timer7.SetIntervalTime(10);Timer7.SetRepeatCount(0);Timer7.SetScriptMethod("DeadpoolPistol");Timer7.Trigger();
}
public void CrearDeadpools(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
      ply.SetProfile(DEADPOOL());
      Vector2 pos = ply.GetWorldPosition();
      Game.PlayEffect("PLRB", pos);
      Game.PlaySound("Flamethrower", Vector2.Zero);
      ply.SetInputEnabled(false);
      if(Game.IsEditorTest)Game.CreateDialogue("Deadpool A LLegado", ply, (ply.Name), duration: 100f);
      {
         ply.AddCommand( new PlayerCommand(PlayerCommandType.DrawMelee));
         ply.SetInputEnabled(true);
         modify.MeleeDamageDealtModifier=2;
         modify.MaxHealth=200;
         modify.CurrentHealth=200;
         ply.SetModifiers(modify);
      }
   } 
}  
public void DeadpoolKatana(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
      ply.SetInputEnabled(true);
      if(ply.CurrentMeleeWeapon.WeaponItem == WeaponItem.NONE)
      {
         ply.SetInputEnabled(false); 
         ply.GiveWeaponItem(WeaponItem.KATANA);   
         ply.AddCommand( new PlayerCommand(PlayerCommandType.DrawMelee));
         {
            foreach(IObject katana in Game.GetObjectsByName("WpnKatana")) katana.Remove();                        
         }
      }
   }
}
public void DeadpoolCuracion(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
       ply.SetHealth(ply.GetHealth()+6f);
   }
}
public void DeadpoolTeleportacion(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
      if(ply.IsWalking && ply.IsMeleeAttacking || ply.IsJumpAttacking && ply.IsWalking)
      {
         Vector2 pos = ply.GetWorldPosition() + new Vector2(ply.FacingDirection * 50, 0);
         ply.SetWorldPosition(pos);
         Game.PlaySound("LogoSlam", Vector2.Zero, 100f);
      }
   }
}
public void DeadpoolVelocidad(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
      if(ply.IsCrouching && ply.IsWalking || ply.IsRolling && ply.IsWalking)
      {
         if(!ply.IsLayingOnGround)
         {
            if(!ply.IsFalling)
            {           
               if(ply.IsOnGround)
               {
                  ply.SetLinearVelocity( new Vector2(ply.FacingDirection * 5 , 8));         
               }
            }
         }
      }
   }
}
public void DeadpoolDeath(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
      if(ply.IsDead)
      {         
         ply.SetProfile(DEADPOOLDEATH());                    
      }
   }
}
public void DeadpoolPistol(TriggerArgs args)
{
   foreach(IPlayer ply in Game.GetPlayers())
   {
      ply.SetInputEnabled(true);
      if(ply.CurrentSecondaryWeapon.WeaponItem == WeaponItem.NONE)
      {         
         ply.SetInputEnabled(false); 
         ply.GiveWeaponItem(WeaponItem.PISTOL);   
         ply.AddCommand( new PlayerCommand(PlayerCommandType.DrawHandgun));
         {
            foreach(IObject pistol in Game.GetObjectsByName("WpnPistol")) pistol.Remove(); 
         }
      }
   }
}