Commit f9346d3c authored by mercury233's avatar mercury233

fix

parent 47efbb80
......@@ -7,10 +7,11 @@ function c100309003.initial_effect(c)
e1:SetDescription(aux.Stringid(100309003,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100309003)
e1:SetCondition(c100309003.eqcon)
e1:SetTarget(c100309003.eqtg)
e1:SetOperation(c100309003.eqop)
c:RegisterEffect(e1)
......@@ -33,6 +34,9 @@ function c100309003.initial_effect(c)
e3:SetOperation(c100309003.thop)
c:RegisterEffect(e3)
end
function c100309003.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c100309003.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -14,6 +14,7 @@ function c100423005.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c100423005.spcon)
e2:SetCost(c100423005.spcost)
e2:SetTarget(c100423005.sptg)
......@@ -59,18 +60,14 @@ function c100423005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(100423005,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c100423005.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
g:KeepAlive()
e:SetLabelObject(g)
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c100423005.spop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local code=g:GetFirst():GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100423005.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,code)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100423005.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel())
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) then
Duel.NegateEffect(ev)
end
......
......@@ -49,7 +49,7 @@ function c101011004.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
e:SetLabelObject(tc)
return tc:IsFaceup() and tc:IsRace(RACE_CYBERSE)
return tc and tc:IsFaceup() and tc:IsRace(RACE_CYBERSE)
end
function c101011004.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
......
......@@ -62,7 +62,7 @@ function c101011034.tetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c101011034.teop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(c101011034.filter,tp,LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(c101011034.tefilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0
and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -34,8 +34,10 @@ function c101011053.fcheck(tp,sg,fc)
end
return true
end
function c101011053.gcheck(sg)
return sg:FilterCount(Card.IsControler,nil,1-tp)<=1
function c101011053.gcheck(tp)
return function(sg)
return sg:FilterCount(Card.IsControler,nil,1-tp)<=1
end
end
function c101011053.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -45,7 +47,7 @@ function c101011053.target(e,tp,eg,ep,ev,re,r,rp,chk)
if mg1:IsExists(c101011053.chkfilter,1,nil,tp) and mg2:GetCount()>0 then
mg1:Merge(mg2)
aux.FCheckAdditional=c101011053.fcheck
aux.GCheckAdditional=c101011053.gcheck
aux.GCheckAdditional=c101011053.gcheck(tp)
end
local res=Duel.IsExistingMatchingCard(c101011053.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
......@@ -73,7 +75,7 @@ function c101011053.activate(e,tp,eg,ep,ev,re,r,rp)
end
if exmat then
aux.FCheckAdditional=c101011053.fcheck
aux.GCheckAdditional=c101011053.gcheck
aux.GCheckAdditional=c101011053.gcheck(tp)
end
local sg1=Duel.GetMatchingGroup(c101011053.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
......@@ -96,7 +98,7 @@ function c101011053.activate(e,tp,eg,ep,ev,re,r,rp)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
aux.FCheckAdditional=c101011053.fcheck
aux.GCheckAdditional=c101011053.gcheck
aux.GCheckAdditional=c101011053.gcheck(tp)
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
......
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