Commit d578b18d authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Morphtronic Celfon and so on (#1891)

* fix

* fix
parent 893b867a
......@@ -18,9 +18,10 @@ function c30531525.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30531525.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3
and Duel.IsExistingMatchingCard(c30531525.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummon(tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,63060238)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
function c30531525.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,4)
......@@ -29,7 +30,7 @@ function c30531525.activate(e,tp,eg,ep,ev,re,r,rp)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if g:GetCount()>0 then
if ft<=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_RULE)
elseif ft>=g:GetCount() then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
......@@ -37,7 +38,7 @@ function c30531525.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_RULE)
end
end
Duel.ShuffleDeck(tp)
......
......@@ -10,7 +10,10 @@ function c31000575.initial_effect(c)
c:RegisterEffect(e1)
end
function c31000575.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 end
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,63060238)
and not Duel.IsPlayerAffectedByEffect(tp,97148796) end
end
function c31000575.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(1-tp,1)
......
......@@ -26,8 +26,10 @@ function c66171432.filter(c,e,tp)
end
function c66171432.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanRemove(tp)
and Duel.IsPlayerCanSpecialSummon(tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c66171432.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and not Duel.IsPlayerAffectedByEffect(tp,63060238)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function c66171432.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -14,6 +14,7 @@ end
function c74879881.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummon(tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,63060238)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c74879881.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -29,12 +29,11 @@ end
function c93542102.cond(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefensePos()
end
function c93542102.cfilter(c)
return c:IsLevelBelow(4) and c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER)
end
function c93542102.tga(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.IsExistingMatchingCard(c93542102.cfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsPlayerCanSpecialSummon(tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,63060238)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c93542102.tgd(e,tp,eg,ep,ev,re,r,rp,chk)
......
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