Commit 9d084b8a authored by DailyShana's avatar DailyShana

Merge pull request #388 from mercury233/patch-1

fix Chaofeng, Phantom of the Yang Zing
parents 60e35bab 43411950
......@@ -11,13 +11,11 @@ function c19048328.initial_effect(c)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c19048328.condition)
e2:SetValue(c19048328.aclimit)
e2:SetOperation(c19048328.regop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--search
......@@ -56,6 +54,20 @@ end
function c19048328.condition(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c19048328.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c19048328.condition)
e1:SetValue(c19048328.aclimit)
e1:SetLabelObject(e:GetLabelObject())
c:RegisterEffect(e1)
end
function c19048328.aclimit(e,re,tp)
local att=e:GetLabelObject():GetLabel()
return re:IsActiveType(TYPE_MONSTER) and bit.band(att,re:GetHandler():GetOriginalAttribute())~=0
......
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