Commit 4af8423b authored by Nemo Ma's avatar Nemo Ma

fix

parent b60fe110
No preview for this file type
......@@ -65,8 +65,8 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
......
......@@ -137,7 +137,6 @@ function cm.op4(e,tp,eg,ep,ev,re,r,rp)
local tc=tg:GetFirst()
if tc then
local mg=m:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(dg)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
......
......@@ -39,19 +39,35 @@ function c67200279.activate(e,tp,eg,ep,ev,re,r,rp)
end
--
function c67200279.drconfil(c)
return c:IsSetCard(0x674) and c:IsPreviousLocation(LOCATION_ONFIELD)
return c:IsSetCard(0x674) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_PENDULUM)
--or c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_FUSION) or c:IsType(TYPE_XYZ) or c:IsType(TYPE_LINK))
end
function c67200279.drcon(e,tp,eg,ep,ev,re,r,rp)
local eeg=eg:Filter(c67200279.drconfil,nil)
return eeg:GetCount()>0 and eeg:FilterCount(Card.IsAbleToDeck,nil)==eeg:GetCount()
return eeg:GetCount()>0 and eeg:FilterCount(Card.IsAbleToHand,nil)==eeg:GetCount()
end
function c67200279.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local eeg=eg:Filter(c67200279.drconfil,nil)
if chk==0 then return eeg:IsExists(Card.IsAbleToHand,1,nil) end
local eeeg=eeg:GetFirst()
while eeeg do
if eeeg:IsType(TYPE_TOKEN) or eeeg:IsType(TYPE_FUSION) or eeeg:IsType(TYPE_SYNCHRO) or eeeg:IsType(TYPE_XYZ) or eeeg:IsType(TYPE_LINK) then
Group.RemoveCard(eeg,eeeg)
end
eeeg=eeg:GetNext()
end
if chk==0 then return eeg:IsExists(Card.IsAbleToHand,1,nil) and eeg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eeg,eeg:GetCount(),0,0)
end
function c67200279.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local eeg=eg:Filter(c67200279.drconfil,nil)
local eeeg=eeg:GetFirst()
while eeeg do
if eeeg:IsType(TYPE_TOKEN) or eeeg:IsType(TYPE_FUSION) or eeeg:IsType(TYPE_SYNCHRO) or eeeg:IsType(TYPE_XYZ) or eeeg:IsType(TYPE_LINK) then
Group.RemoveCard(eeg,eeeg)
end
eeeg=eeg:GetNext()
end
if eeg:GetCount()<1 then return end
Duel.SendtoHand(eeg,nil,REASON_EFFECT)
end
......@@ -45,7 +45,8 @@ end
function c9910407.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910407.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(9910407,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -46,7 +46,8 @@ end
function c9910415.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910415.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)>0
and Duel.SelectYesNo(tp,aux.Stringid(9910415,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -49,7 +49,8 @@ end
function c9910420.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910420.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.SelectYesNo(tp,aux.Stringid(9910420,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
......
......@@ -55,7 +55,7 @@ end
function c9910900.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_MATERIAL+REASON_FUSION)
return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_FUSION)
end
function c9910900.spfilter(c,e,tp,race)
return aux.IsCodeListed(c,9910871) and not c:IsRace(race) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
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