Commit a435d74d authored by DailyShana's avatar DailyShana

fix

parent 0a7ab9e0
......@@ -10,11 +10,26 @@ function c59695933.initial_effect(c)
e1:SetTarget(c59695933.target)
e1:SetOperation(c59695933.activate)
c:RegisterEffect(e1)
if not c59695933.global_check then
c59695933.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c59695933.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c59695933.valcheck(e,c)
if c:GetMaterialCount()==1 and c:GetMaterial():GetFirst():IsType(TYPE_MONSTER) then
c:RegisterFlagEffect(59695933,0,0,0)
end
end
function c59695933.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsSummonType(SUMMON_TYPE_ADVANCE)
and tc:GetMaterialCount()==1
local res=tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:GetFlagEffect(59695933)~=0
tc:ResetFlagEffect(59695933)
return res
end
function c59695933.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......
......@@ -18,11 +18,29 @@ function c68304813.initial_effect(c)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_MSET)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c68304813.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c68304813.valcheck(e,c)
if c:GetMaterial():IsExists(Card.IsType,2,nil,TYPE_MONSTER) then
e:GetLabelObject():SetLabel(1)
e:GetLabelObject():GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
e:GetLabelObject():GetLabelObject():SetLabel(0)
end
end
function c68304813.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:GetMaterialCount()>=2 and tc:GetSummonPlayer()==tp
return tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:GetSummonPlayer()==tp and e:GetLabel()==1
end
function c68304813.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
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