Commit e33cd23c authored by POLYMER's avatar POLYMER

fix

parent a98c65b0
No preview for this file type
...@@ -105,9 +105,9 @@ function c260013010.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,9 +105,9 @@ function c260013010.chop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c260013010.xyzfilter2,nil,e,tp) local g2=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c260013010.xyzfilter2,nil,e,tp)
if Duel.GetFlagEffect(tp,260013010)==0 and g:GetCount()>0 and g:GetCount()==g2:GetCount() and rc:IsRelateToEffect(re) if Duel.GetFlagEffect(tp,260013010)==0 and g:GetCount()>0 and g:GetCount()==g2:GetCount() and rc:IsRelateToEffect(re)
and Duel.IsChainNegatable(ev) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and Duel.SelectYesNo(tp,aux.Stringid(260013010,0)) then and Duel.IsChainNegatable(ev) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and Duel.SelectYesNo(tp,aux.Stringid(260013010,0)) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,260013010,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then if Duel.NegateEffect(ev) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,260013010,RESET_PHASE+PHASE_END,0,1)
rc:CancelToGrave() rc:CancelToGrave()
g:AddCard(rc) g:AddCard(rc)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -138,8 +138,9 @@ function c260013010.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,8 +138,9 @@ function c260013010.atop(e,tp,eg,ep,ev,re,r,rp)
if not a:IsRelateToEffect(e) and a:IsAttackable() and not a:IsStatus(STATUS_ATTACK_CANCELED) if not a:IsRelateToEffect(e) and a:IsAttackable() and not a:IsStatus(STATUS_ATTACK_CANCELED)
and a:IsCanBeXyzMaterial(c) and d:IsCanBeXyzMaterial(c) and a:IsCanBeXyzMaterial(c) and d:IsCanBeXyzMaterial(c)
and not d:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(260013010,0)) then and not d:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(260013010,0)) then
Duel.ConfirmCards(1-tp,c)
if Duel.NegateAttack() then if Duel.NegateAttack() then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,260013010,RESET_PHASE+PHASE_END,0,1)
local g=Group.FromCards(a,d) local g=Group.FromCards(a,d)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -102,9 +102,9 @@ function c260013011.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,9 +102,9 @@ function c260013011.chop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c260013011.xyzfilter2,nil,e,tp) local g2=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c260013011.xyzfilter2,nil,e,tp)
if Duel.GetFlagEffect(tp,260013011)==0 and g:GetCount()>0 and g:GetCount()==g2:GetCount() and rc:IsRelateToEffect(re) if Duel.GetFlagEffect(tp,260013011)==0 and g:GetCount()>0 and g:GetCount()==g2:GetCount() and rc:IsRelateToEffect(re)
and Duel.IsChainNegatable(ev) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and Duel.SelectYesNo(tp,aux.Stringid(260013011,0)) then and Duel.IsChainNegatable(ev) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and Duel.SelectYesNo(tp,aux.Stringid(260013011,0)) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,260013011,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then if Duel.NegateEffect(ev) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,260013011,RESET_PHASE+PHASE_END,0,1)
rc:CancelToGrave() rc:CancelToGrave()
g:AddCard(rc) g:AddCard(rc)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -135,8 +135,9 @@ function c260013011.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -135,8 +135,9 @@ function c260013011.atop(e,tp,eg,ep,ev,re,r,rp)
if not a:IsRelateToEffect(e) and a:IsAttackable() and not a:IsStatus(STATUS_ATTACK_CANCELED) if not a:IsRelateToEffect(e) and a:IsAttackable() and not a:IsStatus(STATUS_ATTACK_CANCELED)
and a:IsCanBeXyzMaterial(c) and d:IsCanBeXyzMaterial(c) and a:IsCanBeXyzMaterial(c) and d:IsCanBeXyzMaterial(c)
and not d:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(260013011,0)) then and not d:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(260013011,0)) then
Duel.ConfirmCards(1-tp,c)
if Duel.NegateAttack() then if Duel.NegateAttack() then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,260013011,RESET_PHASE+PHASE_END,0,1)
local g=Group.FromCards(a,d) local g=Group.FromCards(a,d)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,m+1) e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.destg) e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
......
...@@ -11,7 +11,19 @@ function cm.initial_effect(c) ...@@ -11,7 +11,19 @@ function cm.initial_effect(c)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1000)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetDescription(aux.Stringid(m,2))
...@@ -36,6 +48,22 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,6 +48,22 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
function cm.cfilter(c,tp,re)
return c:IsPreviousControler(tp) and aux.IsCodeListed(c,40020183) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp,re)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp) function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end if not re then return false end
......
...@@ -39,7 +39,7 @@ function c95101043.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c95101043.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c95101043.spfilter(c,e,tp,zone) function c95101043.spfilter(c,e,tp,zone)
return c:IsCode(95101001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp,zone) return aux.IsCodeListed(c,95101001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp,zone)
end end
function c95101043.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c95101043.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone(1-tp) local zone=e:GetHandler():GetLinkedZone(1-tp)
......
...@@ -43,7 +43,7 @@ function c98920355.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c98920355.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c98920355.distg) e1:SetTarget(c98920355.distg)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -51,7 +51,7 @@ function c98920355.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c98920355.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCondition(c98920355.discon) e2:SetCondition(c98920355.discon)
e2:SetOperation(c98920355.disop) e2:SetOperation(c98920355.disop)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END,2) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end 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