Quantcast

Add EnergyRegen() and FocusRegen() conditions.

Johnny C. Lam [10-11-12 - 01:22]
Add EnergyRegen() and FocusRegen() conditions.

These correspond to the SimulationCraft action list properties
energy.regen and focus.regen, respectively.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@586 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCondition.lua
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index eb9d932..a4cc943 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -1097,6 +1097,20 @@ OvaleCondition.conditions=
 		return testValue(condition[1], condition[2], OvaleState.state.energy, OvaleState.currentTime, OvaleState.powerRate.energy)
 	end,

+--- Get the amount of regenerated energy per second for feral druids, non-mistweaver monks, and rogues.
+-- @name EnergyRegen
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: equal, less, more.
+-- @param number Optional. The number to compare against.
+-- @return The current rate of energy regeneration.
+-- @return A boolean value for the result of the comparison.
+-- @usage
+-- if EnergyRegen() >11 Spell(stance_of_the_sturdy_ox)
+
+	energyregen = function(condition)
+		return compare(OvaleState.powerRate.energy, condition[1], condition[2])
+	end,
+
 --- Test if the target exists. The target may be alive or dead.
 -- @name Exists
 -- @paramsig boolean
@@ -1139,6 +1153,20 @@ OvaleCondition.conditions=
 		return testValue(condition[1], condition[2], OvaleState.state.focus, OvaleState.currentTime, OvaleState.powerRate.focus)
 	end,

+--- Get the amount of regenerated focus per second for hunters.
+-- @name FocusRegen
+-- @paramsig number or boolean
+-- @param operator Optional. Comparison operator: equal, less, more.
+-- @param number Optional. The number to compare against.
+-- @return The current rate of focus regeneration.
+-- @return A boolean value for the result of the comparison.
+-- @usage
+-- if FocusRegen() >20 Spell(arcane_shot)
+
+	focusregen = function(condition)
+		return compare(OvaleState.powerRate.focus, condition[1], condition[2])
+	end,
+
 	-- Get the global countdown
 	-- returns: bool or number
 	gcd = function(condition)