Commit d2e80698 authored by POLYMER's avatar POLYMER

fix

parent 2b81782a
......@@ -48,7 +48,6 @@ end
function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end
for i=1,Duel.GetCurrentChain() do
local te,tep,loc,pos=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
......@@ -94,6 +93,11 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if chk==0 then
if Duel.GetFlagEffect(tp,m)==0 then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5))
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND end
......
......@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
local ctype=bit.band(g:GetFirst():GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
local dg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,ctype,tgc)
local dg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,ctype,g:GetFirst())
Duel.HintSelection(g)
local tc=dg:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
......
......@@ -27,8 +27,7 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY))
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c)
......@@ -38,13 +37,15 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end
cm_copy = false
local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end
if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
......@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.ClearOperationInfo(0)
end
end
function cm.filter(c)
......
......@@ -27,25 +27,26 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY))
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false
local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end
if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true
......@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.ClearOperationInfo(0)
end
end
function cm.filter(c)
......
......@@ -27,25 +27,26 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY))
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false
local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end
if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true
......@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.ClearOperationInfo(0)
end
end
function cm.filter(c,e,tp)
......
......@@ -38,25 +38,26 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY))
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false
local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end
if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true
......@@ -66,7 +67,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.ClearOperationInfo(0)
end
end
function cm.filter(c)
......
......@@ -98,12 +98,12 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.spfilter(c,e,tp,ctype)
return c:IsType(ctype) and c:IsCanBeSpecialSummoned(e,nil,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and cm.MagicCombineDemon(c)
function cm.spfilter(c,e,tp,ctype,tgc)
return c:IsType(ctype) and c:IsCanBeSpecialSummoned(e,nil,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,tgc,c)>0 and cm.MagicCombineDemon(c)
end
function cm.tgfilter(c,e,tp)
local ctype=bit.band(c:GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
return c:IsFaceup() and ctype~=0 and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,ctype)
return c:IsFaceup() and ctype~=0 and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,ctype,c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
......@@ -115,7 +115,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
local ctype=bit.band(g:GetFirst():GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
local dg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,ctype)
local dg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,ctype,g:GetFirst())
Duel.HintSelection(g)
local tc=dg:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
......
......@@ -30,17 +30,19 @@ function cm.cfilterz(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false
local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end
if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true
......@@ -50,7 +52,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.ClearOperationInfo(0)
end
end
function cm.filter(c)
......@@ -73,6 +75,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
if cm_copy then
cm_copy = false
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
......@@ -80,6 +91,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
end
if cm_copy then
cm_copy = false
local te=e:GetLabelObject()
......@@ -89,6 +101,5 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
end
end
end
\ No newline at end of file
......@@ -2,13 +2,13 @@
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedureLevelFree(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),nil,2,2,s.ovfilter,aux.Stringid(id,0),s.xyzop)
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,2,2,s.ovfilter,aux.Stringid(id,0),s.xyzop)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--pzone specialsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -21,7 +21,8 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,4))
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
......@@ -32,7 +33,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--pendulum move
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5))
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
......@@ -43,6 +44,9 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
s.pendulum_level=7
function s.mfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsXyzLevel(7)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
end
......@@ -73,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Group.FromCards(c)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.BreakEffect()
......@@ -100,8 +104,10 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
if g:GetCount()>0 and Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) and c:IsOnField() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local rg=c:GetColumnGroup()
rg:AddCard(c)
Duel.Remove(rg:Select(tp,1,1,nil),POS_FACEUP,REASON_EFFECT)
end
end
function s.filter(c)
......
......@@ -57,7 +57,6 @@ function c71400001.filter(c)
end
end
--global part
table=require("table")
function yume.AddYumeSummonLimit(c,ssm)
--1=special summon monster, 0=non special summon monster
ssm=ssm or 0
......
--刚炼装勇士·银金后宫王
function c79029517.initial_effect(c)
function c79029517.initial_effect(c)
--extra material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029517,0))
......@@ -63,7 +63,7 @@ function c79029517.initial_effect(c)
c:RegisterEffect(e6)
end
function c79029517.sprfilter(c,tp,g,sc)
return c:IsType(TYPE_PENDULUM)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c79029517.linkcon(e,c)
return Duel.IsExistingMatchingCard(c79029517.sprfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,4,nil)
......
......@@ -20,7 +20,7 @@ function c79029557.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19029557)
e2:SetCost(c79029557.ttcost)
......@@ -77,35 +77,35 @@ end
function c79029557.ttop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c79029557.ttfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),Duel.GetTurnCount())
if g:GetCount()>0 then
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,99,nil)
local tc=sg:GetFirst()
while tc do
local loc=tc:GetPreviousLocation()
local p=tc:GetPreviousControler()
if bit.band(loc,LOCATION_HAND)~=0 then
Duel.SendtoHand(tc,p,REASON_EFFECT+REASON_RULE)
Duel.SendtoHand(tc,p,REASON_EFFECT+REASON_RULE)
elseif bit.band(loc,LOCATION_DECK)~=0 then
Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE)
Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE)
elseif bit.band(loc,LOCATION_EXTRA)~=0 then
if tc:IsPreviousPosition(POS_FACEUP) then
Duel.SendtoExtraP(tc,p,REASON_EFFECT+REASON_RULE)
else
Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE)
end
if tc:IsPreviousPosition(POS_FACEUP) then
Duel.SendtoExtraP(tc,p,REASON_EFFECT+REASON_RULE)
else
Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE)
end
elseif bit.band(loc,LOCATION_GRAVE)~=0 then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RULE)
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RULE)
elseif bit.band(loc,LOCATION_REMOVED)~=0 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_RULE)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_RULE)
else
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT+REASON_RULE)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT+REASON_RULE)
end
tc=sg:GetNext()
end
if Duel.IsExistingMatchingCard(Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,nil,c) and Duel.SelectYesNo(tp,aux.Stringid(79029557,1)) then
local bc=Duel.SelectMatchingCard(tp,Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,1,nil,c):GetFirst()
Duel.CalculateDamage(c,bc)
end
Duel.BreakEffect()
local bc=Duel.SelectMatchingCard(tp,Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,1,nil,c):GetFirst()
Duel.CalculateDamage(c,bc)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
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