Commit 5425ecbc authored by wyykak's avatar wyykak

fix EFFECT_EXTRA_SYNCHRO_MATERIAL

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 3bace96b
......@@ -13,38 +13,19 @@ function cCardno.initial_effect(c)
--syn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SYNCHRO_MATERIAL)
e2:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(cCardno.synfilter)
e2:SetValue(cCardno.selffilter)
c:RegisterEffect(e2)
--synlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
e3:SetTarget(cCardno.splimit)
--c:RegisterEffect(e3)
end
--synlimit
function cCardno.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x456) and bit.band(sumtype,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
--syn
function cCardno.synfilter(e,c)
return c:IsFaceup() and c:IsCanBeSynchroMaterial() and c:GetOwner()~=c:GetControler()
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
function cCardno.selffilter(e,c)
return c:IsControler(e:GetOwnerPlayer())
end
--Activate
function cCardno.acfilter(c)
......
......@@ -72,7 +72,7 @@ function c74563034.slevel(e,c)
end
function c74563034.mtval(e,c)
if not c then return false end
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsControler(e:GetOwnerPlayer())
end
function c74563034.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
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