anchor.diff:  				xp_gained += 50
   			SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("win", (obj_flags & EMAGGED ? "emagged":"normal")))
   
  -
  -	else if ((obj_flags & EMAGGED) && (turtle >= 4))
  -		var/boomamt = rand(5,10)
  -		temp = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!"
  -		playsound(loc, 'sound/arcade/boom.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  -		player_hp -= boomamt
  -
  -	else if ((enemy_mp <= 5) && (prob(70)))
  -		var/stealamt = rand(2,3)
  -		temp = "[enemy_name] steals [stealamt] of your power!"
  -		playsound(loc, 'sound/arcade/steal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  -		player_mp -= stealamt
  -		updateUsrDialog()
  -
  -		if (player_mp <= 0)
  -			gameover = TRUE
  -			sleep(10)
  -			temp = "You have been drained! GAME OVER"
  -			playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  -			if(obj_flags & EMAGGED)
  -				usr.gib()
  -			SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (obj_flags & EMAGGED ? "emagged":"normal")))
  -
  -	else if ((enemy_hp <= 10) && (enemy_mp > 4))
  -		temp = "[enemy_name] heals for 4 health!"
  -		playsound(loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  -		enemy_hp += 4
  -		enemy_mp -= 4
  -
  -	else
  -		var/attackamt = rand(3,6)
  -		temp = "[enemy_name] attacks for [attackamt] damage!"
  -		playsound(loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  -		player_hp -= attackamt
  -
  -	if ((player_mp <= 0) || (player_hp <= 0))
  +	else if(player_hp <= 0)
  +		if(timer_id)
  +			deltimer(timer_id)
  +			timer_id = null
   		gameover = TRUE
  -		temp = "You have been crushed! GAME OVER"
  +		temp = "<br><center><h3>You have been crushed! GAME OVER<center><h3>"
   		playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3, falloff = 10)
   		xp_gained += 10//pity points
   		if(obj_flags & EMAGGED)
  -			usr.gib()
  +			user.gib()
   		SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal")))
  -
  -	user?.mind?.adjust_experience(/datum/skill/gaming, xp_gained+1)//always gain at least 1 point of XP
  -	blocked = FALSE
  -	return
  +		user?.mind?.adjust_experience(/datum/skill/gaming, xp_gained+1)//always gain at least 1 point of XP
  +
  +
  +///used to check if the last three move of the player are the one we want in the right order and if the passive's weakpoint has been triggered yet
  +/obj/machinery/computer/arcade/battle/proc/weakpoint_check(passive,first_move,second_move,third_move)
  +	if(LAZYLEN(last_three_move) < 3)
  +		return FALSE
  +
  +	if(last_three_move[1] == first_move && last_three_move[2] == second_move && last_three_move[3] == third_move && LAZYACCESS(enemy_passive, passive))
  +		LAZYREMOVE(enemy_passive, passive)
  +		pissed_off++
  +		return TRUE
  +	else
  +		return FALSE
  +
  +
  +/obj/machinery/computer/arcade/battle/Destroy()
  +	enemy_passive = null
  +	weapons = null
  +	last_three_move = null
  +	return ..() //well boys we did it, lists are no more
   
   
   /obj/machinery/computer/arcade/battle/emag_act(mob/user)
   	if(obj_flags & EMAGGED)
   		return
  +
   	to_chat(user, "<span class='warning'>A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!</span>")
  -	temp = "If you die in the game, you die for real!"
  -	player_hp = 30
  -	player_mp = 10
  -	enemy_hp = 45
  -	enemy_mp = 20
  +	temp = "<br><center><h2>If you die in the game, you die for real!<center><h2>"
  +	max_passive = 6
  +	bomb_cooldown = 18
  +	var/gamerSkill = usr.mind?.get_skill_level(/datum/skill/gaming)
  +	enemy_setup(gamerSkill)
  +	enemy_hp += 100 //extra HP just to make cuban pete even more bullshit
  +	player_hp += 30 //the player will also get a few extra HP in order to have a fucking chance
  +
  +	screen_setup(user)
   	gameover = FALSE
  -	blocked = FALSE
   
   	obj_flags |= EMAGGED
   
   	enemy_name = "Cuban Pete"
   	name = "Outbomb Cuban Pete"
   
  -
   	updateUsrDialog()
  -
   
   
   // *** THE ORION TRAIL ** //
  
positive.code: 	enemy_name = ("The " + name_part1 + " " + name_part2)
  	name = (name_action + " " + enemy_name)
  
  /obj/machinery/computer/arcade/battle/ui_interact(mob/user)
  	. = ..()
  	var/dat = "<a href='byond://?src=[REF(src)];close=1'>Close</a>"
  	dat += "<center><h4>[enemy_name]</h4></center>"
  
  	dat += "<br><center><h3>[temp]</h3></center>"
  	dat += "<br><center>Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]</center>"
  
  	if (gameover)
  		dat += "<center><b><a href='byond://?src=[REF(src)];newgame=1'>New Game</a>"
  	else
  		dat += "<center><b><a href='byond://?src=[REF(src)];attack=1'>Attack</a> | "
  		dat += "<a href='byond://?src=[REF(src)];heal=1'>Heal</a> | "
  		dat += "<a href='byond://?src=[REF(src)];charge=1'>Recharge Power</a>"
  
  	dat += "</b></center>"
  	var/datum/browser/popup = new(user, "arcade", "Space Villain 2000")
  	popup.set_content(dat)
  	popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
  	popup.open()
  
  /obj/machinery/computer/arcade/battle/Topic(href, href_list)
  	if(..())
  		return
  
  	if (!blocked && !gameover)
  		var/gamerSkillLevel = usr.mind?.get_skill_level(/datum/skill/gaming)
  		var/gamerSkill = usr.mind?.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER)
  		if (href_list["attack"])
  			blocked = TRUE
  			var/attackamt = rand(2,6) + rand(0, gamerSkill)
  			var/weapon = pick(weapons)
  			temp = "You attack with a [weapon] for [attackamt] damage!"
  			playsound(loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  			updateUsrDialog()
  			if(turtle > 0)
  				turtle--
  
  			sleep(10)
  			enemy_hp -= attackamt
  			arcade_action(usr)
  
  		else if (href_list["heal"])
  			blocked = TRUE
  			var/maxPointCost = 3
  			if(gamerSkillLevel >= SKILL_LEVEL_JOURNEYMAN)
  				maxPointCost = 2
  			var/pointamt = rand(1, maxPointCost)
  			var/healamt = rand(6,8) + rand(0, gamerSkill)
  			temp = "You use [pointamt] magic to heal for [healamt] damage!"
  			playsound(loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  			updateUsrDialog()
  			turtle++
  
  			sleep(10)
  			player_mp -= pointamt
  			player_hp += healamt
  			blocked = TRUE
  			updateUsrDialog()
  			arcade_action(usr)
  
  		else if (href_list["charge"])
  			blocked = TRUE
  			var/chargeamt = rand(4,7) + rand(0, gamerSkill)
  			temp = "You regain [chargeamt] points."
  			playsound(loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  			player_mp += chargeamt
  			if(turtle > 0)
  				turtle--
  
  			updateUsrDialog()
  			sleep(10)
  			arcade_action(usr)
  
  	if (href_list["close"])
  		usr.unset_machine()
  		usr << browse(null, "window=arcade")
  
  	else if (href_list["newgame"]) //Reset everything
  		temp = "New Round"
  		player_hp = 30
  		player_mp = 10
  		enemy_hp = 45
  		enemy_mp = 20
  		gameover = FALSE
  		turtle = 0
  
  		if(obj_flags & EMAGGED)
  			Reset()
  			obj_flags &= ~EMAGGED
  
  	add_fingerprint(usr)
  	updateUsrDialog()
  	return
  
  /obj/machinery/computer/arcade/battle/proc/arcade_action(mob/user)
  	var/xp_gained = 0
  	if ((enemy_mp <= 0) || (enemy_hp <= 0))
  		if(!gameover)
  			gameover = TRUE
  			temp = "[enemy_name] has fallen! Rejoice!"
  			playsound(loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3, falloff = 10)
  
  			if(obj_flags & EMAGGED)
  
negative.code: 		to_chat(user, "<span class='notice'>You turn in 2 tickets to the [src] and claim a prize!</span>")
  		return
  
  
  // ** BATTLE ** //
  
  
  