Commit 7b6ccd42 authored by mercury233's avatar mercury233

fix

parent 84e3e4af
......@@ -30,15 +30,18 @@ function c16719140.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c16719140.rfilter(c)
return c:GetOriginalLevel()>0
end
function c16719140.costfilter(c,e,tp,mg,rlv)
local lv=c:GetLevel()-rlv
return lv>0 and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
and mg:CheckWithSumGreater(Card.GetOriginalLevel,lv)
end
function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetReleaseGroup(tp)
local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.rfilter,nil)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
......@@ -60,17 +63,20 @@ function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-1 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local mg=Duel.GetReleaseGroup(tp)
local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.rfilter,nil)
if not mg:IsContains(c) then return end
mg:RemoveCard(c)
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then
local g=mg:SelectWithSumGreater(tp,Card.GetOriginalLevel,tc:GetLevel()-c:GetOriginalLevel())
g:AddCard(c)
if g:GetCount()>=2 and Duel.Release(g,REASON_EFFECT)~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
......
......@@ -21,7 +21,7 @@ function c22567609.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function c22567609.filter(c,e,tp)
return c:IsCode(22567609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsCode(22567609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c22567609.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......@@ -35,5 +35,6 @@ function c22567609.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(g:GetNext(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
Duel.SpecialSummonComplete()
Duel.ConfirmCards(1-tp,Duel.GetOperatedGroup())
end
end
......@@ -19,7 +19,7 @@ function c24096499.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c24096499.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_BEAST) and not c:IsCode(24096499)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c24096499.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24096499.filter(chkc,e,tp) end
......@@ -34,8 +34,8 @@ function c24096499.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end
end
end
......@@ -58,7 +58,7 @@ function c25704359.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c25704359.spfilter(c,e,tp,att)
return c:IsRace(RACE_SPELLCASTER) and c:GetDefense()==1500 and c:IsAttribute(att)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -84,8 +84,8 @@ function c25704359.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
......
......@@ -10,7 +10,7 @@ function c32231618.initial_effect(c)
c:RegisterEffect(e1)
end
function c32231618.spfilter(c,e,tp)
return c:IsType(TYPE_FLIP) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsType(TYPE_FLIP) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c32231618.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -24,7 +24,7 @@ function c37445295.initial_effect(c)
c:RegisterEffect(e2)
end
function c37445295.filter(c,e,tp)
return c:IsSetCard(0x9d) and not c:IsCode(37445295) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x9d) and not c:IsCode(37445295) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c37445295.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37445295.filter(chkc,e,tp) end
......@@ -46,7 +46,7 @@ function c37445295.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c37445295.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c37445295.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,7 +16,7 @@ function c39432962.initial_effect(c)
end
function c39432962.filter(c,e,tp)
return c:IsSetCard(0x82) and c:GetCode()~=39432962
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c39432962.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -30,8 +30,8 @@ function c39432962.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
......
......@@ -49,7 +49,7 @@ function c39581190.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c39581190.spfilter(c,e,tp)
return c:IsSetCard(0xed) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
return c:IsSetCard(0xed) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c39581190.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -63,9 +63,12 @@ function c39581190.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if not tc then return end
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
end
......@@ -10,7 +10,7 @@ function c39900763.initial_effect(c)
c:RegisterEffect(e1)
end
function c39900763.filter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c39900763.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -22,7 +22,7 @@ function c42143067.cfilter(c,e,tp)
end
function c42143067.spfilter(c,e,tp,att,lv)
return c:IsRace(RACE_ROCK) and c:GetOriginalAttribute()==att and c:GetOriginalLevel()==lv
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c42143067.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -45,8 +45,8 @@ function c42143067.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
......
......@@ -58,7 +58,7 @@ function c44311445.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(44311445,RESET_CHAIN,0,1)
end
function c44311445.spfilter(c,e,tp)
return c:IsSetCard(0x71) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
return c:IsSetCard(0x71) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c44311445.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -72,8 +72,8 @@ function c44311445.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
......
......@@ -17,7 +17,7 @@ function c46044841.condition(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c46044841.filter(c,e,tp)
return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c46044841.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -59,7 +59,7 @@ function c46925518.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c46925518.spfilter(c,e,tp,lv)
return c:IsSetCard(0x8d) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x8d) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c46925518.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c46925518.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
......@@ -17,7 +17,7 @@ function c50243722.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,2000)
end
function c50243722.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c50243722.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c50243722.filter(chkc,e,tp) end
......
......@@ -54,8 +54,8 @@ function c50766506.operation(e,tp,eg,ep,ev,re,r,rp)
sg:RemoveCard(tc)
slv=slv-tc:GetLevel()
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then cg:AddCard(tc) end
c:SetCardTarget(tc)
......
......@@ -16,7 +16,7 @@ function c5220687.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c5220687.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c5220687.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -65,7 +65,7 @@ function c54512827.spcon2(e,tp,eg,ep,ev,re,r,rp)
end
function c54512827.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c54512827.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,7 +26,7 @@ function c58551308.flipop(e,tp,eg,ep,ev,re,r,rp)
end
function c58551308.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c58551308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......@@ -52,16 +52,16 @@ function c58551308.spop(e,tp,eg,ep,ev,re,r,rp)
if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then
local sp=tc:GetControler()
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummonStep(tc,0,sp,sp,false,false,spos) end
end
tc=sg:GetNext()
if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then
local sp=tc:GetControler()
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummonStep(tc,0,sp,sp,false,false,spos) end
end
Duel.SpecialSummonComplete()
......
......@@ -23,7 +23,7 @@ function c58911105.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c58911105.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x2b) and
(c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
(c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c58911105.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -37,7 +37,10 @@ function c58911105.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=g:GetFirst()
if not tc then return end
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -17,7 +17,7 @@ function c60668166.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and c:GetPreviousControler()==tp and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0
end
function c60668166.filter(c,e,tp)
return c:IsCode(60668166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsCode(60668166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c60668166.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -16,7 +16,7 @@ function c6104968.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c6104968.filter(c,e,tp)
return c:IsCode(6104968) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsCode(6104968) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c6104968.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -52,7 +52,7 @@ end
function c61318483.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker()
if chk==0 then return at:IsCanTurnSet() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,at,1,0,0)
end
......
......@@ -15,7 +15,7 @@ function c64815084.filter(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end
function c64815084.spfilter(c,e,tp)
return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c64815084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64815084.filter(chkc) end
......
......@@ -41,7 +41,7 @@ function c67831115.initial_effect(c)
end
function c67831115.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_INSECT)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c67831115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -55,13 +55,15 @@ function c67831115.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
function c67831115.cfilter(c,tp)
local rc=c:GetReasonCard()
......
......@@ -26,7 +26,7 @@ function c68812773.initial_effect(c)
end
function c68812773.filter(c,e,tp)
return c:IsCode(71071546)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c68812773.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68812773.filter(chkc,e,tp) end
......@@ -40,8 +40,8 @@ function c68812773.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
......
......@@ -15,7 +15,7 @@ function c73702909.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_DECK)
end
function c73702909.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c73702909.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -74,8 +74,8 @@ function c74762582.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c74762582.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)>0 then
local tc1=Duel.GetFirstTarget()
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and Duel.ChangePosition(tc1,POS_FACEDOWN_DEFENSE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74762582.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
......@@ -85,6 +85,9 @@ function c74762582.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
......@@ -28,7 +28,7 @@ end
function c76442347.filter(c,e,tp)
return c:IsSetCard(0x5a) and c:GetCode()~=76442347
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c76442347.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76442347.filter(chkc,e,tp) end
......@@ -41,8 +41,8 @@ function c76442347.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end
end
end
......@@ -42,7 +42,7 @@ function c79106360.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c79106360.spfilter(c,e,tp)
local lv=c:GetLevel()
return lv>0 and lv<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return lv>0 and lv<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c79106360.sp(e,tp,ct)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
......
......@@ -20,7 +20,7 @@ function c80802524.condition(e,tp,eg,ep,ev,re,r,rp)
else return false end
end
function c80802524.filter(c,e,tp,code)
return c:IsSetCard(0x8d) and c:GetCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x8d) and c:GetCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c80802524.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80802524.filter(chkc,e,tp,e:GetLabel()) end
......
......@@ -55,7 +55,7 @@ function c81907872.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c81907872.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
......@@ -17,7 +17,7 @@ function c85646474.condition(e,tp,eg,ep,ev,re,r,rp)
and c:GetPreviousControler()==tp and c==Duel.GetAttackTarget() and Duel.GetAttacker():IsControler(1-tp)
end
function c85646474.filter(c,e,tp)
return c:IsSetCard(0x2e) and not c:IsCode(85646474) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x2e) and not c:IsCode(85646474) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c85646474.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -47,7 +47,7 @@ function c9156135.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_DECK) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c9156135.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c9156135.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -31,7 +31,7 @@ function c92729410.splimit(e,c)
end
function c92729410.filter(c,e,tp)
return c:GetCode()~=92729410 and c:GetLevel()==2 and c:IsRace(RACE_BEAST)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c92729410.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -68,7 +68,7 @@ function c93713837.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c93713837.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c93713837.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -12,7 +12,7 @@ function c93775296.initial_effect(c)
end
function c93775296.filter(c,e,tp)
return c:IsType(TYPE_FLIP)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c93775296.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c93775296.filter(chkc,e,tp) end
......@@ -35,8 +35,8 @@ function c93775296.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
while tc do
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,spos) end
tc=g:GetNext()
end
......
......@@ -68,7 +68,7 @@ function c94997874.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c94997874.spfilter(c,e,tp)
return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c94997874.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -49,7 +49,7 @@ function c98263709.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(98263709)~=0 and e:GetHandler():IsReason(REASON_DESTROY)
end
function c98263709.spfilter(c,e,tp)
return c:IsSetCard(0x7b) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x7b) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c98263709.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -71,5 +71,6 @@ function c98263709.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -56,7 +56,7 @@ function c98707192.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c98707192.filter(c,e,tp)
return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c98707192.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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