Commit fb758c5b authored by REIKAI's avatar REIKAI 💬

fix

parent b386c8bf
......@@ -43,8 +43,8 @@ function c1156015.LExtraFilter(c,f,lc,tp)
end
return false
end
function c1156015.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(aux.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc)
function c1156015.GetLinkMaterials(tp,f,lc,e)
local mg=Duel.GetMatchingGroup(aux.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc,e)
local mg2=Duel.GetMatchingGroup(c1156015.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
......@@ -64,12 +64,12 @@ function c1156015.LinkCondition(f,minc,maxc,gf)
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(aux.LConditionFilter,nil,f,c)
mg=og:Filter(aux.LConditionFilter,nil,f,c,e)
else
mg=c1156015.GetLinkMaterials(tp,f,c)
mg=c1156015.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not aux.LConditionFilter(lmat,f,c) then return false end
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
......@@ -90,12 +90,12 @@ function c1156015.LinkTarget(f,minc,maxc,gf)
end
local mg=nil
if og then
mg=og:Filter(aux.LConditionFilter,nil,f,c)
mg=og:Filter(aux.LConditionFilter,nil,f,c,e)
else
mg=c1156015.GetLinkMaterials(tp,f,c)
mg=c1156015.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not aux.LConditionFilter(lmat,f,c) then return false end
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
......
......@@ -53,8 +53,15 @@ function c77765002.initial_effect(c)
c:RegisterEffect(e2)
local function KaguyaFilter(c,e,tp,cc)
local p=c:GetControler()
local tc=Senya.GetDFCBackSideCard(cc)
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
local code=c.dfc_front_side
Duel.DisableActionCheck(true)
local tc=Duel.CreateToken(tp,code)
Duel.DisableActionCheck(false)
if tc then
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
else
return false
end
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
......
......@@ -70,8 +70,15 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
local function KaguyaFilter(c,e,tp,cc)
local p=c:GetControler()
local tc=Senya.GetDFCBackSideCard(cc)
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
local code=c.dfc_front_side
Duel.DisableActionCheck(true)
local tc=Duel.CreateToken(tp,code)
Duel.DisableActionCheck(false)
if tc then
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
else
return false
end
end
local function DifficultyFilter(c,e,tp)
return Kaguya.IsDifficulty(c) and Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
......
......@@ -8,7 +8,15 @@ function cm.initial_effect(c)
end
local function KaguyaFilter(c,e,tp,cc)
local p=c:GetControler()
local tc=Senya.GetDFCBackSideCard(cc)
local code=c.dfc_front_side
Duel.DisableActionCheck(true)
local tc=Duel.CreateToken(tp,code)
Duel.DisableActionCheck(false)
if tc then
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
else
return false
end
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c) and (cc:IsControler(c:GetControler()) or c:IsAbleToChangeControler())
end
local function DifficultyFilter(c,e,tp)
......
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