Commit d74fb43e authored by salix5's avatar salix5

Merge pull request #219 from DailyShana/patch-4

fix
parents b10f0195 9531f094
......@@ -38,7 +38,7 @@ function c22082163.filter(c,e,tp)
return c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22082163.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and c22082163.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and c22082163.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22082163.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -48,9 +48,10 @@ end
function c22082163.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
......
......@@ -44,9 +44,10 @@ end
function c23869735.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE)
......
......@@ -39,9 +39,10 @@ end
function c26956670.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c26956670.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -47,9 +47,10 @@ end
function c27551.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c27551.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,12 +39,13 @@ end
function c31550470.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
e:SetLabelObject(tc)
c:CreateRelation(tc,RESET_EVENT+0x1fe0000)
tc:CreateRelation(c,RESET_EVENT+0x1fe0000)
Duel.SpecialSummonComplete()
end
end
function c31550470.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,9 +39,10 @@ end
function c35539880.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c35539880.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -55,9 +55,9 @@ function c60202749.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60202749.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE)
......
......@@ -69,9 +69,10 @@ end
function c60621361.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c60621361.checkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -58,17 +58,15 @@ function c61840587.operation(e,tp,eg,ep,ev,re,r,rp)
sg=sg:Select(tp,ft,ft,nil)
sct=ft
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
local tc=sg:GetFirst()
c:SetCardTarget(tc)
tc:CreateRelation(c,RESET_EVENT+0x1020000)
if sct>1 then
local tc2=sg:GetNext()
c:SetCardTarget(tc2)
tc2:CreateRelation(c,RESET_EVENT+0x1020000)
while tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) do
c:SetCardTarget(tc)
tc:CreateRelation(c,RESET_EVENT+0x1020000)
tc=sg:GetNext()
end
e:SetLabelObject(sg)
sg:KeepAlive()
Duel.SpecialSummonComplete()
end
function c61840587.desfilter1(c,rc)
return c:IsRelateToCard(rc) and c:IsLocation(LOCATION_MZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
......
......@@ -51,9 +51,10 @@ end
function c61962135.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c61962135.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,9 +39,9 @@ function c70861343.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c70861343.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c70861343.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,9 +39,10 @@ end
function c80551130.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c80551130.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -40,9 +40,10 @@ end
function c8057630.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c8057630.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -33,8 +33,10 @@ end
function c84298614.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......
......@@ -63,10 +63,10 @@ function c90200789.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c90200789.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
local tc=g:GetFirst()
if tc then
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c90200789.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,9 +39,10 @@ end
function c92924317.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c92924317.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -47,9 +47,10 @@ end
function c97077563.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c97077563.checkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,9 +39,10 @@ end
function c98273947.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
c:SetCardTarget(tc)
Duel.SpecialSummonComplete()
end
end
function c98273947.desop(e,tp,eg,ep,ev,re,r,rp)
......
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