Commit 80a6154b authored by 伊蕾娜's avatar 伊蕾娜

fix:咕咕的更新包:修复爱丽丝的人形工坊、正邪、胡桃、星辉女神的bug,补上缺失的鸽卡、k卡、芙卡lua

parent ae6dd4c9
Pipeline #14780 passed with stage
in 1 minute and 21 seconds
--观星者敢达
local m=17020430
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,3)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17020430,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(cm.atkcon)
e1:SetCost(cm.atkcost)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17020430,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
e2:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e2)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattleTarget()~=nil
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(17020430)==0 end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(17020430,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack()*2)
c:RegisterEffect(e1)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(17020430)==0 end
local ct=c:RemoveOverlayCard(tp,1,c:GetOverlayCount(),REASON_COST)
e:SetLabel(ct)
c:RegisterFlagEffect(17020430,RESET_CHAIN,0,1)
end
function cm.filter(c,e,tp,rk,mc)
return c:IsRank(rk) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetBattledGroupCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_RANK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e2:SetValue(e:GetLabel())
c:RegisterEffect(e2)
end
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
local rg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,c:GetRank()+1,c)
if #rg>0 and Duel.SelectYesNo(tp,aux.Stringid(17020430,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
\ No newline at end of file
--导引之钟·叮当天使
function c17030980.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c17030980.matfilter,2)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c17030980.matcheck)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17030980,0))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c17030980.drcon)
e4:SetTarget(c17030980.drtg)
e4:SetOperation(c17030980.drop)
c:RegisterEffect(e4)
end
function c17030980.matfilter(c)
return c:GetLevel()>0
end
function c17030980.matfilter(c)
return c:GetOriginalLevel()>=0
end
function c17030980.matcheck(e,c)
local g=c:GetMaterial():Filter(c17030980.matfilter,nil)
local atk=g:GetSum(Card.GetOriginalLevel)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk*300)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function c17030980.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function c17030980.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c17030980.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--异界共鸣-同调融合
function c17032170.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c17032170.target)
e1:SetOperation(c17032170.activate)
c:RegisterEffect(e1)
end
function c17032170.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c17032170.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c17032170.chkfilter(c,tp)
return c:IsControler(tp) and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,c,nil)
end
function c17032170.fselect(g,e,tp)
local chkf=tp
return Duel.IsExistingMatchingCard(c17032170.synfilter,tp,LOCATION_EXTRA,0,1,nil,g)
and Duel.IsExistingMatchingCard(c17032170.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,g,nil,chkf)
end
function c17032170.synfilter(c,g)
local res=nil
if c:IsCode(16172067,97489701,62242678,93157004) then
res=c:IsSynchroSummonable(nil,g,g:GetCount()-2,g:GetCount()-2)
elseif c:IsCode(99585850) then
res=c:IsSynchroSummonable(nil,g,g:GetCount()-3,g:GetCount()-3)
else
res=c:IsSynchroSummonable(nil,g,g:GetCount()-1,g:GetCount()-1)
end
return res
end
function c17032170.chkfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c17032170.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
local cg=Duel.GetMatchingGroup(c17032170.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg==0 then return false end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(c17032170.fselect,2,#g,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_EXTRA)
end
function c17032170.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c17032170.fselect,false,2,#g,e,tp)
if sg then
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
local tg=Duel.GetMatchingGroup(c17032170.synfilter,tp,LOCATION_EXTRA,0,nil,sg)
fg=Duel.GetMatchingGroup(c17032170.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,sg,nil,chkf)
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local scg=tg:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fcg=fg:Select(tp,1,1,nil):GetFirst()
scg:SetMaterial(sg)
fcg:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO+REASON_FUSION)
Duel.SpecialSummonStep(scg,SUMMON_SYNCHRO,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonStep(fcg,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.SpecialSummonComplete()
end
end
end
end
--霸王龙眷 暗镇魂
function c17032410.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,c17032410.matfilter,5,3)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c17032410.atkval)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c17032410.discon)
e2:SetTarget(c17032410.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032410,0))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCondition(c17032410.atkcon)
e3:SetCost(c17032410.cost)
e3:SetTarget(c17032410.atktg)
e3:SetOperation(c17032410.atkop)
c:RegisterEffect(e3)
end
function c17032410.matfilter(c)
return c:IsXyzType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c17032410.atkfilter(c)
return c:IsType(TYPE_XYZ) and c:GetAttack()>=0
end
function c17032410.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c17032410.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c17032410.cfilter(c)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_DRAGON)
end
function c17032410.discon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return e:GetHandler():GetOverlayGroup():IsExists(c17032410.cfilter,1,nil)
and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c17032410.disable(e,c)
return c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0
end
function c17032410.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c17032410.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(c17032410.cfilter,1,nil)
end
function c17032410.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c17032410.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
local atk=tc:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c17032410.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0)
tc:RegisterEffect(e1)
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -88,7 +88,7 @@ function c20300.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c20300.filter(c,att)
return c:IsSetCard(0x186) and c:IsAbleToHand() and not c:IsAttribute(att) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0x186) and c:IsAbleToHand() and not c:IsAttribute(att) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE)
end
function c20300.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -76,10 +76,13 @@ function c29016.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c29016.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(e:GetHandler():GetControler(),1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,e:GetHandler():GetControler(),1)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c29016.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
......@@ -88,6 +91,6 @@ function c29016.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(1100)
c:RegisterEffect(e1)
Duel.Draw(c:GetControler(),1,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
end
end
......@@ -6,6 +6,7 @@ function c50319.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c50319.bcost)
e4:SetTarget(c50319.btg)
e4:SetOperation(c50319.bop)
c:RegisterEffect(e4)
......@@ -18,6 +19,10 @@ function c50319.initial_effect(c)
e3:SetValue(c50319.value)
c:RegisterEffect(e3)
end
function c50319.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c50319.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
......
--追寻自我的圣女
function c66919017.initial_effect(c)
c66919017.dfc_front_side=66919015
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--direct attack
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e12)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetValue(c66919017.atlimit)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c66919017.rectg)
e3:SetOperation(c66919017.recop)
c:RegisterEffect(e3)
end
function c66919017.atlimit(e,c)
return c~=e:GetHandler()
end
function c66919017.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local rec=1500
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c66919017.recop(e,tp,eg,ep,ev,re,r,rp)
local rec=1500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rec,REASON_EFFECT)
end
\ No newline at end of file
......@@ -23,10 +23,10 @@ function c77002001.op(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ALLOW_SYNCHRO_KOISHI)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
......
--五谷丰登
local l = c7770117
local lid = 7770117
function l.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(l.target)
e1:SetOperation(l.activate)
c:RegisterEffect(e1)
end
function l.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,2,nil)and Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,0,1-tp,1)
end
function l.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,2,nil)and Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-tp,LOCATION_DECK,0,2,nil) then
Duel.ConfirmDecktop(tp,2)
Duel.ConfirmDecktop(1-tp,2)
local g1=Duel.GetDecktopGroup(tp,2)
local g2=Duel.GetDecktopGroup(1-tp,2)
local list=g1+g2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local ag1=list:Select(tp,1,1,nil)
list=list-ag1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local ag2=list:Select(1-tp,1,1,nil)
list=list-ag2
Duel.SendtoHand(ag1,tp,REASON_EFFECT)
Duel.SendtoHand(ag2,1-tp,REASON_EFFECT)
Duel.SendtoGrave(list,REASON_EFFECT)
end
end
\ No newline at end of file
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