Quantcast

Add conditions for agility, intellect, spirit, stamina and strength.

Johnny C. Lam [10-20-13 - 03:48]
Add conditions for agility, intellect, spirit, stamina and strength.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1087 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCondition.lua
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index 31975d8..8c0547c 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -497,6 +497,19 @@ end
 		end
 	end,]]

+--- Get the current agility of the player.
+-- @name Agility
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: less, atMost, equal, atLeast, more.
+-- @param number Optional. The number to compare against.
+-- @return The current agility.
+-- @return A boolean value for the result of the comparison.
+
+OvaleCondition.conditions.agility = function(condition)
+	local comparator, limit = condition[1], condition[2]
+	return Compare(OvalePaperDoll.stat.agility, comparator, limit)
+end
+
 --- Get how many pieces of an armor set, e.g., Tier 14 set, are equipped by the player.
 -- @name ArmorSetParts
 -- @paramsig number or boolean
@@ -2032,6 +2045,19 @@ OvaleCondition.conditions.inrange = function(condition)
 	return TestBoolean(API_IsSpellInRange(spellName, target) == 1, yesno)
 end

+--- Get the current intellect of the player.
+-- @name Intellect
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: less, atMost, equal, atLeast, more.
+-- @param number Optional. The number to compare against.
+-- @return The current intellect.
+-- @return A boolean value for the result of the comparison.
+
+OvaleCondition.conditions.intellect = function(condition)
+	local comparator, limit = condition[1], condition[2]
+	return Compare(OvalePaperDoll.stat.intellect, comparator, limit)
+end
+
 --- Get the cooldown time in seconds of an item, e.g., trinket.
 -- @name ItemCooldown
 -- @paramsig number or boolean
@@ -3604,6 +3630,32 @@ OvaleCondition.conditions.spellpower = function(condition)
 	return Compare(OvalePaperDoll.stat.spellBonusDamage, comparator, limit)
 end

+--- Get the current spirit of the player.
+-- @name Spirit
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: less, atMost, equal, atLeast, more.
+-- @param number Optional. The number to compare against.
+-- @return The current spirit.
+-- @return A boolean value for the result of the comparison.
+
+OvaleCondition.conditions.spirit = function(condition)
+	local comparator, limit = condition[1], condition[2]
+	return Compare(OvalePaperDoll.stat.spirit, comparator, limit)
+end
+
+--- Get the current stamina of the player.
+-- @name Stamina
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: less, atMost, equal, atLeast, more.
+-- @param number Optional. The number to compare against.
+-- @return The current stamina.
+-- @return A boolean value for the result of the comparison.
+
+OvaleCondition.conditions.stamina = function(condition)
+	local comparator, limit = condition[1], condition[2]
+	return Compare(OvalePaperDoll.stat.stamina, comparator, limit)
+end
+
 --- Get the remaining amount of damage Stagger will cause to the target.
 -- @name StaggerRemains
 -- @paramsig number or boolean
@@ -3674,6 +3726,19 @@ OvaleCondition.conditions.stealthed = function(condition)
 	return TestBoolean(API_IsStealthed(), yesno)
 end

+--- Get the current strength of the player.
+-- @name Strength
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: less, atMost, equal, atLeast, more.
+-- @param number Optional. The number to compare against.
+-- @return The current strength.
+-- @return A boolean value for the result of the comparison.
+
+OvaleCondition.conditions.strength = function(condition)
+	local comparator, limit = condition[1], condition[2]
+	return Compare(OvalePaperDoll.stat.strength, comparator, limit)
+end
+
 --- Get the number of points spent in a talent (0 or 1)
 -- @name TalentPoints
 -- @paramsig number or boolean