Commit c7eb33c2 authored by mercury233's avatar mercury233

fix

parent 727af7b1
......@@ -31,6 +31,7 @@ function c100310001.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100310101)
e3:SetCondition(c100310001.spcon)
e3:SetTarget(c100310001.sptg)
e3:SetOperation(c100310001.spop)
c:RegisterEffect(e3)
......@@ -68,7 +69,7 @@ function c100310001.sfilter(c,tp)
return not c:IsCode(100310001) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_EARTH)~=0
and bit.band(c:GetPreviousRaceOnField(),RACE_MACHINE)~=0
and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c100310001.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100310001.sfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
......
......@@ -50,20 +50,21 @@ end
function c100414001.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 and g:FilterCount(c100414001.spfilter,nil,e,tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(100414001,2)) then
local ct=g:GetCount()
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c100414001.spfilter,nil,e,tp)>0
and Duel.SelectYesNo(tp,aux.Stringid(100414001,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,c100414001.spfilter,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local ct=g:GetCount()-sg:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
ct=g:GetCount()-sg:GetCount()
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
......@@ -50,20 +50,21 @@ end
function c100414002.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 and g:FilterCount(c100414002.spfilter,nil,e,tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(100414002,2)) then
local ct=g:GetCount()
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c100414002.spfilter,nil,e,tp)>0
and Duel.SelectYesNo(tp,aux.Stringid(100414002,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,c100414002.spfilter,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local ct=g:GetCount()-sg:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
ct=g:GetCount()-sg:GetCount()
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
......@@ -47,20 +47,21 @@ end
function c100414003.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 and g:FilterCount(c100414003.spfilter,nil,e,tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(100414003,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local ct=g:GetCount()
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c100414003.spfilter,nil,e,tp)>0
and Duel.SelectYesNo(tp,aux.Stringid(100414003,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,c100414003.spfilter,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local ct=g:GetCount()-sg:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
ct=g:GetCount()-sg:GetCount()
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
......@@ -41,19 +41,20 @@ function c100414007.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 and g:FilterCount(c100414007.thfilter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(100414007,2)) then
local ct=g:GetCount()
if ct>0 and g:FilterCount(c100414007.thfilter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(100414007,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c100414007.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local ct=g:GetCount()-sg:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
ct=g:GetCount()-sg:GetCount()
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
......
......@@ -40,20 +40,21 @@ end
function c100414008.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 and g:FilterCount(c100414008.spfilter,nil,e,tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(100414008,2)) then
local ct=g:GetCount()
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c100414008.spfilter,nil,e,tp)>0
and Duel.SelectYesNo(tp,aux.Stringid(100414008,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,c100414008.spfilter,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local ct=g:GetCount()-sg:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
ct=g:GetCount()-sg:GetCount()
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
......
......@@ -84,9 +84,9 @@ function c101011086.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101011086.eqfilter(chkc) end
if chk==0 then return c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101011085.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingTarget(c101011086.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101011085.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c101011086.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
......
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