local i,id

WhatsNext:AddConditionalStatement("ExtraActionButton Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		return ExtraActionButton1:IsVisible()
	end,
	text = function(checkTable) 
		return "player has an extra action button ability."
	end,
	arguments = {}
})

WhatsNext:AddConditionalStatement("Exists ExtraActionButton Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		return ExtraActionButton1:IsVisible() and WhatsNext:GetSpellName(checkTable.spellName) == WhatsNext:GetSpellName(select(2,GetActionInfo(169)))
	end,
	text = function(checkTable) 
		return "player has the extra action button ability " .. WhatsNext:GetSpellDisplay(checkTable.spellName) .. "."
	end,
	arguments = {
		spellName = {label = "Spell", type = "spell", default = ""}
	}
})

WhatsNext:AddConditionalStatement("ExtraActionBar Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		for i=121,144 do
			id = select(2,GetActionInfo(i))
			if id and id > 0 then
				return true
			end
		end
		return false
	end,
	text = function(checkTable) 
		return "player has an extra action bar ability."
	end,
	arguments = {}
})

WhatsNext:AddConditionalStatement("Exists ExtraActionBar Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		for i=121,144 do
			id = select(2,GetActionInfo(i))
			if id and id > 0 and WhatsNext:GetSpellName(checkTable.spellName) == WhatsNext:GetSpellName(id) then
				return true
			end
		end
		return false
	end,
	text = function(checkTable) 
		return "player has the extra action bar ability " .. WhatsNext:GetSpellDisplay(checkTable.spellName) .. "."
	end,
	arguments = {
		spellName = {label = "Spell", type = "spell", default = ""}
	}
})


