Commit cd8540d4 authored by TanakaKotoha's avatar TanakaKotoha

tianqiao

parent 81ae183a
...@@ -81,11 +81,10 @@ function c12005004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -81,11 +81,10 @@ function c12005004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c12005004.operation(e,tp,eg,ep,ev,re,r,rp) function c12005004.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
...@@ -32,16 +32,16 @@ function c12030009.initial_effect(c) ...@@ -32,16 +32,16 @@ function c12030009.initial_effect(c)
e2:SetOperation(cm.disop) e2:SetOperation(cm.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave --to grave
-- local e3=Effect.CreateEffect(c) -- local e3=Effect.CreateEffect(c)
-- e3:SetDescription(aux.Stringid(m,2)) -- e3:SetDescription(aux.Stringid(m,2))
-- e3:SetCategory(CATEGORY_TOHAND) -- e3:SetCategory(CATEGORY_TOHAND)
-- e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) -- e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
-- e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) -- e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
-- e3:SetCode(EVENT_TO_GRAVE) -- e3:SetCode(EVENT_TO_GRAVE)
-- e3:SetCondition(cm.drcon) -- e3:SetCondition(cm.drcon)
-- e3:SetTarget(cm.drtg) -- e3:SetTarget(cm.drtg)
-- e3:SetOperation(cm.drop) -- e3:SetOperation(cm.drop)
-- c:RegisterEffect(e3) -- c:RegisterEffect(e3)
end end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -67,12 +67,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,12 +67,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
......
...@@ -59,8 +59,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,8 +59,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c,tc=e:GetHandler(),Duel.GetFirstTarget() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -41,12 +41,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,12 +41,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
function cm.tgfilter(c,e,tp) function cm.tgfilter(c,e,tp)
......
...@@ -33,6 +33,7 @@ end ...@@ -33,6 +33,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -213,7 +214,7 @@ function scorp.SelectGroup(tp,desc,g,f,cg,min,max,...) ...@@ -213,7 +214,7 @@ function scorp.SelectGroup(tp,desc,g,f,cg,min,max,...)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup() local cg=cg or Group.CreateGroup()
sg:Merge(cg) sg:Merge(cg)
local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
local seg=sg-cg local seg=sg-cg
...@@ -238,7 +239,7 @@ function scorp.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...) ...@@ -238,7 +239,7 @@ function scorp.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup() local cg=cg or Group.CreateGroup()
sg:Merge(cg) sg:Merge(cg)
local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
local cancel=finish or #sg==0 local cancel=finish or #sg==0
......
...@@ -65,6 +65,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,6 +65,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.GetMZoneCount(tp)>0 and tc:IsRelateToEffect(e) then if Duel.GetMZoneCount(tp)>0 and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetLevel(),tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetLevel(),tc:GetCode())
......
...@@ -34,6 +34,7 @@ end ...@@ -34,6 +34,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if #g>0 then if #g>0 then
......
...@@ -33,6 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,6 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode())
if #g>0 then if #g>0 then
......
This diff is collapsed.
...@@ -116,6 +116,7 @@ end ...@@ -116,6 +116,7 @@ end
function c60152312.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152312.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -39,9 +39,10 @@ function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,9 +39,10 @@ function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp) function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
if atk<0 then atk=0 end if atk<0 then atk=0 end
......
...@@ -47,9 +47,10 @@ function c76121005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,9 +47,10 @@ function c76121005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c76121005.spop1(e,tp,eg,ep,ev,re,r,rp) function c76121005.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
......
...@@ -42,9 +42,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,9 +42,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if tc:GetSummonLocation()==LOCATION_EXTRA then if tc:GetSummonLocation()==LOCATION_EXTRA then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
......
...@@ -37,6 +37,7 @@ end ...@@ -37,6 +37,7 @@ end
function c9910237.operation(e,tp,eg,ep,ev,re,r,rp) function c9910237.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910237.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c9910237.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if g:GetCount()>0 then if g:GetCount()>0 then
......
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