Commit 8d0680a6 authored by Tachibana's avatar Tachibana

1145141919810

parent b0e10117
Pipeline #14352 passed with stages
in 23 minutes and 42 seconds
......@@ -5,14 +5,14 @@ mask_crystal=mask_crystal or {}
local mc=mask_crystal
---------------------------------------------------------------main effect
function mc.CRE(c,f,v,reg)
local e=mask_crystal.any(mask_crystal.eff["CRE"](c),f,v)
local e=mc.any(mc.eff["CRE"](c),f,v)
if not reg then c:RegisterEffect(e) end
return e
end
function mc.c_loc(loc)
local v = 0
loc = type(loc) == "table" and loc or {loc}
for i,l in ipairs(loc) do
for _,l in ipairs(loc) do
l = type(l) == "string" and mc.loc[l] or l
v = v + l
end
......@@ -41,26 +41,26 @@ function mc.SS_L(c,val)
return e
end
function mc.SR_D(c,con)
--这张卡只要在怪兽区域存在,战斗发生的对自己的战斗伤害变成0
local e=mc.SR(c,EFFECT_AVOID_BATTLE_DAMAGE,LOCATION_MZONE,con)
--这张卡战斗发生的对自己的战斗伤害变成0
local e=mc.SR(c,EFFECT_AVOID_BATTLE_DAMAGE,"M",con,1)
return e
end
function mc.SR_R(c)
--这张卡只要在怪兽区域存在,不能解放,不能作为同调·超量·连接素材
local e={mc.SR(c,{EFFECT_UNRELEASABLE_SUM,EFFECT_UNRELEASABLE_NONSUM,EFFECT_CANNOT_BE_XYZ_MATERIAL,EFFECT_CANNOT_BE_SYNCHRO_MATERIAL,EFFECT_CANNOT_BE_LINK_MATERIAL},LOCATION_MZONE,nil,1)}
local e={mc.SR(c,{EFFECT_UNRELEASABLE_SUM,EFFECT_UNRELEASABLE_NONSUM,EFFECT_CANNOT_BE_XYZ_MATERIAL,EFFECT_CANNOT_BE_SYNCHRO_MATERIAL,EFFECT_CANNOT_BE_LINK_MATERIAL},"M",nil,1)}
return table.unpack(e)
end
function mc.SR_V(c)
--这张卡的攻击力·守备力上升这张卡装备的怪兽的原本的攻击力·守备力各自合计数值
local e={mc.SR(c,{EFFECT_UPDATE_ATTACK,EFFECT_UPDATE_DEFENSE},LOCATION_MZONE)}
local e={mc.SR(c,{EFFECT_UPDATE_ATTACK,EFFECT_UPDATE_DEFENSE},"M")}
e[1]:SetValue(mc.Up_Attack)
e[2]:SetValue(mc.Up_Defense)
return table.unpack(e)
end
function mc.SR_D_R(c,op,f,rea)
--这张卡被破坏的场合,作为代替把这张卡装备的1张怪兽卡XX
local e1=mc.CRE(c,{"PRO","TYP","COD","RAN","TG","OP"},{EFFECT_FLAG_SINGLE_RANGE,EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE,EFFECT_DESTROY_REPLACE,LOCATION_MZONE,mc.SR_D_R_tg(f,rea),op})
return e1
local e=mc.CRE(c,{"PRO","TYP","COD","RAN","TG","OP"},{EFFECT_FLAG_SINGLE_RANGE,EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE,EFFECT_DESTROY_REPLACE,"M",mc.SR_D_R_tg(f,rea),op})
return e
end
---------------------------------------------------------------con
mc.con = {
......@@ -243,10 +243,12 @@ end
function mc.tg_EA_op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsLocation,nil,LOCATION_MZONE)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
g=g:SelectSubGroup(tp,nil,false,1,Duel.GetLocationCount(tp,LOCATION_SZONE))
if c:IsRelateToEffect(e) and #g>0 then
local max = math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),#g)
if max==0 then return end
g=g:Select(tp,1,max,nil)
local tc=g:GetFirst()
while tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 do
while tc do
if Duel.Equip(tp,tc,c) then
mc.Equip_Limit(c,tc)
end
......@@ -269,7 +271,7 @@ function mc.tg_EOT_op(e,tp,eg,ep,ev,re,r,rp)
if c:IsFacedown() or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
if tc then
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
tc:RegisterFlagEffect(e:GetHandler():GetCode(),RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
mask_crystal.Equip_Limit(c,tc)
end
......@@ -354,8 +356,7 @@ end
function mc.SR_D_R_tg(f,rea)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetEquipGroup():Filter(mc.SR_D_R_tg_Filter,nil,e,f)
local x=REASON_BATTLE
if rea then x=x+rea end
local x = REASON_BATTLE + (rea or 0)
if chk==0 then return not e:GetHandler():IsReason(REASON_REPLACE) and g:GetCount()>0 and e:GetHandler():IsReason(x) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
g=g:Select(tp,1,1,nil):GetFirst()
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
local e1 = mask_crystal.SS_L(c,mask_crystal.SS_L_EX_val)
local e2 = {mask_crystal.SR_R(c)}
local e3 = mask_crystal.SR_D(c,mask_crystal.Zero_Equip)
local e4 = mask_crystal.SR(c,EFFECT_INDESTRUCTABLE_EFFECT,mask_crystal.Zero_Equip)
local e4 = mask_crystal.SR(c,EFFECT_INDESTRUCTABLE_EFFECT,"M",mask_crystal.Zero_Equip)
local e5 = {mask_crystal.SR_V(c)}
local e6 = mask_crystal.Q(c,"M",nil,cm.con6,"EOT","CTL",1)
local e7 = mask_crystal.SR_D_R(c,cm.op7,cm.tgf7,REASON_EFFECT)
......
......@@ -7,8 +7,8 @@ function cm.initial_effect(c)
local e2 = {mask_crystal.T(c,{"H","G"},{"S","SP","E"},"SS",mask_crystal.SS_Cos,1)}
local e3 = {mask_crystal.SR_R(c)}
local e4 = mask_crystal.SR_D(c)
local e5 = {mask_crystal.Trigger(c,"M",{"A","E"},"EO",{"CTL","TG","OP"},{{2,m},cm.tg,cm.op})}
local e6 = mask_crystal.CRE(c,{"TYP","COD","RAN","TRAN","TG","VAL"},{EFFECT_TYPE_FIELD,EFFECT_INDESTRUCTABLE_EFFECT,"M",{LOCATION_SZONE,0},1,cm.indtg,cm.indval})
local e5 = {mask_crystal.T(c,"M",{"A","E"},"EO",{"CTL","TG","OP"},{{2,m},cm.tg,cm.op})}
local e6 = mask_crystal.CRE(c,{"TYP","COD","RAN","TRAN","TG","VAL"},{EFFECT_TYPE_FIELD,EFFECT_INDESTRUCTABLE_EFFECT,"M",{LOCATION_SZONE,0},cm.indtg,cm.indval})
end
--e5
function cm.tgf(c)
......@@ -23,12 +23,11 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,TYPE_MONSTER):GetFirst()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
if tc then
local c=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xb72):Filter(Card.IsFaceup,nil):Select(tp,1,1,nil):GetFirst()
if c and tc then
if not Duel.Equip(tp,tc,c) then return end
local e1 = mask_crystal.CRE(tc,{"TYP","COD","VAL","RES"},{EFFECT_TYPE_EQUIP,EFFECT_UPDATE_ATTACK,tc:GetBaseAttack(),RESET_EVENT+RESETS_STANDARD})
mask_crystal.Equip_Limit(c,tc)
......
......@@ -57,8 +57,8 @@ function cm.initial_effect(c)
local e1 = {mc.CS(c,m)}
local e2 = mc.Q_S(c)
local e3 = mc.QF(c)
local e4 = mc.CRE(c,{"CAT","TYP","COD","PRO","RAN","CTL","CON","TG","OP"},
{CATEGORY_SPECIAL_SUMMON,EFFECT_TYPE_QUICK_O,EVENT_FREE_CHAIN,EFFECT_FLAG_CARD_TARGET,"S",{2,m},cm.con4,cm.tg4,cm.op4})
local e4 = mc.CRE(c,{"DES","CAT","TYP","COD","PRO","RAN","CTL","CON","TG","OP"},
{aux.Stringid(m,0),CATEGORY_SPECIAL_SUMMON,EFFECT_TYPE_QUICK_O,EVENT_FREE_CHAIN,EFFECT_FLAG_CARD_TARGET,"S",{2,m},cm.con4,cm.tg4,cm.op4})
end
--e4
function cm.conf4(c)
......@@ -73,7 +73,7 @@ end
function cm.tg4(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=Duel.GetMatchingGroupCount(cm.conf4,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.tgf4(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=count
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.tgf4,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.tgf4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......@@ -83,13 +83,14 @@ end
function cm.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
local g=Duel.GetMatchingGroup(cm.conf4,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 and #g>0 then
g=g:Select(tp,1,#g,nil)
local max = math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),#g)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 and max>0 then
g=g:Select(tp,1,max,nil)
local sc=g:GetFirst()
while sc and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 do
if Duel.Equip(tp,sc,tc) then
local e1 = mask_crystal.CRE(sc,{"TYP","COD","VAL","RES"},{EFFECT_TYPE_EQUIP,EFFECT_UPDATE_ATTACK,sc:GetBaseAttack(),RESET_EVENT+RESETS_STANDARD})
mask_crystal.Equip_Limit(tc,sc)
end
sc=g:GetNext()
......
......@@ -15,73 +15,71 @@ function cm.initial_effect(c)
end
--e1
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
--return Duel.GetTurnPlayer()==1-tp
return true
end
function cm.exfilter1(c,e)
return cm.filter0(c) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
function cm.mttg(e,c)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:IsType(TYPE_EQUIP)
end
function cm.filter0(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER and c:IsType(TYPE_EQUIP)
end
function cm.filter1(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
function cm.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0xb72) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter2(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0xb72)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD)
me:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
me:SetTargetRange(LOCATION_SZONE,0)
me:SetTarget(cm.mttg)
me:SetValue(1)
Duel.RegisterEffect(me,tp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToGrave,nil):Filter(Card.IsOnField,nil)
if Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_SZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_SZONE,0,nil)
if sg:GetCount()>0 then
mg1:Merge(sg)
aux.FCheckAdditional=cm.fcheck
end
end
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
aux.FCheckAdditional=cm.fcheck
local res=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
res=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
me:Reset()
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD)
me:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
me:SetTargetRange(LOCATION_SZONE,0)
me:SetTarget(cm.mttg)
me:SetValue(1)
Duel.RegisterEffect(me,tp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e):Filter(Card.IsOnField,nil)
if Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_SZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(cm.exfilter1,tp,LOCATION_SZONE,0,nil,e)
if sg:GetCount()>0 then
mg1:Merge(sg)
exmat=true
end
end
if exmat then
aux.FCheckAdditional=cm.fcheck
end
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
local mg2=nil
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter2,nil,e):Filter(Card.IsOnField,nil)
aux.FCheckAdditional=cm.fcheck
local sg1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
sg2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
......@@ -89,27 +87,21 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
aux.FCheckAdditional=cm.fcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat1)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_SZONE)
mat1:Sub(rg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SendtoGrave(rg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
me:Reset()
end
--e2
function cm.cos2(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -3,14 +3,14 @@ local m=35700215
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c35700210") end) then require("script/c35700210") end
function cm.initial_effect(c)
local e1 = mask_crystal.CRE(c,{"CAT","TYP","COD","CTL","TG","OP"},{CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP,EFFECT_TYPE_ACTIVATE,EVENT_FREE_CHAIN,{1,m+EFFECT_COUNT_CODE_DUEL},cm.tg,cm.op})
local e1 = mask_crystal.CRE(c,{"CAT","TYP","COD","CTL","TG","OP"},{CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP,EFFECT_TYPE_ACTIVATE,EVENT_FREE_CHAIN,{1,m+EFFECT_COUNT_CODE_DUEL},cm.tg3,cm.op3})
end
function cm.tgf3(c,e,tp)
return c:IsSetCard(0xb72) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsType(TYPE_MONSTER)
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.tgf3,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
......@@ -18,10 +18,12 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local c = e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,cm.tgf3,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,2,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
local max = math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil))
max = max>1 and 2 or max
if max==0 then return end
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,2,2,nil):GetFirst()
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,max,nil)
local sc = g:GetFirst()
while sc do
if Duel.Equip(tp,sc,tc) then
......
......@@ -31,27 +31,27 @@ function c72411050.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c72411050.filtera(c)
return c:IsSetCard(0x5729) and c:GetType()==TYPE_SPELL and c:IsAbleToHand()
function c72411050.filtera(c,tp)
return (c:IsSetCard(0x5729) or Duel.IsPlayerAffectedByEffect(tp,72413440)) and c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function c72411050.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c72411050.filtera,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c72411050.filtera,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72411050.operation1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72411050.filtera,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c72411050.filtera,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c72411050.filterb(c,e)
return c:IsSetCard(0x5729) and c:IsType(TYPE_SPELL) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
function c72411050.filterb(c,e,tp)
return ((c:IsSetCard(0x5729) and c:IsType(TYPE_SPELL)) or (c:IsSetCard(0x5729) or Duel.IsPlayerAffectedByEffect(tp,72413440))) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end
function c72411050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c72411050.filterb,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
local g=Duel.GetMatchingGroup(c72411050.filterb,tp,LOCATION_GRAVE,0,e:GetHandler(),e,tp)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and g:GetClassCount(Card.GetCode)>2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
......@@ -18,18 +18,18 @@ end
function c72411110.filterb(c)
return c:IsCode(72411030) and c:IsAbleToHand()
end
function c72411110.filterc(c)
return c:IsSetCard(0x5729) and c:IsAbleToDeck()
function c72411110.filterc(c,tp)
return (c:IsSetCard(0x5729) or (Duel.IsPlayerAffectedByEffect(tp,72413440) and c:GetType()==TYPE_SPELL)) and c:IsAbleToDeck()
end
function c72411110.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72411110.filtera,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72411110.filterb,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72411110.filterc,tp,LOCATION_HAND,0,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c72411110.filtera,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72411110.filterb,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72411110.filterc,tp,LOCATION_HAND,0,1,e:GetHandler(),tp) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c72411110.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c72411110.filterc,p,LOCATION_HAND,0,nil)
local g=Duel.GetMatchingGroup(c72411110.filterc,p,LOCATION_HAND,0,nil,tp)
if g:GetCount()>=1 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,1,1,nil)
......
......@@ -47,12 +47,12 @@ function c72411140.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
--e2
function c72411140.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x5729) and c:IsDiscardable(REASON_COST)
function c72411140.costfilter(c,tp)
return (c:IsSetCard(0x5729) and c:IsType(TYPE_SPELL)) or (c:IsSetCard(0x5729) or Duel.IsPlayerAffectedByEffect(tp,72413440)) and c:IsDiscardable(REASON_COST)
end
function c72411140.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72411140.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c72411140.costfilter,1,1,REASON_COST+REASON_DISCARD)
if chk==0 then return Duel.IsExistingMatchingCard(c72411140.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.DiscardHand(tp,c72411140.costfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp)
end
function c72411140.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
......@@ -43,7 +43,8 @@ function c72411150.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return b1 or b2 end
end
function c72411150.tokentarget(e,c)
return c:IsSetCard(0x5729)
local tp=e:GetHandler():GetControler()
return c:IsSetCard(0x5729) or (c:GetType()==TYPE_SPELL and Duel.IsPlayerAffectedByEffect(tp,72413440))
end
function c72411150.tokenfilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
......
......@@ -30,12 +30,12 @@ end
function c72411160.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSynchroType(TYPE_NORMAL)
end
function c72411160.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x5729) and c:IsDiscardable(REASON_COST)
function c72411160.costfilter(c,tp)
return (c:IsSetCard(0x5729) and c:IsType(TYPE_SPELL)) or (c:IsSetCard(0x5729) or Duel.IsPlayerAffectedByEffect(tp,72413440)) and c:IsDiscardable(REASON_COST)
end
function c72411160.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72411160.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c72411160.costfilter,1,1,REASON_COST+REASON_DISCARD)
if chk==0 then return Duel.IsExistingMatchingCard(c72411160.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.DiscardHand(tp,c72411160.costfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp)
end
function c72411160.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
......@@ -14,16 +14,16 @@ function c72411580.initial_effect(c)
e1:SetOperation(c72411580.thop)
c:RegisterEffect(e1)
end
function c72411580.thfilter(c)
return c:IsSetCard(0x5729) and c:IsAbleToDeck() and c:IsAbleToHand()
function c72411580.thfilter(c,tp)
return ( c:IsSetCard(0x5729) or (Duel.IsPlayerAffectedByEffect(tp,72413440) and c:GetType()==TYPE_SPELL))
end
function c72411580.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72411580.thfilter,tp,LOCATION_REMOVED,0,3,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c72411580.thfilter,tp,LOCATION_REMOVED,0,3,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_REMOVED)
end
function c72411580.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c72411580.thfilter,tp,LOCATION_REMOVED,0,3,3,nil)
local g=Duel.SelectMatchingCard(tp,c72411580.thfilter,tp,LOCATION_REMOVED,0,3,3,nil,tp)
if g:GetCount()==3 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=g:RandomSelect(1-tp,1)
......
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