Commit b8c2761d authored by mercury233's avatar mercury233 Committed by GitHub

fix Auxiliary.EnableChangeCode (#1779)

parent 4696f27c
...@@ -17,9 +17,7 @@ end ...@@ -17,9 +17,7 @@ end
function c58153103.regop(e,tp,eg,ep,ev,re,r,rp) function c58153103.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
--change name --change name
local e0,e1=aux.EnableChangeCode(c,59464593,LOCATION_MZONE,c58153103.condition) local e1=aux.EnableChangeCode(c,59464593,LOCATION_MZONE,c58153103.condition)
e0:SetLabel(1)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabel(1) e1:SetLabel(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
--control --control
......
...@@ -264,6 +264,7 @@ function Auxiliary.EnableChangeCode(c,code,location,condition) ...@@ -264,6 +264,7 @@ function Auxiliary.EnableChangeCode(c,code,location,condition)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(loc) e1:SetRange(loc)
e1:SetCondition(condition)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
......
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