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