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)
end
function c12005004.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -67,13 +67,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function cm.spfilter(c,e,tp)
return c:CheckSetCard("yatori") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
......
......@@ -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)
end
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 (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -41,13 +41,12 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function cm.tgfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_MONSTER) and c:IsCanBeEffectTarget(e)
......
......@@ -33,6 +33,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
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())
if g:GetCount()>0 then
......
......@@ -65,6 +65,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
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
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())
......
......@@ -34,6 +34,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
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())
if #g>0 then
......
......@@ -33,6 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
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())
if #g>0 then
......
......@@ -118,6 +118,7 @@ end
function c60152311.e99op(e,tp,eg,ep,ev,re,r,rp)
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 then
local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
......@@ -116,6 +116,7 @@ end
function c60152312.e99op(e,tp,eg,ep,ev,re,r,rp)
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 then
local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
......@@ -141,6 +141,7 @@ end
function c60152313.e99op(e,tp,eg,ep,ev,re,r,rp)
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 then
local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
......@@ -172,6 +172,7 @@ end
function c60152314.e99op(e,tp,eg,ep,ev,re,r,rp)
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 then
local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
......@@ -197,6 +197,7 @@ end
function c60152315.e99op(e,tp,eg,ep,ev,re,r,rp)
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 then
local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
......@@ -135,6 +135,7 @@ end
function c60152316.e99op(e,tp,eg,ep,ev,re,r,rp)
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 then
local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
......@@ -39,9 +39,10 @@ function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
......
......@@ -47,9 +47,10 @@ function c76121005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c76121005.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
......
......@@ -42,9 +42,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
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)
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:GetSummonLocation()==LOCATION_EXTRA then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
......
......@@ -37,6 +37,7 @@ end
function c9910237.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
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())
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