Commit dd004a7e authored by nanahira's avatar nanahira

kaguya

parent cdb1f358
No preview for this file type
local m=77765004
local cm=_G["c"..m]
Duel.LoadScript("c77765000.lua")
--cm.Senya_name_with_difficulty=1
function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
for _,code in ipairs({EFFECT_CANNOT_BE_XYZ_MATERIAL,EFFECT_CANNOT_BE_SYNCHRO_MATERIAL,EFFECT_CANNOT_BE_FUSION_MATERIAL,EFFECT_CANNOT_BE_LINK_MATERIAL}) do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(code)
e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e2:SetTargetRange(0xff,0xff)
e2:SetTarget(function(e,c)
return c:GetSequence()>4 or not c:IsLocation(LOCATION_MZONE)
end)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(function(e,c)
return c:IsControler(1-e:GetHandlerPlayer())
end)
c:RegisterEffect(e2)
end
local function KaguyaFilter(c,e,tp,cc)
local p=c:GetControler()
local tc=Senya.GetDFCBackSideCard(cc)
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
end
local function DifficultyFilter(c,e,tp)
return Kaguya.IsDifficulty(c) and Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(0x14000+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local dg=Duel.SelectMatchingCard(tp,DifficultyFilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local cc=dg:GetFirst()
if cc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,cc)
local tc=g:GetFirst()
local p=tc:GetControler()
Duel.MoveToField(cc,tp,p,LOCATION_SZONE,POS_FACEUP,false)
Senya.TransformDFCCard(cc)
Duel.Equip(p,cc,tc)
Duel.RaiseEvent(cc,EVENT_CUSTOM+77765000,re,r,rp,ep,ev)
end
end)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsCode(m-1) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_GRAVE)
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
cm[e:GetHandler()]=e1
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(c,REASON_RULE)
c:ResetFlagEffect(1082946)
end
end
local m=77765005
local cm=_G["c"..m]
Duel.LoadScript("c77765000.lua")
cm.Senya_name_with_difficulty=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_DRAW)
e1:SetCountLimit(1,m)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
local function f(c,tp)
return c:IsFaceup() and Kaguya.IsDifficulty(c) and c:IsAbleToChangeControler() and Duel.GetLocationCount(1-c:GetControler(),LOCATION_SZONE,tp)>0
end
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_SZONE) and f(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(f,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.SelectTarget(tp,f,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,c)
e:SetLabel(g:GetFirst():GetControler())
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local p=e:GetLabel()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(p) and not tc:IsImmuneToEffect(e) and Duel.GetLocationCount(1-p,LOCATION_SZONE,tp)>0 then
Duel.MoveToField(tc,tp,1-p,LOCATION_SZONE,POS_FACEUP,true)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetCountLimit(1,m+100)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DRAW)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or ft<=0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local tg=g:Filter(Kaguya.IsDifficulty,nil)
if ft<#tg then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
tg=tg:Select(tp,ft,ft,nil)
end
for tc in aux.Next(tg) do
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
if not tc:IsType(TYPE_CONTINUOUS+TYPE_FIELD+TYPE_EQUIP) then
tc:CancelToGrave()
end
end
end)
c:RegisterEffect(e2)
end
local m=77765006
local cm=_G["c"..m]
Duel.LoadScript("c77765000.lua")
cm.Senya_name_with_difficulty=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22842126,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return Kaguya.IsDifficulty(c)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,3,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local tg=sg:Select(1-tp,1,1,nil)
local tc=tg:GetFirst()
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
if tc and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if Kaguya.IsDifficulty(tc) and Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0 then
Duel.BreakEffect()
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
if not tc:IsType(TYPE_CONTINUOUS+TYPE_FIELD+TYPE_EQUIP) then
tc:CancelToGrave()
end
end
Duel.ShuffleHand(tp)
end
end
local m=77765007
local cm=_G["c"..m]
Duel.LoadScript("c77765000.lua")
cm.Senya_name_with_difficulty=1
function cm.initial_effect(c)
local function f1(c)
return Senya.check_set(c,"difficulty",1) and c:IsAbleToHand()
end
local function KaguyaFilter(c,e,tp,cc)
local p=c:GetControler()
local tc=Senya.GetDFCBackSideCard(cc)
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c) and (cc:IsControler(c:GetControler()) or c:IsAbleToChangeControler())
end
local function DifficultyFilter(c,e,tp)
return Kaguya.IsDifficulty(c) and c:IsFaceup() and Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
end
local target_list={
function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(f1,tp,LOCATION_DECK,0,1,nil) end
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end,
function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(DifficultyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp) end
e:SetCategory(0)
end,
function(e,tp,eg,ep,ev,re,r,rp,chk)
local function generate(p)
local afilter={}
local first=true
for code,effect_list in pairs(cm[p]) do
table.insert(afilter,code)
table.insert(afilter,OPCODE_ISCODE)
if first then
first=false
else
table.insert(afilter,OPCODE_OR)
end
end
return afilter
end
if chk==0 then return #generate(1-tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
cm.announce_filter=generate(1-tp)
local ac=Duel.AnnounceCardFilter(tp,table.unpack(cm.announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER)
end,
}
local operation_list={
function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,f1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end,
function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local dg=Duel.SelectMatchingCard(tp,DifficultyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
local cc=dg:GetFirst()
if cc then
Duel.HintSelection(dg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,cc)
local tc=g:GetFirst()
local p=tc:GetControler()
if not cc:IsControler(p) then
Duel.MoveToField(cc,tp,p,LOCATION_SZONE,POS_FACEUP,false)
end
Senya.TransformDFCCard(cc)
Duel.Equip(p,cc,tc)
Duel.RaiseEvent(cc,EVENT_CUSTOM+77765000,re,r,rp,ep,ev)
end
end,
function(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if cm[1-tp][ac] then
for _,te in ipairs(cm[1-tp][ac]) do
te:Reset()
end
cm[1-tp][ac]=nil
end
end,
}
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(function(c)
return Kaguya.IsDifficulty(c) and c:IsFaceup()
end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end)
e1:SetTarget(Senya.multi_choice_target(m,table.unpack(target_list)))
e1:SetOperation(Senya.multi_choice_operation(table.unpack(operation_list)))
c:RegisterEffect(e1)
local function ReplaceCleanup()
for _,ftype in ipairs({"oldcf","olddf"}) do
if cm[ftype] then
--Debug.Message(ftype)
(ftype=="olddf" and Duel or Card).RegisterEffect=cm[ftype]
cm[ftype]=nil
end
end
end
if not cm.gchk then
cm.gchk=true
cm[0]={}
cm[1]={}
cm.oldcf=nil
cm.olddf=nil
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
--Debug.Message(1)
ReplaceCleanup()
cm.oldcf=Card.RegisterEffect
cm.olddf=Duel.RegisterEffect
local code=re:GetHandler():GetOriginalCode()
Card.RegisterEffect=cm.ReplacedRegisterEffect(ep,code,cm.oldcf)Duel.RegisterEffect=cm.ReplacedRegisterEffect(ep,code,cm.olddf)
end)
Duel.RegisterEffect(ge1,0)
for _,code in ipairs({EVENT_CHAIN_SOLVED,EVENT_CHAIN_NEGATED,EVENT_CHAIN_END}) do
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(code)
ge1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return cm.oldcf or cm.olddf
end)
ge1:SetOperation(ReplaceCleanup)
Duel.RegisterEffect(e1,0)
end
end
end
function cm.PushNewEffect(p,code,e)
if not cm[p][code] then
cm[p][code]={}
end
--Debug.Message(code)
table.insert(cm[p][code],e)
end
function cm.ReplacedRegisterEffect(p,code,oldf)
local effect_index=(oldf==Duel.RegisterEffect and 1 or 2)
return function(...)
--Debug.Message(2)
local e=select(effect_index,...)
for _,method in ipairs({"Target","Operation","Cost","Value"}) do
local func=Effect["Get"..method](e)
if func and aux.GetValueType(func)=="function" then
Effect["Set"..method](e,cm.ReplacedFunction(p,code,func))
end
end
cm.PushNewEffect(p,code,e)
return oldf(...)
end
end
function cm.ReplacedFunction(p,code,f)
return function(...)
local oldcf=Card.RegisterEffect
local olddf=Duel.RegisterEffect
Card.RegisterEffect=cm.ReplacedRegisterEffect(p,code,oldcf)Duel.RegisterEffect=cm.ReplacedRegisterEffect(p,code,olddf)
local res={Senya.ProtectedRun(f,...)}
Card.RegisterEffect=oldcf
Duel.RegisterEffect=olddf
return table.unpack(res)
end
end
local m=77765008
local cm=_G["c"..m]
Duel.LoadScript("c77765000.lua")
cm.Senya_name_with_difficulty=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9411399,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.operation1)
c:RegisterEffect(e1)
end
function cm.filter(c)
return Kaguya.IsDifficulty(c) and c:IsAbleToDeck() and not c:IsPublic()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.filter,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct+1,REASON_EFFECT)
end
end
function cm.filter1(c,e,sp)
return c:IsCode(77765001) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATON_GRAVE+LOCATION_HAND+LOCATON_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATON_GRAVE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sc=Duel.GetFirstMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATON_GRAVE,0,nil,e,tp)
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -20,13 +20,13 @@ function cm.initial_effect(c) ...@@ -20,13 +20,13 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c) return eg:IsExists(function(c)
return not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp return not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp and c:IsControler(tp)
end,1,nil) end,1,nil)
end) end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=eg:Filter(function(c) local g=eg:Filter(function(c)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp and c:IsControler(tp)
end,nil) end,nil)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
......
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