Commit 3a79f79e authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

update for 肆世壊の継承 (#1788)

parent c4247881
...@@ -45,7 +45,7 @@ function c10698416.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c10698416.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c10698416.filter1(c,e,tp) function c10698416.filter1(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(10698416) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x104) and not c:IsCode(10698416) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c10698416.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10698416.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -33,8 +33,7 @@ function c109401.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,8 +33,7 @@ function c109401.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c109401.spfilter(c,e,tp) function c109401.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup() return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c109401.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c109401.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c109401.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c109401.spfilter(chkc,e,tp) end
...@@ -48,12 +47,7 @@ function c109401.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,12 +47,7 @@ function c109401.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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 return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -79,7 +79,7 @@ function c11678191.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c11678191.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c11678191.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c11678191.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(11678191)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(11678191)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(11678191,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(11678191,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -23,14 +23,14 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,14 +23,14 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc) local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false) and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
tc:CreateEffectRelation(e) tc:CreateEffectRelation(e)
local g=Duel.GetMatchingGroup(c12247206.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc,e,tp) local g=Duel.GetMatchingGroup(c12247206.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),PLAYER_ALL,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),PLAYER_ALL,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function c12247206.filter(c,tc,e,tp) function c12247206.filter(c,tc,e,tp)
return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c12247206.selfilter(c,e,tp) function c12247206.selfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c12247206.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c,e,tp) return c:IsFaceup() and Duel.IsExistingMatchingCard(c12247206.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c,e,tp)
......
...@@ -79,7 +79,7 @@ function c12965761.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c12965761.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c12965761.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c12965761.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(12965761)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(12965761)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(12965761,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(12965761,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -17,7 +17,7 @@ function c13166648.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c13166648.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c13166648.filter(c,e,tp) function c13166648.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c13166648.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13166648.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13166648.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c13166648.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......
...@@ -32,7 +32,7 @@ function c14943837.synlimit2(e,c) ...@@ -32,7 +32,7 @@ function c14943837.synlimit2(e,c)
return not c:IsLevel(4) return not c:IsLevel(4)
end end
function c14943837.filter2(c,e,sp) function c14943837.filter2(c,e,sp)
return c:IsAttackBelow(500) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsAttackBelow(500) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEUP_ATTACK)
end end
function c14943837.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14943837.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14943837.filter2(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14943837.filter2(chkc,e,tp) end
......
...@@ -18,7 +18,7 @@ end ...@@ -18,7 +18,7 @@ end
function c15341821.operation(e,tp,eg,ep,ev,re,r,rp) function c15341821.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,15341822,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_WIND) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,15341822,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_WIND,POS_FACEUP_DEFENSE) then return end
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,15341821+i) local token=Duel.CreateToken(tp,15341821+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -42,7 +42,7 @@ function c15710054.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c15710054.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c15710054.filter1(c,e,tp) function c15710054.filter1(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(15710054) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x104) and not c:IsCode(15710054) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c15710054.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c15710054.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -31,8 +31,7 @@ function c16719140.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,8 +31,7 @@ function c16719140.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function c16719140.costfilter(c,e,tp,mg,rlv,mc) function c16719140.costfilter(c,e,tp,mg,rlv,mc)
if not (c:IsLevelAbove(0) and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() if not (c:IsLevelAbove(0) and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)) then return false end
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))) then return false end
return mg:CheckSubGroup(c16719140.fselect,1,c:GetLevel(),tp,c:GetLevel()-rlv,mc) return mg:CheckSubGroup(c16719140.fselect,1,c:GetLevel(),tp,c:GetLevel()-rlv,mc)
end end
function c16719140.fselect(g,tp,lv,mc) function c16719140.fselect(g,tp,lv,mc)
...@@ -72,16 +71,13 @@ function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,16 +71,13 @@ function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.relfilter,c) local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.relfilter,c)
if mg:GetCount()==0 then return end if mg:GetCount()==0 then return end
local spos=0 if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) then
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 spos~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=mg:SelectSubGroup(tp,c16719140.fselect,false,1,tc:GetLevel(),tp,tc:GetLevel()-c:GetOriginalLevel(),c) local g=mg:SelectSubGroup(tp,c16719140.fselect,false,1,tc:GetLevel(),tp,tc:GetLevel()-c:GetOriginalLevel(),c)
if g and g:GetCount()>0 then if g and g:GetCount()>0 then
g:AddCard(c) g:AddCard(c)
if Duel.Release(g,REASON_EFFECT)~=0 then if Duel.Release(g,REASON_EFFECT)~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)
if tc:IsFacedown() then if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -20,7 +20,7 @@ function c16947147.filter(c) ...@@ -20,7 +20,7 @@ function c16947147.filter(c)
end end
function c16947147.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c16947147.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16947147.filter,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c16947147.filter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
local g=Duel.GetMatchingGroup(c16947147.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c16947147.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
......
...@@ -41,14 +41,14 @@ end ...@@ -41,14 +41,14 @@ end
function c17418744.target(e,tp,eg,ep,ev,re,r,rp,chk) function c17418744.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,TYPES_TOKEN_MONSTER,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,TYPES_TOKEN_MONSTER,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function c17418744.activate(e,tp,eg,ep,ev,re,r,rp) function c17418744.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,TYPES_TOKEN_MONSTER,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) then and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,TYPES_TOKEN_MONSTER,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE) then
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,17418745) local token=Duel.CreateToken(tp,17418745)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -19,7 +19,7 @@ function c18302224.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c18302224.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c18302224.cfilter,1,nil,tp) return eg:IsExists(c18302224.cfilter,1,nil,tp)
end end
function c18302224.filter(c,e,tp) function c18302224.filter(c,e,tp)
return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c18302224.target(e,tp,eg,ep,ev,re,r,rp,chk) function c18302224.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -73,7 +73,7 @@ function c1833916.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function c1833916.spcon2(e,tp,eg,ep,ev,re,r,rp)
end end
function c1833916.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c1833916.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c1833916.spop2(e,tp,eg,ep,ev,re,r,rp) function c1833916.spop2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -79,7 +79,7 @@ function c19086954.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c19086954.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c19086954.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19086954.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(19086954)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(19086954)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(19086954,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(19086954,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -39,7 +39,7 @@ function c2095764.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c2095764.condition(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end end
function c2095764.filter(c,e,tp) function c2095764.filter(c,e,tp)
return c:IsSetCard(0x9e) and not c:IsCode(2095764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9e) and not c:IsCode(2095764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c2095764.target(e,tp,eg,ep,ev,re,r,rp,chk) function c2095764.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -27,14 +27,14 @@ end ...@@ -27,14 +27,14 @@ end
function c20960340.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20960340.target(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=Duel.GetLP(tp) local atk=Duel.GetLP(tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,20960340,0,TYPES_EFFECT_TRAP_MONSTER,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,20960340,0,TYPES_EFFECT_TRAP_MONSTER,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c20960340.activate(e,tp,eg,ep,ev,re,r,rp) function c20960340.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local atk=Duel.GetLP(tp) local atk=Duel.GetLP(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,20960340,0,TYPES_EFFECT_TRAP_MONSTER,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,20960340,0,TYPES_EFFECT_TRAP_MONSTER,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT,POS_FACEUP_ATTACK) then return end
c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT) c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT)
Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -11,7 +11,7 @@ function c21007444.initial_effect(c) ...@@ -11,7 +11,7 @@ function c21007444.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c21007444.filter(c,e,tp) function c21007444.filter(c,e,tp)
return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c21007444.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21007444.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c21007444.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c21007444.filter(chkc,e,tp) end
......
...@@ -24,8 +24,7 @@ function c21663205.initial_effect(c) ...@@ -24,8 +24,7 @@ function c21663205.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c21663205.filter(c,e,tp) function c21663205.filter(c,e,tp)
return c:IsLevel(4) and c:IsSetCard(0x2e) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(4) and c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c21663205.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21663205.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21663205.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21663205.filter(chkc,e,tp) end
...@@ -38,9 +37,6 @@ end ...@@ -38,9 +37,6 @@ end
function c21663205.spop(e,tp,eg,ep,ev,re,r,rp) function c21663205.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local spos=0 Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
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
end end
...@@ -50,7 +50,7 @@ function c21770260.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,7 @@ function c21770260.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c21770260.spop(e,tp,eg,ep,ev,re,r,rp) function c21770260.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,21770261,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_AQUA,ATTRIBUTE_WATER) then and Duel.IsPlayerCanSpecialSummonMonster(tp,21770261,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(tp,21770261) local token=Duel.CreateToken(tp,21770261)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
......
...@@ -38,7 +38,7 @@ function c22082163.initial_effect(c) ...@@ -38,7 +38,7 @@ function c22082163.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c22082163.filter(c,e,tp) function c22082163.filter(c,e,tp)
return c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c22082163.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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
......
...@@ -25,7 +25,7 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,TYPES_TOKEN_MONSTER,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,TYPES_TOKEN_MONSTER,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
...@@ -34,7 +34,7 @@ function c22404675.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c22404675.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then if not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,TYPES_TOKEN_MONSTER,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT) then and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,TYPES_TOKEN_MONSTER,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE) then
local token=Duel.CreateToken(tp,22404676) local token=Duel.CreateToken(tp,22404676)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
end end
......
...@@ -19,13 +19,13 @@ function c22953211.lcheck(g,lc) ...@@ -19,13 +19,13 @@ function c22953211.lcheck(g,lc)
end end
function c22953211.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c22953211.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22953212,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) end and Duel.IsPlayerCanSpecialSummonMonster(tp,22953212,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c22953211.tkop(e,tp,eg,ep,ev,re,r,rp) function c22953211.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22953212,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,22953212,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND,POS_FACEUP_DEFENSE) then return end
local token=Duel.CreateToken(tp,22953212) local token=Duel.CreateToken(tp,22953212)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
...@@ -79,7 +79,7 @@ function c23116808.tktg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -79,7 +79,7 @@ function c23116808.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c23116808.tkop(e,tp,eg,ep,ev,re,r,rp) function c23116808.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,23116809,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,23116809,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE) then return end
local token=Duel.CreateToken(tp,23116809) local token=Duel.CreateToken(tp,23116809)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
......
...@@ -37,7 +37,7 @@ function c23440062.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function c23440062.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
end end
function c23440062.filter(c,e,tp) function c23440062.filter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c23440062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23440062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23440062.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23440062.filter(chkc,e,tp) end
......
...@@ -18,7 +18,7 @@ end ...@@ -18,7 +18,7 @@ end
function c23639291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23639291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==eg:GetFirst() end if chkc then return chkc==eg:GetFirst() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false) and eg:GetFirst():IsCanBeEffectTarget(e) end and eg:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and eg:GetFirst():IsCanBeEffectTarget(e) end
Duel.SetTargetCard(eg:GetFirst()) Duel.SetTargetCard(eg:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg:GetFirst(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg:GetFirst(),1,0,0)
end end
......
...@@ -27,8 +27,7 @@ function c23912837.initial_effect(c) ...@@ -27,8 +27,7 @@ function c23912837.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c23912837.filter(c,e,tp) function c23912837.filter(c,e,tp)
return c:IsSetCard(0x9d) return c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c23912837.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23912837.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23912837.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23912837.filter(chkc,e,tp) end
...@@ -41,15 +40,9 @@ end ...@@ -41,15 +40,9 @@ end
function c23912837.operation(e,tp,eg,ep,ev,re,r,rp) function c23912837.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end
end end
function c23912837.cfilter(c) function c23912837.cfilter(c)
return c:IsSetCard(0x9d) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x9d) and c:IsAbleToRemoveAsCost()
......
...@@ -18,8 +18,7 @@ function c24096499.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,8 +18,7 @@ function c24096499.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c24096499.filter(c,e,tp) function c24096499.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_BEAST) and not c:IsCode(24096499) return c:IsLevelBelow(2) and c:IsRace(RACE_BEAST) and not c:IsCode(24096499) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c24096499.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24096499.filter(chkc,e,tp) end
...@@ -33,9 +32,6 @@ function c24096499.spop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,9 +32,6 @@ function c24096499.spop(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local spos=0 Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
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
end end
...@@ -24,8 +24,7 @@ function c24635329.initial_effect(c) ...@@ -24,8 +24,7 @@ function c24635329.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c24635329.filter(c,e,tp) function c24635329.filter(c,e,tp)
return c:IsSetCard(0x9d) return c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c24635329.target(e,tp,eg,ep,ev,re,r,rp,chk) function c24635329.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -37,15 +36,9 @@ function c24635329.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,15 +36,9 @@ function c24635329.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c24635329.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c24635329.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if not tc then return end if not tc then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end
end end
function c24635329.tgcon(e,tp,eg,ep,ev,re,r,rp) function c24635329.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
......
...@@ -54,8 +54,7 @@ function c25704359.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,8 +54,7 @@ function c25704359.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c25704359.cfilter,1,nil,tp) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) return eg:IsExists(c25704359.cfilter,1,nil,tp) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end end
function c25704359.spfilter(c,e,tp,att) function c25704359.spfilter(c,e,tp,att)
return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) and c:IsAttribute(att) return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -79,11 +78,7 @@ function c25704359.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,11 +78,7 @@ function c25704359.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c25704359.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) local g=Duel.SelectMatchingCard(tp,c25704359.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel())
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -31,7 +31,7 @@ function c25935625.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c25935625.condition(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end end
function c25935625.filter(c,e,tp) function c25935625.filter(c,e,tp)
return c:IsSetCard(0x9e) and not c:IsCode(25935625) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9e) and not c:IsCode(25935625) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c25935625.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25935625.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -17,7 +17,7 @@ function c26931058.filter2(c,ec) ...@@ -17,7 +17,7 @@ function c26931058.filter2(c,ec)
return c:IsFaceup() and ec:CheckUnionTarget(c) and aux.CheckUnionEquip(ec,c) return c:IsFaceup() and ec:CheckUnionTarget(c) and aux.CheckUnionEquip(ec,c)
end end
function c26931058.filter3(c,e,tp) function c26931058.filter3(c,e,tp)
return c:IsFaceup() and c:IsHasEffect(EFFECT_UNION_STATUS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsHasEffect(EFFECT_UNION_STATUS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c26931058.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26931058.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
......
...@@ -34,7 +34,7 @@ function c27551.initial_effect(c) ...@@ -34,7 +34,7 @@ function c27551.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c27551.filter(c,e,tp) function c27551.filter(c,e,tp)
return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c27551.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27551.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27551.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27551.filter(chkc,e,tp) end
......
...@@ -71,7 +71,7 @@ end ...@@ -71,7 +71,7 @@ end
function c27756115.cfilter(c,e,tp) function c27756115.cfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_DEFENSE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_DEFENSE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c27756115.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27756115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -19,7 +19,7 @@ function c28378427.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,7 +19,7 @@ function c28378427.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c28378427.filter(c,e,tp,dam) function c28378427.filter(c,e,tp,dam)
return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c28378427.target(e,tp,eg,ep,ev,re,r,rp,chk) function c28378427.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -19,7 +19,7 @@ function c28566710.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,7 +19,7 @@ function c28566710.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK)
end end
function c28566710.spfilter(c,e,tp) function c28566710.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c28566710.operation(e,tp,eg,ep,ev,re,r,rp) function c28566710.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
...@@ -77,7 +77,7 @@ function c29071332.eqlimit(e,c) ...@@ -77,7 +77,7 @@ function c29071332.eqlimit(e,c)
end end
function c29071332.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c29071332.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(29071332)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(29071332)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(29071332,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(29071332,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -16,7 +16,7 @@ function c29687169.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c29687169.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttacker():IsControler(1-tp)
end end
function c29687169.filter(c,e,tp) function c29687169.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c29687169.target(e,tp,eg,ep,ev,re,r,rp,chk) function c29687169.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -77,7 +77,7 @@ function c31768112.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c31768112.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c31768112.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c31768112.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(31768112)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(31768112)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(31768112,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(31768112,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -16,7 +16,7 @@ function c33866130.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c33866130.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c33866130.filter(c,e,tp) function c33866130.filter(c,e,tp)
return c:IsSetCard(0x2a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c33866130.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c33866130.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -23,12 +23,9 @@ function c34124316.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,12 +23,9 @@ function c34124316.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,5) Duel.ConfirmDecktop(tp,5)
local tc=g1:GetFirst() local tc=g1:GetFirst()
while tc do while tc do
local pos=0 if tc:IsLevelBelow(4) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then pos=pos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then pos=pos+POS_FACEDOWN_DEFENSE end
if tc:IsLevelBelow(4) and pos~=0 then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,pos) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
elseif tc:IsAbleToHand() then elseif tc:IsAbleToHand() then
hg:AddCard(tc) hg:AddCard(tc)
else gg:AddCard(tc) end else gg:AddCard(tc) end
...@@ -37,12 +34,9 @@ function c34124316.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,12 +34,9 @@ function c34124316.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(1-tp,5) Duel.ConfirmDecktop(1-tp,5)
tc=g2:GetFirst() tc=g2:GetFirst()
while tc do while tc do
local pos=0 if tc:IsLevelBelow(4) and tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) then
if tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP_ATTACK) then pos=pos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEDOWN_DEFENSE) then pos=pos+POS_FACEDOWN_DEFENSE end
if tc:IsLevelBelow(4) and pos~=0 then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,pos) Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
elseif tc:IsAbleToHand() then elseif tc:IsAbleToHand() then
hg:AddCard(tc) hg:AddCard(tc)
else gg:AddCard(tc) end else gg:AddCard(tc) end
......
...@@ -34,7 +34,7 @@ function c34620088.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c34620088.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c34620088.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c34620088.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end end
......
...@@ -39,7 +39,7 @@ function c35089369.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c35089369.condition(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end end
function c35089369.filter(c,e,tp) function c35089369.filter(c,e,tp)
return c:IsSetCard(0x9e) and not c:IsCode(35089369) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9e) and not c:IsCode(35089369) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c35089369.target(e,tp,eg,ep,ev,re,r,rp,chk) function c35089369.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -59,7 +59,7 @@ function c35268887.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,7 +59,7 @@ function c35268887.tokentg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=c35268887[tp] local ct=c35268887[tp]
if chk==0 then return ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) if chk==0 then return ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0)
end end
...@@ -67,7 +67,7 @@ function c35268887.tokenop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function c35268887.tokenop(e,tp,eg,ep,ev,re,r,rp)
local ct=c35268887[tp] local ct=c35268887[tp]
if (ct>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) if (ct>1 and Duel.IsPlayerAffectedByEffect(tp,59822133))
or Duel.GetLocationCount(tp,LOCATION_MZONE)<ct or Duel.GetLocationCount(tp,LOCATION_MZONE)<ct
or not Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then return end
for i=1,ct do for i=1,ct do
local token=Duel.CreateToken(tp,35268888) local token=Duel.CreateToken(tp,35268888)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -26,7 +26,7 @@ function c35539880.initial_effect(c) ...@@ -26,7 +26,7 @@ function c35539880.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c35539880.filter(c,e,tp) function c35539880.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c35539880.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35539880.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c35539880.filter(chkc,e,tp) end if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c35539880.filter(chkc,e,tp) end
......
...@@ -10,7 +10,7 @@ function c35848254.initial_effect(c) ...@@ -10,7 +10,7 @@ function c35848254.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c35848254.filter(c,e,tp) function c35848254.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c35848254.target(e,tp,eg,ep,ev,re,r,rp,chk) function c35848254.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -11,7 +11,7 @@ function c37132349.initial_effect(c) ...@@ -11,7 +11,7 @@ function c37132349.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c37132349.filter(c,e,tp) function c37132349.filter(c,e,tp)
return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c37132349.target(e,tp,eg,ep,ev,re,r,rp,chk) function c37132349.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -62,7 +62,7 @@ function c38053381.tkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c38053381.tkcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c38053381.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c38053381.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,38053382,0x134,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,38053382,0x134,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT,POS_FACEUP_ATTACK) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
...@@ -70,7 +70,7 @@ function c38053381.tktg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,7 +70,7 @@ function c38053381.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c38053381.tkop(e,tp,eg,ep,ev,re,r,rp) function c38053381.tkop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,38053382,0x134,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,38053382,0x134,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT,POS_FACEUP_ATTACK) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
local g=Group.CreateGroup() local g=Group.CreateGroup()
......
...@@ -38,7 +38,7 @@ function c3846170.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c3846170.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end end
function c3846170.filter(c,e,tp) function c3846170.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c3846170.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c3846170.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -41,7 +41,7 @@ function c3891471.initial_effect(c) ...@@ -41,7 +41,7 @@ function c3891471.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c3891471.filter(c,e,tp) function c3891471.filter(c,e,tp)
return c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c3891471.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3891471.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3891471.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3891471.filter(chkc,e,tp) end
......
...@@ -15,8 +15,7 @@ function c39432962.initial_effect(c) ...@@ -15,8 +15,7 @@ function c39432962.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c39432962.filter(c,e,tp) function c39432962.filter(c,e,tp)
return c:IsSetCard(0x82) and not c:IsCode(39432962) return c:IsSetCard(0x82) and not c:IsCode(39432962) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c39432962.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c39432962.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -29,11 +28,7 @@ function c39432962.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,11 +28,7 @@ function c39432962.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c39432962.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c39432962.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -49,7 +49,7 @@ function c39581190.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c39581190.spfilter(c,e,tp) 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_DEFENSE)) return c:IsSetCard(0xed) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
end end
function c39581190.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c39581190.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -62,13 +62,7 @@ function c39581190.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,13 +62,7 @@ function c39581190.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c39581190.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c39581190.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end
end end
...@@ -20,7 +20,7 @@ function c40703222.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c40703222.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,TYPES_TOKEN_MONSTER,300,200,1,RACE_FIEND,ATTRIBUTE_DARK) end if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,TYPES_TOKEN_MONSTER,300,200,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
...@@ -28,7 +28,7 @@ function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c40703222.activate(e,tp,eg,ep,ev,re,r,rp) function c40703222.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,TYPES_TOKEN_MONSTER,300,200,1,RACE_FIEND,ATTRIBUTE_DARK) then return end if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,TYPES_TOKEN_MONSTER,300,200,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
for i=1,ft do for i=1,ft do
local token=Duel.CreateToken(tp,40703223) local token=Duel.CreateToken(tp,40703223)
......
...@@ -27,14 +27,14 @@ end ...@@ -27,14 +27,14 @@ end
function c40844552.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40844552.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function c40844552.operation(e,tp,eg,ep,ev,re,r,rp) function c40844552.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then return end
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,40844553) local token=Duel.CreateToken(tp,40844553)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -21,8 +21,7 @@ function c42143067.cfilter(c,e,tp) ...@@ -21,8 +21,7 @@ function c42143067.cfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c42143067.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalAttribute(),c:GetOriginalLevel()) and Duel.IsExistingMatchingCard(c42143067.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalAttribute(),c:GetOriginalLevel())
end end
function c42143067.spfilter(c,e,tp,att,lv) function c42143067.spfilter(c,e,tp,att,lv)
return c:IsRace(RACE_ROCK) and c:GetOriginalAttribute()==att and c:GetOriginalLevel()==lv return c:IsRace(RACE_ROCK) and c:GetOriginalAttribute()==att and c:GetOriginalLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c42143067.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c42143067.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -44,11 +43,7 @@ function c42143067.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,11 +43,7 @@ function c42143067.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c42143067.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,gc:GetOriginalAttribute(),gc:GetOriginalLevel()) local g=Duel.SelectMatchingCard(tp,c42143067.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,gc:GetOriginalAttribute(),gc:GetOriginalLevel())
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -60,7 +60,7 @@ function c44311445.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +60,7 @@ function c44311445.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(44311445,RESET_CHAIN,0,1) c:RegisterFlagEffect(44311445,RESET_CHAIN,0,1)
end end
function c44311445.spfilter(c,e,tp) 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_DEFENSE)) return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
end end
function c44311445.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c44311445.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -73,11 +73,7 @@ function c44311445.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,11 +73,7 @@ function c44311445.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c44311445.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c44311445.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -43,7 +43,7 @@ function c46083111.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c46083111.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c46083111.filter1(c,e,tp) function c46083111.filter1(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(46083111) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x104) and not c:IsCode(46083111) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c46083111.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c46083111.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -40,14 +40,14 @@ end ...@@ -40,14 +40,14 @@ end
function c46173679.target(e,tp,eg,ep,ev,re,r,rp,chk) function c46173679.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,46173680,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,46173680,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function c46173679.activate(e,tp,eg,ep,ev,re,r,rp) function c46173679.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,46173680,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,46173680,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,46173679+i) local token=Duel.CreateToken(tp,46173679+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -77,7 +77,7 @@ function c47228077.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c47228077.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c47228077.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47228077.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(47228077)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(47228077)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(47228077,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(47228077,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -84,7 +84,7 @@ function c47415292.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c47415292.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c47415292.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47415292.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(47415292)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(47415292)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(47415292,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(47415292,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -24,13 +24,13 @@ function c47658964.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,13 +24,13 @@ function c47658964.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c47658964.target(e,tp,eg,ep,ev,re,r,rp,chk) function c47658964.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47658965,0x39,TYPES_TOKEN_MONSTER,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE) end and Duel.IsPlayerCanSpecialSummonMonster(tp,47658965,0x39,TYPES_TOKEN_MONSTER,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,e:GetLabel(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,e:GetLabel(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),0,0)
end end
function c47658964.activate(e,tp,eg,ep,ev,re,r,rp) function c47658964.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<e:GetLabel() or not Duel.IsPlayerCanSpecialSummonMonster(tp,47658965,0x39,TYPES_TOKEN_MONSTER,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE) if ft<e:GetLabel() or not Duel.IsPlayerCanSpecialSummonMonster(tp,47658965,0x39,TYPES_TOKEN_MONSTER,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE)
or (e:GetLabel()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end or (e:GetLabel()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
for i=1,e:GetLabel() do for i=1,e:GetLabel() do
local token=Duel.CreateToken(tp,47658965) local token=Duel.CreateToken(tp,47658965)
......
...@@ -93,7 +93,7 @@ function c47693640.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function c47693640.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c47693640.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47693640.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(47693640)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(47693640)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(47693640,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(47693640,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -44,7 +44,7 @@ function c48115277.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +44,7 @@ function c48115277.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if not ct then ct=0 end if not ct then ct=0 end
return (ct==0 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) return (ct==0 or not Duel.IsPlayerAffectedByEffect(tp,59822133))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>ct-1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>ct-1
and Duel.IsPlayerCanSpecialSummonMonster(tp,48115278,0,TYPES_TOKEN_MONSTER,1000,1500,4,RACE_ROCK,ATTRIBUTE_EARTH) and Duel.IsPlayerCanSpecialSummonMonster(tp,48115278,0,TYPES_TOKEN_MONSTER,1000,1500,4,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE)
end end
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct+1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct+1,0,0)
...@@ -54,7 +54,7 @@ function c48115277.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function c48115277.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
if ct>0 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if ct>0 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>ct if Duel.GetLocationCount(tp,LOCATION_MZONE)>ct
and Duel.IsPlayerCanSpecialSummonMonster(tp,48115278,0,TYPES_TOKEN_MONSTER,1000,1500,4,RACE_ROCK,ATTRIBUTE_EARTH) then and Duel.IsPlayerCanSpecialSummonMonster(tp,48115278,0,TYPES_TOKEN_MONSTER,1000,1500,4,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then
for i=1,ct+1 do for i=1,ct+1 do
local token=Duel.CreateToken(tp,48115278) local token=Duel.CreateToken(tp,48115278)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -18,7 +18,7 @@ end ...@@ -18,7 +18,7 @@ end
function c48411996.operation(e,tp,eg,ep,ev,re,r,rp) function c48411996.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,48411997,0x22,TYPES_TOKEN_MONSTER,0,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,48411997,0x22,TYPES_TOKEN_MONSTER,0,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE) then return end
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,48411997) local token=Duel.CreateToken(tp,48411997)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -77,7 +77,7 @@ function c48568432.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c48568432.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c48568432.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c48568432.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(48568432)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(48568432)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(48568432,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(48568432,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c49808196.tkop(e,tp,eg,ep,ev,re,r,rp) function c49808196.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,49808197,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,49808197,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then return end
for i=1,3 do for i=1,3 do
local token=Duel.CreateToken(tp,49808197) local token=Duel.CreateToken(tp,49808197)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -33,7 +33,7 @@ function c49966595.spcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function c49966595.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end end
function c49966595.spfilter1(c,e,tp) function c49966595.spfilter1(c,e,tp)
return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
......
...@@ -18,7 +18,7 @@ function c50164989.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c50164989.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c50164989.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c50164989.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c50164989.spop(e,tp,eg,ep,ev,re,r,rp) function c50164989.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,7 @@ function c50755.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,7 +14,7 @@ function c50755.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsRace(RACE_SPELLCASTER) return Duel.GetAttacker():IsRace(RACE_SPELLCASTER)
end end
function c50755.filter(c,e,tp) function c50755.filter(c,e,tp)
return c:IsAttackBelow(2000) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(2000) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c50755.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50755.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50755.filter,tp,LOCATION_DECK,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c50755.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
......
...@@ -23,8 +23,7 @@ function c50766506.cfilter(c,e,tp,ft) ...@@ -23,8 +23,7 @@ function c50766506.cfilter(c,e,tp,ft)
and Duel.IsExistingMatchingCard(c50766506.spfilter,tp,LOCATION_DECK,0,1,nil,lv,e,tp) and Duel.IsExistingMatchingCard(c50766506.spfilter,tp,LOCATION_DECK,0,1,nil,lv,e,tp)
end end
function c50766506.spfilter(c,lv,e,tp) function c50766506.spfilter(c,lv,e,tp)
return c:IsLevelBelow(lv) and c:IsSetCard(0x2b) and return c:IsLevelBelow(lv) and c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
(c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c50766506.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50766506.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
...@@ -49,10 +48,7 @@ function c50766506.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,10 +48,7 @@ function c50766506.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:SelectSubGroup(tp,c50766506.gselect,false,1,ft,slv) local tg=sg:SelectSubGroup(tp,c50766506.gselect,false,1,ft,slv)
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local spos=0 Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
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 if tc:IsFacedown() then cg:AddCard(tc) end
c:SetCardTarget(tc) c:SetCardTarget(tc)
end end
......
...@@ -24,8 +24,7 @@ function c51023024.initial_effect(c) ...@@ -24,8 +24,7 @@ function c51023024.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c51023024.filter(c,e,tp) function c51023024.filter(c,e,tp)
return c:IsSetCard(0x9d) and not c:IsCode(51023024) return c:IsSetCard(0x9d) and not c:IsCode(51023024) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c51023024.target(e,tp,eg,ep,ev,re,r,rp,chk) function c51023024.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -37,15 +36,9 @@ function c51023024.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,15 +36,9 @@ function c51023024.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c51023024.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c51023024.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if not tc then return end if not tc then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end
end end
function c51023024.spcon(e,tp,eg,ep,ev,re,r,rp) function c51023024.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
......
...@@ -24,7 +24,7 @@ function c51205763.initial_effect(c) ...@@ -24,7 +24,7 @@ function c51205763.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c51205763.filter(c,e,tp) function c51205763.filter(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(51205763) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) return c:IsSetCard(0x104) and not c:IsCode(51205763) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
end end
function c51205763.target(e,tp,eg,ep,ev,re,r,rp,chk) function c51205763.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -37,14 +37,9 @@ function c51205763.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,14 +37,9 @@ function c51205763.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c51205763.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c51205763.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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 and Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)~=0 then
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end
end end
function c51205763.spcon(e,tp,eg,ep,ev,re,r,rp) function c51205763.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -52,7 +47,7 @@ function c51205763.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +47,7 @@ function c51205763.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c51205763.filter1(c,e,tp) function c51205763.filter1(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(51205763) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x104) and not c:IsCode(51205763) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c51205763.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c51205763.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -32,14 +32,14 @@ function c51606429.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,14 +32,14 @@ function c51606429.target(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetLabel()==0 then return false end if e:GetLabel()==0 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,51606429,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,3,RACE_WARRIOR,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,51606429,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c51606429.activate(e,tp,eg,ep,ev,re,r,rp) function c51606429.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,51606429,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,3,RACE_WARRIOR,ATTRIBUTE_DARK) then if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,51606429,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then
c:AddMonsterAttribute(TYPE_NORMAL) c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end end
......
...@@ -24,7 +24,7 @@ function c52628687.cffilter(c) ...@@ -24,7 +24,7 @@ function c52628687.cffilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic() return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic()
end end
function c52628687.spfilter(c,e,tp) function c52628687.spfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c52628687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52628687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52628687.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52628687.spfilter(chkc,e,tp) end
......
...@@ -45,14 +45,14 @@ end ...@@ -45,14 +45,14 @@ end
function c53855409.ttg(e,tp,eg,ep,ev,re,r,rp,chk) function c53855409.ttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,53855410,0,TYPES_TOKEN_MONSTER,400,400,1,RACE_WARRIOR,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,53855410,0,TYPES_TOKEN_MONSTER,400,400,1,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function c53855409.top(e,tp,eg,ep,ev,re,r,rp) function c53855409.top(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,53855410,0,TYPES_TOKEN_MONSTER,400,400,1,RACE_WARRIOR,ATTRIBUTE_DARK) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,53855410,0,TYPES_TOKEN_MONSTER,400,400,1,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then return end
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,53855409+i) local token=Duel.CreateToken(tp,53855409+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -47,7 +47,7 @@ function c54297661.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function c54297661.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c54297661.filter(c,tp) function c54297661.filter(c,tp)
return c:IsFaceup() return c:IsFaceup()
and Duel.IsPlayerCanSpecialSummonMonster(tp,54297661,0,TYPES_EFFECT_TRAP_MONSTER,c:GetAttack(),c:GetDefense(),4,RACE_SPELLCASTER,ATTRIBUTE_DARK) and Duel.IsPlayerCanSpecialSummonMonster(tp,54297661,0,TYPES_EFFECT_TRAP_MONSTER,c:GetAttack(),c:GetDefense(),4,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEUP_ATTACK)
end end
function c54297661.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c54297661.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c54297661.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c54297661.filter(chkc,tp) end
...@@ -64,7 +64,7 @@ function c54297661.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c54297661.activate(e,tp,eg,ep,ev,re,r,rp)
local atk=tc:GetAttack() local atk=tc:GetAttack()
local def=tc:GetDefense() local def=tc:GetDefense()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,54297661,0,TYPES_EFFECT_TRAP_MONSTER,atk,def,4,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,54297661,0,TYPES_EFFECT_TRAP_MONSTER,atk,def,4,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK) then if Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -16,7 +16,7 @@ function c5438492.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c5438492.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c5438492.filter(c,e,tp) function c5438492.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c5438492.target(e,tp,eg,ep,ev,re,r,rp,chk) function c5438492.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -34,7 +34,7 @@ function c5592689.sscon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c5592689.sscon(e,tp,eg,ep,ev,re,r,rp)
end end
function c5592689.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c5592689.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c5592689.ssop(e,tp,eg,ep,ev,re,r,rp) function c5592689.ssop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,14 +18,14 @@ function c56051648.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,14 +18,14 @@ function c56051648.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chk==0 then return tg:IsOnField() and not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return tg:IsOnField() and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3
and Duel.IsPlayerCanSpecialSummonMonster(tp,56051649,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,56051649,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0)
end end
function c56051648.activate(e,tp,eg,ep,ev,re,r,rp) function c56051648.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsPlayerCanSpecialSummonMonster(tp,56051649,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH) then and Duel.IsPlayerCanSpecialSummonMonster(tp,56051649,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then
for i=1,3 do for i=1,3 do
local token=Duel.CreateToken(tp,56051649) local token=Duel.CreateToken(tp,56051649)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -31,7 +31,7 @@ function c564541.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c564541.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c564541.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c564541.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c564541.spop(e,tp,eg,ep,ev,re,r,rp) function c564541.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c56597272.operation(e,tp,eg,ep,ev,re,r,rp) function c56597272.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,56597273,0x18,TYPES_TOKEN_MONSTER,0,0,1,RACE_FAIRY,ATTRIBUTE_WATER) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,56597273,0x18,TYPES_TOKEN_MONSTER,0,0,1,RACE_FAIRY,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE) then return end
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,56597273) local token=Duel.CreateToken(tp,56597273)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -75,7 +75,7 @@ function c57062206.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c57062206.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c57062206.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c57062206.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(57062206)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(57062206)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(57062206,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(57062206,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -16,7 +16,7 @@ function c57839750.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c57839750.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c57839750.filter(c,e,tp) function c57839750.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WATER) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WATER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c57839750.target(e,tp,eg,ep,ev,re,r,rp,chk) function c57839750.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -25,8 +25,7 @@ function c58551308.flipop(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,8 +25,7 @@ function c58551308.flipop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c58551308.filter(c,e,tp) function c58551308.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c58551308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c58551308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
...@@ -45,18 +44,12 @@ function c58551308.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,18 +44,12 @@ function c58551308.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then
local sp=tc:GetControler() local sp=tc:GetControler()
local spos=0 Duel.SpecialSummonStep(tc,0,sp,sp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
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 end
tc=sg:GetNext() tc=sg:GetNext()
if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then
local sp=tc:GetControler() local sp=tc:GetControler()
local spos=0 Duel.SpecialSummonStep(tc,0,sp,sp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
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 end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -22,8 +22,7 @@ function c58911105.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,8 +22,7 @@ function c58911105.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(cg,REASON_COST) Duel.SendtoGrave(cg,REASON_COST)
end end
function c58911105.filter(c,e,tp) function c58911105.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x2b) and return c:IsLevelBelow(4) and c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
(c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c58911105.target(e,tp,eg,ep,ev,re,r,rp,chk) function c58911105.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -36,11 +35,7 @@ function c58911105.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,11 +35,7 @@ function c58911105.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c58911105.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c58911105.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
...@@ -80,7 +80,7 @@ function c59364406.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function c59364406.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c59364406.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c59364406.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(59364406)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(59364406)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(59364406,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(59364406,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -23,7 +23,7 @@ function c6021033.initial_effect(c) ...@@ -23,7 +23,7 @@ function c6021033.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c6021033.filter(c,e,tp) function c6021033.filter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c6021033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6021033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c6021033.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c6021033.filter(chkc,e,tp) end
......
...@@ -14,7 +14,7 @@ function c60534585.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,7 +14,7 @@ function c60534585.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end end
function c60534585.spfilter(c,e,tp) function c60534585.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c60534585.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60534585.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -39,14 +39,14 @@ end ...@@ -39,14 +39,14 @@ end
function c60764581.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60764581.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function c60764581.activate(e,tp,eg,ep,ev,re,r,rp) function c60764581.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,60764581+i) local token=Duel.CreateToken(tp,60764581+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -16,7 +16,7 @@ function c60806437.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c60806437.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c60806437.filter(c,e,tp) function c60806437.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c60806437.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60806437.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -28,7 +28,7 @@ function c61840587.initial_effect(c) ...@@ -28,7 +28,7 @@ function c61840587.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c61840587.filter(c,e,tp) function c61840587.filter(c,e,tp)
return c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c61840587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61840587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61840587.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61840587.filter(chkc,e,tp) end
...@@ -42,7 +42,7 @@ function c61840587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,7 +42,7 @@ function c61840587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabelObject(nil) e:SetLabelObject(nil)
end end
function c61840587.sfilter(c,e,tp) function c61840587.sfilter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c61840587.operation(e,tp,eg,ep,ev,re,r,rp) function c61840587.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -38,7 +38,7 @@ function c61962135.initial_effect(c) ...@@ -38,7 +38,7 @@ function c61962135.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c61962135.filter(c,e,tp) function c61962135.filter(c,e,tp)
return c:IsSetCard(0x38) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x38) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c61962135.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61962135.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61962135.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61962135.filter(chkc,e,tp) end
......
...@@ -22,13 +22,13 @@ function c62543393.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,13 +22,13 @@ function c62543393.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c62543393.target(e,tp,eg,ep,ev,re,r,rp,chk) function c62543393.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,62543394,0,TYPES_TOKEN_MONSTER,700,700,2,RACE_PLANT,ATTRIBUTE_WATER) end and Duel.IsPlayerCanSpecialSummonMonster(tp,62543394,0,TYPES_TOKEN_MONSTER,700,700,2,RACE_PLANT,ATTRIBUTE_WATER,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c62543393.operation(e,tp,eg,ep,ev,re,r,rp) function c62543393.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,62543394,0,TYPES_TOKEN_MONSTER,700,700,2,RACE_PLANT,ATTRIBUTE_WATER) then and Duel.IsPlayerCanSpecialSummonMonster(tp,62543394,0,TYPES_TOKEN_MONSTER,700,700,2,RACE_PLANT,ATTRIBUTE_WATER,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(tp,62543394) local token=Duel.CreateToken(tp,62543394)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
......
...@@ -27,7 +27,7 @@ function c62645025.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c62645025.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c62645025.target(e,tp,eg,ep,ev,re,r,rp,chk) function c62645025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,62645025,0x10db,TYPES_EFFECT_TRAP_MONSTER,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,62645025,0x10db,TYPES_EFFECT_TRAP_MONSTER,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c62645025.activate(e,tp,eg,ep,ev,re,r,rp) function c62645025.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -36,7 +36,7 @@ function c62645025.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c62645025.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,62645025,0x10db,TYPES_EFFECT_TRAP_MONSTER,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,62645025,0x10db,TYPES_EFFECT_TRAP_MONSTER,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then return end
c:AddMonsterAttribute(TYPE_EFFECT) c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)
end end
......
...@@ -12,7 +12,7 @@ function c63595262.initial_effect(c) ...@@ -12,7 +12,7 @@ function c63595262.initial_effect(c)
end end
function c63595262.filter(c,e,tp) function c63595262.filter(c,e,tp)
return c:IsFaceup() and c:IsLevelBelow(5) and c:IsRace(RACE_BEAST+RACE_WINDBEAST) return c:IsFaceup() and c:IsLevelBelow(5) and c:IsRace(RACE_BEAST+RACE_WINDBEAST)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c63595262.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c63595262.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c63595262.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c63595262.filter(chkc,e,tp) end
......
...@@ -83,7 +83,7 @@ function c63676256.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function c63676256.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c63676256.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c63676256.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(63676256)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(63676256)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(63676256,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(63676256,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -16,8 +16,7 @@ function c64749612.initial_effect(c) ...@@ -16,8 +16,7 @@ function c64749612.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c64749612.spfilter(c,e,tp) function c64749612.spfilter(c,e,tp)
return c:IsSetCard(0x2b) and c:IsLevelBelow(4) return c:IsSetCard(0x2b) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c64749612.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c64749612.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -39,11 +38,7 @@ function c64749612.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,11 +38,7 @@ function c64749612.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c64749612.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c64749612.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -25,8 +25,7 @@ function c65046521.initial_effect(c) ...@@ -25,8 +25,7 @@ function c65046521.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c65046521.filter(c,e,tp) function c65046521.filter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c65046521.target(e,tp,eg,ep,ev,re,r,rp,chk) function c65046521.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -39,11 +38,7 @@ function c65046521.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,11 +38,7 @@ function c65046521.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c65046521.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c65046521.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) 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
if tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
end end
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
...@@ -91,7 +91,7 @@ function c65685470.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function c65685470.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c65685470.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c65685470.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(65685470)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(65685470)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(65685470,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(65685470,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -15,7 +15,7 @@ function c67483216.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c67483216.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end end
function c67483216.filter(c,e,tp) function c67483216.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c67483216.target(e,tp,eg,ep,ev,re,r,rp,chk) function c67483216.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -40,8 +40,7 @@ function c67831115.initial_effect(c) ...@@ -40,8 +40,7 @@ function c67831115.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c67831115.spfilter(c,e,tp) function c67831115.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_INSECT) return c:IsLevelBelow(2) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c67831115.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c67831115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -54,16 +53,10 @@ function c67831115.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,16 +53,10 @@ function c67831115.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c67831115.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c67831115.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
end
end end
function c67831115.cfilter(c,tp) function c67831115.cfilter(c,tp)
local rc=c:GetReasonCard() local rc=c:GetReasonCard()
......
...@@ -28,7 +28,7 @@ function c68543408.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c68543408.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c68543408.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c68543408.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c68543408.spop(e,tp,eg,ep,ev,re,r,rp) function c68543408.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -25,8 +25,7 @@ function c68812773.initial_effect(c) ...@@ -25,8 +25,7 @@ function c68812773.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c68812773.filter(c,e,tp) function c68812773.filter(c,e,tp)
return c:IsCode(71071546) return c:IsCode(71071546) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c68812773.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68812773.filter(chkc,e,tp) end
...@@ -39,11 +38,7 @@ end ...@@ -39,11 +38,7 @@ end
function c68812773.spop(e,tp,eg,ep,ev,re,r,rp) function c68812773.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function c68815401.target(e,tp,eg,ep,ev,re,r,rp,chk) function c68815401.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c68815401.filter1,tp,LOCATION_SZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c68815401.filter1,tp,LOCATION_SZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,TYPES_TOKEN_MONSTER,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE) end and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,TYPES_TOKEN_MONSTER,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP_ATTACK) end
local dg1=Duel.GetMatchingGroup(c68815401.filter1,tp,LOCATION_SZONE,0,nil) local dg1=Duel.GetMatchingGroup(c68815401.filter1,tp,LOCATION_SZONE,0,nil)
local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
dg1:Merge(dg2) dg1:Merge(dg2)
...@@ -41,7 +41,7 @@ function c68815401.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c68815401.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(dg1,REASON_EFFECT)>0 then if Duel.Destroy(dg1,REASON_EFFECT)>0 then
local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.Destroy(dg2,REASON_EFFECT)>0 if Duel.Destroy(dg2,REASON_EFFECT)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,TYPES_TOKEN_MONSTER,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE) then and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,TYPES_TOKEN_MONSTER,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP_ATTACK) then
Duel.BreakEffect() Duel.BreakEffect()
local token=Duel.CreateToken(tp,68815402) local token=Duel.CreateToken(tp,68815402)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -37,7 +37,7 @@ function c69228245.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function c69228245.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chk==0 then return e:GetHandler():IsDestructable() if chk==0 then return e:GetHandler():IsDestructable()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end and tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
end end
......
...@@ -81,7 +81,7 @@ function c69456283.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c69456283.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c69456283.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c69456283.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(69456283)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(69456283)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(69456283,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(69456283,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -17,7 +17,7 @@ function c70089580.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c70089580.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c70089580.target(e,tp,eg,ep,ev,re,r,rp,chk) function c70089580.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c70089580.operation(e,tp,eg,ep,ev,re,r,rp) function c70089580.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function c70828912.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,7 @@ function c70828912.cost(e,tp,eg,ep,ev,re,r,rp,chk)
else Duel.PayLPCost(tp,800) end else Duel.PayLPCost(tp,800) end
end end
function c70828912.spfilter(c,e,tp) function c70828912.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c70828912.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c70828912.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c70828912.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c70828912.spfilter(chkc,e,tp) end
......
...@@ -27,7 +27,7 @@ function c71442223.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -27,7 +27,7 @@ function c71442223.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c71442223.spfilter2(c,e,tp,tc) function c71442223.spfilter2(c,e,tp,tc)
return c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c71442223.activate(e,tp,eg,ep,ev,re,r,rp) function c71442223.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -23,11 +23,11 @@ function c71453557.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,11 +23,11 @@ function c71453557.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c71453557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71453557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==1-tp if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==1-tp
and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) end and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false,POS_FACEUP_ATTACK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
......
...@@ -86,7 +86,7 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(token,SUMMON_VALUE_BLACK_GARDEN,tp,1-tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(token,SUMMON_VALUE_BLACK_GARDEN,tp,1-tp,false,false,POS_FACEUP_ATTACK)
end end
if bit.extract(ev,1-tp)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp)>0 if bit.extract(ev,1-tp)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,71645243,0,TYPES_TOKEN_MONSTER,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(1-tp,71645243,0,TYPES_TOKEN_MONSTER,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(1-tp,71645243) local token=Duel.CreateToken(1-tp,71645243)
Duel.SpecialSummonStep(token,SUMMON_VALUE_BLACK_GARDEN,1-tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(token,SUMMON_VALUE_BLACK_GARDEN,1-tp,tp,false,false,POS_FACEUP_ATTACK)
end end
......
...@@ -72,7 +72,7 @@ function c7369217.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function c7369217.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c7369217.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c7369217.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(7369217)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(7369217)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(7369217,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(7369217,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -40,14 +40,14 @@ end ...@@ -40,14 +40,14 @@ end
function c73915051.target(e,tp,eg,ep,ev,re,r,rp,chk) function c73915051.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>3
and Duel.IsPlayerCanSpecialSummonMonster(tp,73915052,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,73915052,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0)
end end
function c73915051.activate(e,tp,eg,ep,ev,re,r,rp) function c73915051.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>3 if Duel.GetLocationCount(tp,LOCATION_MZONE)>3
and Duel.IsPlayerCanSpecialSummonMonster(tp,73915052,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then and Duel.IsPlayerCanSpecialSummonMonster(tp,73915052,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then
for i=1,4 do for i=1,4 do
local token=Duel.CreateToken(tp,73915051+i) local token=Duel.CreateToken(tp,73915051+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -58,7 +58,7 @@ function c74762582.posfilter(c) ...@@ -58,7 +58,7 @@ function c74762582.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() return c:IsFaceup() and c:IsCanTurnSet()
end end
function c74762582.spfilter(c,e,tp) function c74762582.spfilter(c,e,tp)
return c:IsSetCard(0xed) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) return c:IsSetCard(0xed) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
end end
function c74762582.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74762582.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c74762582.posfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c74762582.posfilter(chkc) end
...@@ -78,14 +78,8 @@ function c74762582.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,14 +78,8 @@ function c74762582.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74762582.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74762582.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
end
end end
...@@ -22,7 +22,8 @@ end ...@@ -22,7 +22,8 @@ end
function c75622824.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75622824.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0) local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
if chk==0 then return ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) if chk==0 then return ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>ct-2 end and Duel.GetLocationCount(tp,LOCATION_MZONE)>ct-2
and Duel.IsPlayerCanSpecialSummonMonster(tp,75622825,0,TYPES_TOKEN_MONSTER,2000,1200,5,RACE_SPELLCASTER,ATTRIBUTE_WIND,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0)
end end
...@@ -32,7 +33,7 @@ function c75622824.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +33,7 @@ function c75622824.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0) local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
if ft<ct then return end if ft<ct then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,75622825,0,TYPES_TOKEN_MONSTER,2000,1200,5,RACE_SPELLCASTER,ATTRIBUTE_WIND) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,75622825,0,TYPES_TOKEN_MONSTER,2000,1200,5,RACE_SPELLCASTER,ATTRIBUTE_WIND,POS_FACEUP_DEFENSE) then return end
for i=1,ct do for i=1,ct do
local token=Duel.CreateToken(tp,75622825) local token=Duel.CreateToken(tp,75622825)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -26,7 +26,7 @@ function c75732622.spcon(e,c) ...@@ -26,7 +26,7 @@ function c75732622.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.IsPlayerCanSpecialSummonMonster(tp,75732623,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.IsPlayerCanSpecialSummonMonster(tp,75732623,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK)
end end
function c75732622.spop(e,tp,eg,ep,ev,re,r,rp,c) function c75732622.spop(e,tp,eg,ep,ev,re,r,rp,c)
for i=1,2 do for i=1,2 do
......
...@@ -16,7 +16,7 @@ function c7602840.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c7602840.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c7602840.filter(c,e,tp) function c7602840.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsRace(RACE_MACHINE) return c:IsAttackBelow(1500) and c:IsRace(RACE_MACHINE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c7602840.target(e,tp,eg,ep,ev,re,r,rp,chk) function c7602840.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -26,9 +26,7 @@ function c76442347.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,9 +26,7 @@ function c76442347.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(76442347)~=0 return e:GetHandler():GetFlagEffect(76442347)~=0
end end
function c76442347.filter(c,e,tp) function c76442347.filter(c,e,tp)
return c:IsSetCard(0x5a) and not c:IsCode(76442347) return c:IsSetCard(0x5a) and not c:IsCode(76442347) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c76442347.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76442347.filter(chkc,e,tp) end
...@@ -39,10 +37,7 @@ function c76442347.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,10 +37,7 @@ function c76442347.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c76442347.spop(e,tp,eg,ep,ev,re,r,rp) function c76442347.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if tc and tc:IsRelateToEffect(e) then
local spos=0 Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
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
end end
...@@ -40,7 +40,7 @@ function c7714344.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c7714344.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(7714344)>0 return e:GetHandler():GetFlagEffect(7714344)>0
end end
function c7714344.spfilter(c,e,tp) function c7714344.spfilter(c,e,tp)
return c:IsLevelBelow(3) and c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(3) and c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c7714344.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c7714344.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -17,13 +17,13 @@ function c78394032.tkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,13 +17,13 @@ function c78394032.tkcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c78394032.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78394032.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,78394033,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,78394033,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c78394032.tkop(e,tp,eg,ep,ev,re,r,rp) function c78394032.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,78394033,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH) then if Duel.IsPlayerCanSpecialSummonMonster(tp,78394033,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(tp,78394033) local token=Duel.CreateToken(tp,78394033)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
......
...@@ -35,7 +35,7 @@ function c78785392.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -35,7 +35,7 @@ function c78785392.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xe6) return not c:IsSetCard(0xe6)
end end
function c78785392.filter(c,e,tp) function c78785392.filter(c,e,tp)
return c:IsAttack(100) and c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttack(100) and c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c78785392.target(e,tp,eg,ep,ev,re,r,rp,chk) function c78785392.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
......
...@@ -16,7 +16,7 @@ function c79279397.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c79279397.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c79279397.filter(c,e,tp) function c79279397.filter(c,e,tp)
return c:IsCode(79279397) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(79279397) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c79279397.spop(e,tp,eg,ep,ev,re,r,rp) function c79279397.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -20,7 +20,7 @@ function c80280737.filter1(c,e,tp) ...@@ -20,7 +20,7 @@ function c80280737.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end end
function c80280737.filter2(c,e,tp,tcode) function c80280737.filter2(c,e,tp,tcode)
return c:IsSetCard(0x104f) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0x104f) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK)
end end
function c80280737.target(e,tp,eg,ep,ev,re,r,rp,chk) function c80280737.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -27,7 +27,7 @@ function c8057630.initial_effect(c) ...@@ -27,7 +27,7 @@ function c8057630.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c8057630.filter(c,e,tp) function c8057630.filter(c,e,tp)
return c:IsSetCard(0x1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c8057630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c8057630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8057630.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8057630.filter(chkc,e,tp) end
......
...@@ -16,7 +16,7 @@ function c81354330.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c81354330.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttacker():IsControler(1-tp)
end end
function c81354330.filter(c,e,tp) function c81354330.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c81354330.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81354330.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -32,7 +32,7 @@ function c82556058.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function c82556058.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c82556058.spop(e,tp,eg,ep,ev,re,r,rp) function c82556058.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,82556059,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,82556059,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then return end
local token=Duel.CreateToken(tp,82556059) local token=Duel.CreateToken(tp,82556059)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
......
...@@ -15,7 +15,7 @@ function c83011277.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c83011277.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c83011277.filter(c,e,tp) function c83011277.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c83011277.target(e,tp,eg,ep,ev,re,r,rp,chk) function c83011277.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -44,7 +44,7 @@ function c83293307.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c83293307.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c83293307.filter1(c,e,tp) function c83293307.filter1(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(83293307) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x104) and not c:IsCode(83293307) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c83293307.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c83293307.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -77,7 +77,7 @@ function c84313685.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c84313685.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c84313685.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c84313685.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(84313685)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(84313685)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(84313685,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(84313685,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -91,7 +91,7 @@ function c84814897.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function c84814897.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c84814897.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c84814897.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(84814897)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(84814897)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(84814897,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(84814897,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -15,7 +15,7 @@ function c84834865.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c84834865.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c84834865.filter(c,e,tp) function c84834865.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c84834865.target(e,tp,eg,ep,ev,re,r,rp,chk) function c84834865.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -80,7 +80,7 @@ function c85359414.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function c85359414.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c85359414.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c85359414.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(85359414)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(85359414)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(85359414,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(85359414,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -20,7 +20,7 @@ function c85431040.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c85431040.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end end
function c85431040.filter(c,e,tp) function c85431040.filter(c,e,tp)
return c:IsCode(85431040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(85431040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c85431040.operation(e,tp,eg,ep,ev,re,r,rp) function c85431040.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,300,REASON_EFFECT)==0 then return end if Duel.Damage(1-tp,300,REASON_EFFECT)==0 then return end
......
...@@ -79,7 +79,7 @@ function c87564935.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c87564935.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c87564935.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c87564935.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(87564935)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(87564935)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(87564935,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(87564935,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -80,7 +80,7 @@ function c87798440.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function c87798440.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function c87798440.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c87798440.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -42,7 +42,7 @@ function c88316955.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c88316955.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c88316955.filter1(c,e,tp) function c88316955.filter1(c,e,tp)
return c:IsSetCard(0x104) and not c:IsCode(88316955) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x104) and not c:IsCode(88316955) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c88316955.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c88316955.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -44,13 +44,13 @@ function c89907227.tkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,13 +44,13 @@ function c89907227.tkcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c89907227.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c89907227.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,89907228,0,TYPES_TOKEN_MONSTER,3300,3000,10,RACE_FISH,ATTRIBUTE_WATER) end and Duel.IsPlayerCanSpecialSummonMonster(tp,89907228,0,TYPES_TOKEN_MONSTER,3300,3000,10,RACE_FISH,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c89907227.tkop(e,tp,eg,ep,ev,re,r,rp) function c89907227.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,89907228,0,TYPES_TOKEN_MONSTER,3300,3000,10,RACE_FISH,ATTRIBUTE_WATER) then if Duel.IsPlayerCanSpecialSummonMonster(tp,89907228,0,TYPES_TOKEN_MONSTER,3300,3000,10,RACE_FISH,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE) then
local token=Duel.CreateToken(tp,89907228) local token=Duel.CreateToken(tp,89907228)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
......
...@@ -20,7 +20,7 @@ function c9074847.thfilter(c,tp) ...@@ -20,7 +20,7 @@ function c9074847.thfilter(c,tp)
return c:IsLocation(LOCATION_HAND) and c:IsControler(tp) return c:IsLocation(LOCATION_HAND) and c:IsControler(tp)
end end
function c9074847.spfilter(c,e,tp) function c9074847.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c9074847.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9074847.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -60,7 +60,7 @@ function c91512835.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +60,7 @@ function c91512835.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c91512835.spop(e,tp,eg,ep,ev,re,r,rp) function c91512835.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,91512836,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,91512836,0,TYPES_TOKEN_MONSTER,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then return end
local token=Duel.CreateToken(tp,91512836) local token=Duel.CreateToken(tp,91512836)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
...@@ -79,7 +79,7 @@ function c93108839.eqlimit(e,c) ...@@ -79,7 +79,7 @@ function c93108839.eqlimit(e,c)
end end
function c93108839.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c93108839.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(93108839)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(93108839)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(93108839,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(93108839,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -30,14 +30,14 @@ end ...@@ -30,14 +30,14 @@ end
function c93224848.target(e,tp,eg,ep,ev,re,r,rp,chk) function c93224848.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0)
end end
function c93224848.activate(e,tp,eg,ep,ev,re,r,rp) function c93224848.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>2 if Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then
for i=1,3 do for i=1,3 do
local token=Duel.CreateToken(tp,93224849) local token=Duel.CreateToken(tp,93224849)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -11,8 +11,7 @@ function c93775296.initial_effect(c) ...@@ -11,8 +11,7 @@ function c93775296.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c93775296.filter(c,e,tp) function c93775296.filter(c,e,tp)
return c:IsType(TYPE_FLIP) return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE,1-tp)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c93775296.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c93775296.filter(chkc,e,tp) end
...@@ -32,13 +31,5 @@ function c93775296.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,13 +31,5 @@ function c93775296.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
if g:GetCount()>ft or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if g:GetCount()>ft or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
local tc=g:GetFirst() Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_DEFENSE)
while tc do
local spos=0
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
Duel.SpecialSummonComplete()
end end
...@@ -61,7 +61,7 @@ function c94365540.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,7 +61,7 @@ function c94365540.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c94365540.spfilter(c,e,tp) function c94365540.spfilter(c,e,tp)
return c:IsSetCard(0x10b) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) return c:IsSetCard(0x10b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
end end
function c94365540.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c94365540.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
...@@ -74,11 +74,7 @@ function c94365540.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,11 +74,7 @@ function c94365540.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c94365540.spfilter),tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c94365540.spfilter),tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -20,7 +20,7 @@ function c95178994.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c95178994.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function c95178994.filter(c,e,tp) function c95178994.filter(c,e,tp)
return c:IsCode(95178994) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(95178994) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c95178994.operation(e,tp,eg,ep,ev,re,r,rp) function c95178994.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -16,7 +16,7 @@ function c95956346.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c95956346.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c95956346.filter(c,e,tp) function c95956346.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c95956346.target(e,tp,eg,ep,ev,re,r,rp,chk) function c95956346.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -22,7 +22,7 @@ function c9622164.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,7 @@ function c9622164.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c9622164.filter(c,e,tp) function c9622164.filter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c9622164.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9622164.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c9622164.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c9622164.filter(chkc,e,tp) end
......
...@@ -24,7 +24,7 @@ function c96782886.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +24,7 @@ function c96782886.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
function c96782886.filter(c,e,tp) function c96782886.filter(c,e,tp)
return c:IsRace(RACE_PSYCHO) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_PSYCHO) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c96782886.target(e,tp,eg,ep,ev,re,r,rp,chk) function c96782886.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96782886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c96782886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
...@@ -16,7 +16,7 @@ function c97017120.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c97017120.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c97017120.filter(c,e,tp) function c97017120.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c97017120.target(e,tp,eg,ep,ev,re,r,rp,chk) function c97017120.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -33,7 +33,7 @@ function c97077563.initial_effect(c) ...@@ -33,7 +33,7 @@ function c97077563.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c97077563.filter(c,e,tp) function c97077563.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c97077563.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97077563.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp
......
...@@ -24,8 +24,7 @@ function c97518132.initial_effect(c) ...@@ -24,8 +24,7 @@ function c97518132.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c97518132.filter(c,e,tp) function c97518132.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x9d) return c:IsFaceup() and c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function c97518132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97518132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c97518132.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c97518132.filter(chkc,e,tp) end
...@@ -38,15 +37,9 @@ end ...@@ -38,15 +37,9 @@ end
function c97518132.operation(e,tp,eg,ep,ev,re,r,rp) function c97518132.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local spos=0 if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then
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) Duel.ConfirmCards(1-tp,tc)
end end
end
end end
function c97518132.rmcon(e,tp,eg,ep,ev,re,r,rp) function c97518132.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
......
...@@ -35,7 +35,7 @@ function c97617181.initial_effect(c) ...@@ -35,7 +35,7 @@ function c97617181.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c97617181.spfilter(c,e,tp) function c97617181.spfilter(c,e,tp)
return c:IsSetCard(0x55,0x7b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x55,0x7b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c97617181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97617181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97617181.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97617181.spfilter(chkc,e,tp) end
......
...@@ -26,7 +26,7 @@ function c98273947.initial_effect(c) ...@@ -26,7 +26,7 @@ function c98273947.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c98273947.filter(c,e,tp) function c98273947.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end end
function c98273947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98273947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c98273947.filter(chkc,e,tp) end if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c98273947.filter(chkc,e,tp) end
......
...@@ -24,15 +24,15 @@ function c99330325.initial_effect(c) ...@@ -24,15 +24,15 @@ function c99330325.initial_effect(c)
end end
function c99330325.chkfilter1(c,e,tp) function c99330325.chkfilter1(c,e,tp)
return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and
not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,tp,c) not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP_ATTACK,tp,c)
and Duel.IsExistingMatchingCard(c99330325.chkfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c99330325.chkfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end end
function c99330325.chkfilter2(c,e,tp,cd) function c99330325.chkfilter2(c,e,tp,cd)
return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and not c:IsCode(cd) return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and not c:IsCode(cd)
and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,1-tp,c) and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP_ATTACK,1-tp,c)
end end
function c99330325.filter1(c,e,tp) function c99330325.filter1(c,e,tp)
return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
and Duel.IsExistingMatchingCard(c99330325.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c99330325.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end end
function c99330325.filter2(c,e,tp,cd) function c99330325.filter2(c,e,tp,cd)
......
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