Commit bb30e9a7 authored by nekrozar's avatar nekrozar

fix

parent b46513ab
......@@ -34,7 +34,9 @@ function c10178757.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c10178757.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -22,9 +22,6 @@ function c10194329.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c10194329.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -33,6 +30,11 @@ function c10194329.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c10194329.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c10194329.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xba) and c:IsLocation(LOCATION_EXTRA)
......
......@@ -44,8 +44,11 @@ function c10530913.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10530913.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c10530913.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -76,6 +76,9 @@ function c11366199.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c11366199.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -45,7 +45,8 @@ function c12275533.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c12275533.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
......@@ -63,6 +64,8 @@ function c12275533.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetOperation(c12275533.adjustop)
c:RegisterEffect(e2)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c12275533.efilter(e,te)
......
......@@ -32,8 +32,10 @@ function c12423762.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c12423762.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c12423762.indcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -56,6 +56,8 @@ function c13647631.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(def/2)
c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c13647631.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -67,6 +67,6 @@ function c14624296.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_EFFECT)
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -36,8 +36,11 @@ function c14677495.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14677495.spop1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c14677495.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -30,8 +30,11 @@ function c15475415.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c15475415.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c15475415.ctcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -38,8 +38,8 @@ function c15495787.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c15495787.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......@@ -49,5 +49,7 @@ function c15495787.spop(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -25,7 +25,8 @@ function c15721123.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c15721123.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
......@@ -34,6 +35,8 @@ function c15721123.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c15721123.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c15721123.efilter(e,te)
......
......@@ -24,8 +24,11 @@ function c16947147.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c16947147.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK)
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -73,8 +73,11 @@ function c18175965.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c18175965.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c18175965.filter(c,ec)
......
......@@ -29,7 +29,9 @@ function c19353570.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c19353570.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -31,7 +31,8 @@ function c19580308.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c19580308.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......@@ -39,5 +40,7 @@ function c19580308.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -52,7 +52,12 @@ end
function c20056760.spop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
function c20056760.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,7 +46,9 @@ function c20773176.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c20773176.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -35,7 +35,9 @@ function c20838380.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c20838380.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -22,7 +22,10 @@ function c21051977.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_HAND,0,1,1,nil,67445676)
if g:GetCount()==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -45,9 +45,10 @@ function c21954587.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c21954587.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c21954587.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -38,9 +38,6 @@ function c22382087.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c22382087.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -49,6 +46,11 @@ function c22382087.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0)
e1:SetTarget(c22382087.splimit)
Duel.RegisterEffect(e1,tp)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c22382087.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
......
......@@ -36,9 +36,10 @@ function c22446869.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c22446869.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c22446869.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -55,7 +55,12 @@ end
function c23296404.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
function c23296404.thfilter(c)
......
......@@ -49,8 +49,10 @@ function c23979249.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c23979249.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c23979249.regfilter(c,tp)
......
......@@ -32,8 +32,11 @@ function c24658418.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c24658418.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP_DEFENCE)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c24658418.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -51,5 +51,7 @@ function c24731453.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(1-tp,ct*200,REASON_EFFECT)
end
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -87,9 +87,12 @@ function c24857466.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c24857466.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tpe=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+24857466,e,0,0,tp,tpe)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c24857466.damcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -25,7 +25,10 @@ function c25206027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c25206027.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -37,8 +37,10 @@ function c25484449.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c25484449.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c25484449.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -62,8 +62,10 @@ function c26400609.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c26400609.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c26400609.retcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -34,8 +34,10 @@ function c26775203.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c26775203.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c26775203.adchange(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -62,8 +62,10 @@ function c27769400.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c27769400.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c27769400.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -31,8 +31,10 @@ function c293542.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c293542.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c293542.regop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,7 +27,10 @@ function c29905795.op(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,e:GetHandler())
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -36,7 +36,8 @@ function c3167573.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c3167573.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e2=e:GetLabelObject()
if Duel.GetTurnPlayer()==tp then
c:RegisterFlagEffect(3167573,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2)
......@@ -45,6 +46,8 @@ function c3167573.spop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterFlagEffect(3167573,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
e2:SetLabel(Duel.GetTurnCount()+1)
end
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c3167573.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,8 +37,10 @@ function c33823832.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c33823832.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c33823832.cacon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -28,7 +28,8 @@ end
function c35073065.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=eg:GetFirst()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if ec:IsRelateToEffect(e) and ec:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -58,5 +59,7 @@ function c35073065.spop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -38,7 +38,10 @@ function c35537251.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -49,8 +49,11 @@ function c36553319.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c36553319.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c36553319.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -40,8 +40,10 @@ function c36704180.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c36704180.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c36704180.drcfilter(c)
......
......@@ -48,9 +48,10 @@ function c37781520.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c37781520.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c37781520.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -25,7 +25,9 @@ function c39439590.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c39439590.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -76,6 +76,6 @@ function c40028305.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_EFFECT)
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -36,7 +36,8 @@ function c40159926.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c40159926.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......@@ -44,6 +45,8 @@ function c40159926.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c40159926.lvfilter(c)
......
......@@ -50,8 +50,10 @@ function c41329458.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c41329458.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c41329458.cfilter(c)
......
......@@ -48,11 +48,13 @@ function c44330098.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c44330098.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local sumtype=1
if bit.band(r,REASON_BATTLE)~=0 then sumtype=2 end
if Duel.SpecialSummon(c,sumtype,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) then return end
local sumtype=1
if bit.band(r,REASON_BATTLE)~=0 then sumtype=2 end
if Duel.SpecialSummon(c,sumtype,tp,tp,false,false,POS_FACEUP)~=0 then
e:SetLabel(ev)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c44330098.sumcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -48,8 +48,11 @@ function c45593826.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c45593826.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c45593826.dttg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -46,9 +46,12 @@ function c46502744.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c46502744.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
c:RegisterFlagEffect(46502745,RESET_EVENT+0xfe0000,0,1)
Duel.SpecialSummonComplete()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c46502744.remcon(e)
......
......@@ -34,8 +34,11 @@ function c46659709.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c46659709.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c46659709.filter(c)
......
......@@ -32,7 +32,9 @@ function c46668237.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c46668237.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
--Alich, Malebranche of the Burning Abyss
--彼岸の悪鬼 アリキーノ
function c47728740.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,9 +49,11 @@ function c47728740.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -38,8 +38,11 @@ function c47863787.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c47863787.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c47863787.cfilter(c,tp)
......
......@@ -32,8 +32,11 @@ function c49460512.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c49460512.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c49460512.limitcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -24,8 +24,10 @@ function c50702124.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c50702124.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -67,8 +67,11 @@ function c52575195.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c52575195.retcon)
e1:SetOperation(c52575195.retop)
tc:RegisterEffect(e1)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
......
......@@ -34,8 +34,10 @@ function c53090623.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c53090623.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c53090623.rdcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -45,7 +45,6 @@ function c53485634.filter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53485634.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c53485634.filter,nil,e,tp)
......@@ -63,6 +62,8 @@ function c53485634.spop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c53485634.sumcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -48,8 +48,10 @@ function c53678698.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c53678698.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c53678698.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -63,8 +63,10 @@ function c53804307.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c53804307.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c53804307.retcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,8 +35,10 @@ function c53855409.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c53855409.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c53855409.tcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,8 +39,10 @@ function c54149433.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c54149433.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c54149433.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,7 +26,10 @@ function c54161401.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c54161401.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -70,7 +70,12 @@ function c54512827.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c54512827.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateAttack() and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then
Duel.ConfirmCards(1-tp,c)
if Duel.NegateAttack() then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then
Duel.ConfirmCards(1-tp,c)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
......@@ -31,8 +31,10 @@ function c54582424.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c54582424.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -31,8 +31,10 @@ function c54635862.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c54635862.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c54635862.atlimit(e,c)
......
......@@ -36,7 +36,8 @@ function c54941203.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c54941203.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......@@ -44,6 +45,8 @@ function c54941203.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c54941203.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -37,8 +37,11 @@ function c55277252.op(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,e:GetHandler())
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c55277252.con2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -59,8 +59,10 @@ function c56619314.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c56619314.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c56619314.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -49,8 +49,11 @@ function c57143342.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c57143342.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c57143342.spfilter(c,e,tp)
......
......@@ -27,6 +27,9 @@ function c5763020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c5763020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -38,9 +38,6 @@ function c58786132.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c58786132.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -49,6 +46,11 @@ function c58786132.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0)
e1:SetTarget(c58786132.splimit)
Duel.RegisterEffect(e1,tp)
local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c58786132.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
......
......@@ -54,8 +54,10 @@ function c5929801.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c5929801.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c5929801.thfilter(c)
......
......@@ -18,7 +18,9 @@ function c59755122.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c59755122.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -55,7 +55,12 @@ end
function c59785059.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
function c59785059.thfilter(c)
......
......@@ -33,9 +33,6 @@ function c59808784.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c59808784.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -44,6 +41,11 @@ function c59808784.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0)
e1:SetTarget(c59808784.splimit)
Duel.RegisterEffect(e1,tp)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c59808784.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
......
......@@ -62,9 +62,12 @@ function c60417395.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60417395.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)~=0 then
e:GetHandler():CompleteProcedure()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c60417395.filter(c)
......
......@@ -60,8 +60,11 @@ function c61318483.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=Duel.GetAttacker()
if at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsFaceup() and Duel.ChangePosition(at,POS_FACEDOWN_DEFENCE)>0 then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then
Duel.ConfirmCards(1-tp,c)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
......@@ -27,7 +27,9 @@ function c61791132.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c61791132.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -49,8 +49,11 @@ function c62957424.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c62957424.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c62957424.spfilter(c,e,tp)
......
......@@ -48,7 +48,9 @@ function c63211608.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c63211608.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -28,8 +28,11 @@ function c64034255.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c64034255.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
if not c:IsRelateToEffect(e) then return end
if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
return
end
if e:GetLabel()==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -21,7 +21,10 @@ function c64379261.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c64379261.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -33,10 +33,13 @@ end
function c64605089.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=Duel.GetAttacker()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and at:IsFaceup() and at:IsRelateToBattle() and at:GetAttack()<c:GetDefence() then
Duel.BreakEffect()
Duel.Destroy(at,REASON_EFFECT)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c64605089.efcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,7 +37,9 @@ function c65303664.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c65303664.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -40,8 +40,10 @@ function c66413481.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c66413481.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c66413481.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -49,7 +49,8 @@ function c66752837.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c66752837.thfilter,tp,LOCATION_GRAVE,0,nil)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and e:GetLabel()==1
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and e:GetLabel()==1
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(66752837,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -57,5 +58,7 @@ function c66752837.spop(e,tp,eg,ep,ev,re,r,rp)
if sg:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsLocation(LOCATION_HAND) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -39,8 +39,10 @@ function c68120130.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c68120130.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c68120130.defcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -75,7 +75,9 @@ function c69304426.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c69304426.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -48,8 +48,11 @@ function c69838592.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c69838592.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c69838592.filter(c,tc)
......
......@@ -67,8 +67,10 @@ function c72181263.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c72181263.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c72181263.regop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -49,8 +49,11 @@ function c73213494.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c73213494.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c73213494.thfilter(c)
......
......@@ -49,7 +49,10 @@ function c734741.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c734741.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -40,8 +40,10 @@ end
function c74298287.spop1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c74298287.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c74298287.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,9 +46,10 @@ function c75180828.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c75180828.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c75180828.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -40,9 +40,12 @@ function c7563579.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c7563579.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
Duel.Damage(tp,500,REASON_EFFECT)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c7563579.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -66,8 +66,10 @@ function c76218313.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c76218313.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c76218313.splimit(e,c)
......
......@@ -48,8 +48,11 @@ function c7634581.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c7634581.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)
e:GetHandler():CompleteProcedure()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -29,7 +29,9 @@ function c81336148.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c81336148.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
......@@ -63,8 +63,11 @@ function c81907872.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c81907872.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then
Duel.ConfirmCards(1-tp,c)
Duel.Draw(tp,1,REASON_EFFECT)
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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