anchor.diff:  	qdel(src)
   
   
  -/*
  - * Mech prizes + MECHA COMBAT!!
  - */
  +/**
  +  * Mech prizes + MECHA COMBAT!!
  +  */
   /obj/item/toy/prize
   	icon = 'icons/obj/toy.dmi'
   	icon_state = "ripleytoy"
  
positive.code: 	timer = world.time + cooldown*20
  	attacker.timer = world.time + attacker.cooldown*20
  
  	sleep(1.5 SECONDS)
  	//--THE BATTLE BEGINS--
  	while(combat_health > 0 && attacker.combat_health > 0 && battle_length < MAX_BATTLE_LENGTH) 
  
  		//the toys need to be next to each other to fight!
  		//if it's player vs themself: They need to be able to "control" both mechs (either adjacent or using TK)
  		//if it's player vs player: Both players need to be able to "control" their mechs (either adjacent or using TK)
  
  		//if the two toys aren't next to each other, the battle ends
  		if(!in_range(src, attacker))
  			attacker_controller.visible_message("<span class='notice'> [attacker] and [src] separate, ending the battle. </span>", \
  								"<span class='notice'> [attacker] and [src] separate, ending the battle. </span>")
  			break
  		//dead men tell no tales, incapacitated men fight no fights
  		if(attacker_controller.incapacitated())
  			break
  		//if the attacker_controller isn't next to the attacking toy (and doesn't have telekinesis), the battle ends
  		if((!in_range(attacker, attacker_controller) && !(attacker_controller.dna.check_mutation(TK))))
  			attacker_controller.visible_message("<span class='notice'> [attacker_controller.name] seperates from [attacker], ending the battle.</span>", \
  								"<span class='notice'> You separate from [attacker], ending the battle. </span>")
  			break
  		//if it's PVP and the opponent is not next to the defending(src) toy (and doesn't have telekinesis), the battle ends
  		if(opponent)
  			if(opponent.incapacitated())
  				break
  			if(!in_range(src, opponent) && !(opponent.dna.check_mutation(TK)))
  				opponent.visible_message("<span class='notice'> [opponent.name] seperates from [src], ending the battle.</span>", \
  							"<span class='notice'> You separate from [src], ending the battle. </span>")
  				break
  		//if it's not PVP and the attacker_controller isn't next to the defending toy (and doesn't have telekinesis), the battle ends
  		else
  			if (!in_range(src, attacker_controller) && !(attacker_controller.dna.check_mutation(TK)))
  				attacker_controller.visible_message("<span class='notice'> [attacker_controller.name] seperates from [src] and [attacker], ending the battle.</span>", \
  									"<span class='notice'> You separate [attacker] and [src], ending the battle. </span>")
  				break
  
  		//before we do anything - deal with charged attacks
  		if(special_attack_charged)
  
negative.code: 										"<span class='notice'> You don't know what to do next.</span>")		
  
  		battle_length++																											
  		sleep(0.5 SECONDS)
  
  	/// Lines chosen for the winning mech
  	var/list/winlines = list("YOU'RE NOTHING BUT SCRAP!", "I'LL YIELD TO NONE!", "GLORY IS MINE!", "AN EASY FIGHT.", "YOU SHOULD HAVE NEVER FACED ME.", "ROCKED AND SOCKED.")
  
  	if(attacker.combat_health <= 0 && combat_health <= 0) //both lose
  		playsound(src, 'sound/machines/warning-buzzer.ogg', 20, TRUE)
  