Commit 40e3e196 authored by Maiyannah Bishop's avatar Maiyannah Bishop

[Imp] Fix pcall invocation for mage defs too

parent efe15b7a
......@@ -585,8 +585,9 @@ Berkana.Imperian.Constraints = Berkana.Imperian.Constraints or {};
--
-- TODO: Can't do when arms are broken, add that as a constraint
function Berkana.Imperian.Constraints.CloakTattoo()
has_cloak = Character.Tattoos.hasCloak()
has_eqbal = Berkana.Imperian.RequiresBalEq()
rtn, has_cloak = pcall(Character.Tattoos.hasCloak)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
if (has_cloak == true) and (has_eqbal == true) then
has_cloak, has_eqbal = nil, nil
return true
......@@ -604,8 +605,9 @@ end
--
-- TODO: Can't do when arms are broken, add that as a constraint
function Berkana.Imperian.Constraints.MindsEyeTattoo()
has_mindseye = Character.Tattoos.hasMindsEye()
has_eqbal = Berkana.Imperian.RequiresBalEq()
rtn, has_mindseye = pcall(Character.Tattoos.hasMindsEye)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
Valkryja.Debug("In MINDSEYE constraints,"..
"has_mindseye="..tostring(has_mindseye)..", has_eqbal="..tostring(has_eqbal), false)
if (has_mindseye == true) and (has_eqbal == true) then
......@@ -625,8 +627,9 @@ end
--
-- TODO: Can't do when arms are broken, add that as a constraint
function Berkana.Imperian.Constraints.MossTattoo()
has_moss = Character.Tattoos.hasMoss()
has_eqbal = Berkana.Imperian.RequiresBalEq()
rtn, has_moss = pcall(Character.Tattoos.hasMoss)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
Valkryja.Debug("In MOSS constraints,"..
"has_moss="..tostring(has_moss)..", has_eqbal="..tostring(has_eqbal), false)
if (has_moss == true) and (has_eqbal == true) then
......@@ -689,8 +692,9 @@ end
--
-- TODO: Add a check to see if we have enough training to use this ability
function Berkana.Imperian.Constraints.Shimmer()
is_mage = pcall(Berkana.Imperian.RequiresMage)
has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn, is_mage = pcall(Berkana.Imperian.RequiresMage)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
if (is_mage==true) and (has_eqbal==true) then
is_mage, has_eqbal = nil, nil
return true
......@@ -709,8 +713,9 @@ end
--
-- TODO: Add a check to see if we have enough training to use this ability
function Berkana.Imperian.Constraints.StoneSkin()
is_mage = pcall(Berkana.Imperian.RequiresMage)
has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn, is_mage = pcall(Berkana.Imperian.RequiresMage)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
if (is_mage==true) and (has_eqbal==true) then
is_mage, has_eqbal = nil, nil
return true
......@@ -728,8 +733,9 @@ end
--
-- TODO: Add a check to see if we have enough training to use this ability
function Berkana.Imperian.Constraints.WindVeil()
is_mage = pcall(Berkana.Imperian.RequiresMage)
has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn, is_mage = pcall(Berkana.Imperian.RequiresMage)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
if (is_mage==true) and (has_eqbal==true) then
is_mage, has_eqbal = nil, nil
return true
......@@ -747,8 +753,9 @@ end
--
-- TODO: Add a check to see if we have enough training to use this ability
function Berkana.Imperian.Constraints.WaterWalking()
is_mage = pcall(Berkana.Imperian.RequiresMage)
has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn, is_mage = pcall(Berkana.Imperian.RequiresMage)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
if (is_mage==true) and (has_eqbal==true) then
is_mage, has_eqbal = nil, nil
return true
......@@ -766,8 +773,9 @@ end
--
-- TODO: Add a check to see if we have enough training to use this ability
function Berkana.Imperian.Constraints.WaterBreathing()
is_mage = pcall(Berkana.Imperian.RequiresMage)
has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn, is_mage = pcall(Berkana.Imperian.RequiresMage)
rtn, has_eqbal = pcall(Berkana.Imperian.RequiresBalEq)
rtn = nil
if (is_mage==true) and (has_eqbal==true) then
is_mage, has_eqbal = nil, nil
return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment