Commit f260410b authored by POLYMER's avatar POLYMER

fix

parent a3f06c5b
......@@ -125,16 +125,16 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function s.cfilter1(c)
function s.cfilter1(c,tp)
local seq=c:GetSequence()
return c:IsCode(12835101) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE) and seq==c:GetPreviousSequence()-1 and seq<=3
return c:IsControler(tp) and c:IsCode(12835101) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE) and seq==c:GetPreviousSequence()-1 and seq<=3
end
function s.mcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter1,1,nil) and e:GetHandler():GetFlagEffect(id)==0
return eg:IsExists(s.cfilter1,1,nil,tp) and e:GetHandler():GetFlagEffect(id)==0
end
function s.mtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mc=eg:Filter(s.cfilter1,nil):GetFirst()
local mc=eg:Filter(s.cfilter1,nil,tp):GetFirst()
if not mc then return false end
local tg=mc:GetColumnGroup():Filter(Card.IsAbleToHand,nil)
if chk==0 then return tg:GetCount()>0 and c:GetFlagEffect(id+100)==0 end
......@@ -142,7 +142,6 @@ function s.mtg1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabelObject(mc)
mc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
return eg:IsExists(s.cfilter1,1,nil)
end
function s.mop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -166,12 +165,12 @@ function s.mop1(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1,true)
c:SetTurnCounter(3)
end
function s.cfilter2(c)
function s.cfilter2(c,tp)
local seq=c:GetSequence()
return c:IsCode(12835101) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE) and seq==c:GetPreviousSequence()+1 and seq<=4
return c:IsControler(tp) and c:IsCode(12835101) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE) and seq==c:GetPreviousSequence()+1 and seq<=4
end
function s.mcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter2,1,nil) and e:GetHandler():GetFlagEffect(id)==0
return eg:IsExists(s.cfilter2,1,nil,tp) and e:GetHandler():GetFlagEffect(id)==0
end
function s.desfilter(c,s,tp)
local seq=c:GetSequence()
......@@ -181,7 +180,7 @@ function s.desfilter(c,s,tp)
end
function s.mtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mc=eg:Filter(s.cfilter2,nil):GetFirst()
local mc=eg:Filter(s.cfilter2,nil,tp):GetFirst()
if not mc then return false end
local seq=mc:GetPreviousSequence()
local tg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,mc,seq,mc:GetControler())
......@@ -190,7 +189,6 @@ function s.mtg2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabelObject(mc)
mc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
return eg:IsExists(s.cfilter2,1,nil)
end
function s.mop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -46,6 +46,7 @@ function c12869025.q(c)
return c:IsFaceup() and c:IsSetCard(0x6a70)
end
function c12869025.con(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c12869025.q,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c12869025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -43,6 +43,7 @@ function c12869030.q(c)
return c:IsFaceup() and c:IsSetCard(0x6a70)
end
function c12869030.con(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c12869030.q,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c12869030.indcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -43,6 +43,7 @@ function c12869035.q(c)
return c:IsFaceup() and c:IsSetCard(0x6a70)
end
function c12869035.con(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c12869035.q,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c12869035.indcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -43,6 +43,7 @@ function c12869040.q(c)
return c:IsFaceup() and c:IsSetCard(0x6a70)
end
function c12869040.con(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c12869040.q,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c12869040.indcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,18 +26,18 @@ function c22348435.initial_effect(c)
end
c22348435.has_text_type=TYPE_UNION
function c22348435.beqfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp)
return c:IsFaceup() and c:IsSummonPlayer(1-tp)
end
function c22348435.eqfilter(c,ct)
return c:IsSetCard(0x970b) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.IsExistingMatchingCard(c22348435.eqfilter2,tp,LOCATION_GRAVE,0,ct,c)
function c22348435.eqfilter(c)
return c:IsSetCard(0x970b) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.IsExistingMatchingCard(c22348435.eqfilter2,c:GetControler(),LOCATION_GRAVE,0,1,c)
end
function c22348435.eqfilter2(c)
return c:IsSetCard(0x970b) and c:IsAbleToDeck()
end
function c22348435.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c22348435.beqfilter,1,nil,1-tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c22348435.eqfilter,tp,LOCATION_GRAVE,0,1,nil,1) end
if chk==0 then return eg:IsExists(c22348435.beqfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c22348435.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetTargetCard(eg)
local g=eg:Filter(c22348435.beqfilter,nil,1-tp)
local g=eg:Filter(c22348435.beqfilter,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,0,1,0,0)
end
function c22348435.filter2(c,e,tp)
......@@ -48,11 +48,10 @@ function c22348435.gcheck(g,e,tp)
end
function c22348435.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c22348435.filter2,nil,e,1-tp)
local g=eg:Filter(c22348435.filter2,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local ctg=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil,1)
local ct=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil,1):GetCount()
Debug.Message(ct)
local ctg=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil)
local ct=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil):GetCount()
local tc=g:GetFirst()
if not tc or ft<1 or ct<1 then return end
if g:GetCount()>1 then
......@@ -67,7 +66,15 @@ function c22348435.eqop(e,tp,eg,ep,ev,re,r,rp)
local tg=ctg:SelectSubGroup(tp,c22348435.gcheck,false,1,ct,e,tp)
local ec=tg:GetFirst()
while ec do
if Duel.Equip(tp,ec,tc,true,true)~=0 then cct=cct+1 end
if Duel.Equip(tp,ec,tc,true,true)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c22348435.eqlimit)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1)
cct=cct+1 end
ec=tg:GetNext()
end
if Duel.IsExistingMatchingCard(c22348435.eqfilter2,tp,LOCATION_GRAVE,0,1,nil) then
......@@ -76,6 +83,9 @@ function c22348435.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(ttg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c22348435.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c22348435.thfilter(c,tp)
return c:IsSetCard(0x970b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(c22348435.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode())
......
......@@ -26,17 +26,17 @@ function c22348437.initial_effect(c)
c:RegisterEffect(e2)
end
c22348437.has_text_type=TYPE_UNION
function c22348437.filter(c,tp)
function c22348437.filter111(c,tp)
return Duel.IsExistingMatchingCard(c22348437.cfilter1,tp,LOCATION_DECK,0,1,nil,c,tp) and c:IsFaceup()
end
function c22348437.cfilter1(c,ec,tp)
return c:IsSetCard(0x970b) and c:IsType(TYPE_UNION) and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec)
end
function c22348437.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c22348437.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22348437.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c22348437.filter111(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c22348437.filter111,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c22348437.filter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348437.filter111,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
Duel.SetChainLimit(c22348437.limit(g:GetFirst()))
end
......
......@@ -16,6 +16,8 @@ function c76029019.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(function(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end)
e2:SetTarget(c76029019.dztg)
e2:SetOperation(c76029019.dzop)
c:RegisterEffect(e2)
......@@ -50,7 +52,7 @@ function c76029019.mfilter(c)
end
function c76029019.dztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local zone=Duel.SelectField(tp,1,0,LOCATION_MZONE,nil)
local zone=Duel.SelectField(tp,1,0,LOCATION_MZONE,0x600060)
e:SetLabel(zone)
Duel.Hint(HINT_ZONE,tp,zone)
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