Commit aeafb838 authored by Nemo Ma's avatar Nemo Ma

pre

parent 80a4e2b2
......@@ -789,6 +789,12 @@
30002065 0
30010000 0
30012000 0
#220116
14000263 0
14000278 0
31407007 0
31400058 1
35300137 1
#220108
15000180 0
33700902 0
......@@ -1466,7 +1472,6 @@
79029031 0
79029438 0
79029513 0
60151401 1
60151421 1
79029241 1
79029374 1
......@@ -1518,7 +1523,6 @@
48130397 1 --Special
#210711
9910433 0
9910442 0
10700085 0
14000216 0
22070140 0
......@@ -3115,7 +3119,6 @@
33330093 1
33400006 1
33700311 1
33700902 1
33700903 1
#33700905 1
33700924 1
......@@ -3822,7 +3825,6 @@
33700785 1
33700786 1
33700787 1
33700902 1
33700903 1
40008150 1
40008160 1
......
No preview for this file type
This diff is collapsed.
--破名椛
local m=14010147
local cm=_G["c"..m]
function cm.initial_effect(c)
--limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
e:GetHandler():SetHint(CHINT_CARD,ac)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.splimit)
e1:SetLabel(ac)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetLabel(ac)
e2:SetValue(cm.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(e:GetLabel())
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
\ No newline at end of file
--亡都祭
local m=14010148
local cm=_G["c"..m]
function cm.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_FZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,LOCATION_ONFIELD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,27,true)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.con,cm.op)
local e2=rsef.I(c,{m,0},{1,m},"tg,th,se",nil,LOCATION_MZONE,nil,nil,cm.tg2,cm.op2)
local e2=rsef.I(c,{m,0},{1},"tg,th,se",nil,LOCATION_MZONE,nil,nil,cm.tg2,cm.op2)
end
function cm.con(e,c)
if not c then return true end
......@@ -18,7 +18,7 @@ function cm.con(e,c)
return Duel.GetLocationCountFromEx(p,p,rc)>0 and rc:IsSetCard(0x442)
end
local g=Duel.GetMatchingGroup(f,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=9 and Duel.CheckReleaseGroup(tp,f2,1,nil,tp)
return g:GetClassCount(Card.GetCode)>=5 and Duel.CheckReleaseGroup(tp,f2,1,nil,tp)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
local f=function(rc,p)
......@@ -51,7 +51,7 @@ function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=rg:Filter(Card.IsAbleToHand,nil)
local g2=g1:Filter(Card.IsSetCard,nil,0x442)
if #g1<=0 and #g2<=0 then return end
local op=rsof.SelectOption(tp,true,aux.Stringid(m,1),#g1>0,aux.Stringid(m,2),#g2>0,aux.Stringid(m,3))
local op=rshint.SelectOption(tp,true,aux.Stringid(m,1),#g1>0,aux.Stringid(m,2),#g2>0,aux.Stringid(m,3))
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if op==2 then
......
--瞄准的女王 梓璃梦
function c33701346.initial_effect(c)
--fusion
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c33701346.ffilter,2,true)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetCondition(c33701346.rule)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33701346,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33701346.tgcon)
e2:SetTarget(c33701346.tgtg)
e2:SetOperation(c33701346.tgop)
c:RegisterEffect(e2)
if not c33701346.global_check then
c33701346.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLE_DAMAGE)
ge1:SetOperation(c33701346.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c33701346.rule(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFlagEffect(tp,33701346)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c33701346.checkop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(eg:GetFirst():GetControler(),0,LOCATION_MZONE)>0) then return nil end
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetControler(),33701346,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c33701346.ffilter(c,fc,sub,mg,sg)
return c:IsAttackBelow(1000) and c:GetDefense()>c:GetAttack()
end
function c33701346.tgcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c33701346.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1000,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE)
end
function c33701346.tgfilter(c,atk)
return c:GetAttack()<atk and c:IsAbleToGrave() and c:IsFaceup()
end
function c33701346.tgop(e,tp,eg,ep,ev,re,r,rp)
local a1=e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup()
local a2=Duel.IsExistingMatchingCard(c33701346.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack())
local op==2
if a1 and a2 then
op=Duel.SelectOption(tp,aux.Stringid(33701346,1),aux.Stringid(33701346,2))
elseif a1 then
op=Duel.SelectOption(tp,aux.Stringid(33701346,1))
elseif a2 then
op=Duel.SelectOption(tp,aux.Stringid(33701346,2))+1
end
if op==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
c:RegisterEffect(e1)
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c33701346.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack())
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--虚拟YouTuber 梓璃梦 ~完全复活~
function c33701347.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33701347,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER+CATEGORY_CONTROL+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33701347.destg)
e1:SetOperation(c33701347.desop)
c:RegisterEffect(e1)
end
function c33701347.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function c33701347.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33701347.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,0,0)
end
function c33701347.cfilter(c)
return c:IsControlerCanBeChanged() and c:GetFlagEffect(33701347)>0
end
function c33701347.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33701347.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local reg=Duel.SelectMatchingCard(tp,c33701347.filter,tp,LOCATION_GRAVE,0,1,Duel.GetLocationCount(tp,LOCATION_MZONE),nil)
if Duel.Remove(reg,POS_FACEUP,REASON_EFFECT)~=0 then
local dg=Duel.GetOperatedGroup()
local num=dg:GetCount()
if num>0 then
local change=num*500
local mg=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Stringid(mg) do
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetValue(-change)
tc:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e1)
if tc:IsAttack(0) or tc:IsDefense(0) then
tc:RegisterFlagEffect(33701347,RESET_CHAIN,0,1)
end
end
local cg=Duel.GetMatchingGroup(c33701347.cfilter,tp,0,LOCATION_MZONE,nil)
local lc=Duel.GetLocationCount(tp,LOCATION_MZONE)
local temp=cg:GetCount()
lc=math.min(lc,temp)
for i=1,tc do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local cc=cg:Select(tp,1,1,nil)
Duel.GetControl(cc,tp)
end
end
end
end
end
\ No newline at end of file
--动物朋友 驴
function c33701350.initial_effect(c)
--check deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33701350,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c33701350.thcost)
e1:SetTarget(c33701350.thtg)
e1:SetOperation(c33701350.thop)
c:RegisterEffect(e1)
--deck check 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33701350,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c33701350.target)
e2:SetOperation(c33701350.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c33701350.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c33701350.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c33701350.thfilter(c)
return c:IsSetCard(0x442) and c:IsAbleToHand()
end
function c33701350.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=2 then return end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3)
local sg=g:Filter(c33701350.thfilter,nil)
if sg:GetCount()>0 and c:IsRelateToEffect(e) and c:IsAbleToDeck() and Duel.SelectYesNo(tp,aux.Stringid(33701350,1)) then
Duel.DisableShuffleCheck()
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
local sg=sg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
local g1=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmCards(tp,g1)
Duel.SortDecktop(tp,tp,3)
end
end
end
function c33701350.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
end
function c33701350.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,3) then return end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3)
local num=g:FilterCount(Card.IsSetCard,nil,0x442)
if num>0 then
Duel.Recover(tp,1000,REASON_EFFECT)
end
if num>1 then
Duel.Recover(tp,2000,REASON_EFFECT)
end
if num>2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,c33701350.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(thg,nil,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
\ No newline at end of file
--动物朋友 亚洲斑嘴鸭
function c33701351.initial_effect(c)
--check deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33701351,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c33701351.thcost)
e1:SetTarget(c33701351.thtg)
e1:SetOperation(c33701351.thop)
c:RegisterEffect(e1)
--deck check 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33701351,2))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c33701351.target)
e2:SetOperation(c33701351.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c33701351.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c33701351.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c33701351.thfilter(c)
return c:IsSetCard(0x442) and c:IsAbleToHand()
end
function c33701351.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=2 then return end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3)
local sg=g:Filter(c33701351.thfilter,nil)
if sg:GetCount()>0 and c:IsRelateToEffect(e) and c:IsAbleToDeck() and Duel.SelectYesNo(tp,aux.Stringid(33701351,1)) then
Duel.DisableShuffleCheck()
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
local g1=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmCards(tp,g1)
Duel.SortDecktop(tp,tp,3)
end
end
end
function c33701351.adfilter(c)
return c:IsFaceup() and c:IsSetCard(0x442)
end
function c33701351.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
end
function c33701351.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerCanDiscardDeck(tp,3) then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local num=g:FilterCount(Card.IsSetCard,nil,0x442)
local sg=Duel.GetMatchingGroup(c33701351.adfilter,tp,LOCATION_MZONE,0,nil)
if num>0 then
for tc in aux.Next(sg) do
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetValue(500)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e1)
end
end
if num>1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if num>2 then
Duel.BreakEffect()
for ac in aux.Next(sg) do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(c33701351.val)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ac:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ac:RegisterEffect(e3)
end
end
Duel.ShuffleDeck(tp)
end
function c33701351.val(e,re,rp)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
\ No newline at end of file
--动物朋友 薮胞
function c33701352.initial_effect(c)
c:SetUniqueOnField(1,1,33701352)
--link summon
aux.AddLinkProcedure(c,nil,2,4,c33701352.lcheck)
c:EnableReviveLimit()
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c33701352.adjustop)
c:RegisterEffect(e2)
--cannot summon,spsummon,flipsummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetTarget(c33701352.sumlimit)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e6)
--cannot set
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_MSET)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(1,1)
e7:SetTarget(c33701352.setlimit)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e9)
end
function c33701352.setlimit(e,c)
return Duel.GetMatchingGroupCount(Card.IsFacedown,c:GetControler(),LOCATION_ONFIELD,0,nil)>0
end
function c33701352.filter(g)
local c1=g:GetFirst()
local c2=g:GetNext()
return c1:IsCode(c2:GetCode()) or c2:IsCode(c1:GetCode())
end
function c33701352.lcheck(g)
if g:CheckSubGroup(c33701352.filter,2,2) then return false end
if g:IsExists(Card.IsSetCard,1,nil,0x442) then
return true
else
return g:GetCount()==4
end
end
function c33701352.rmfilter(c,rc)
return c:IsFaceup() and (c:IsCode(rc:GetCode()) or rc:IsCode(c:GetCode()))
end
function c33701352.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumtype==SUMMON_TYPE_DUAL then return false end
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then
if targetp then
return
Duel.GetMatchingGroupCount(Card.IsFacedown,targetp,LOCATION_ONFIELD,0,nil)>0
else
return
Duel.GetMatchingGroupCount(Card.IsFacedown,sump,LOCATION_ONFIELD,0,nil)>0
end
end
local tp=sump
if targetp then tp=targetp end
return Duel.IsExistingMatchingCard(c33701352.rmfilter,tp,LOCATION_MZONE,0,1,nil,c)
end
function c33701352.tgfilter(g)
local c1=g:GetFirst()
local c2=g:GetNext()
return ((c1:IsCode(c2:GetCode()) or c2:IsCode(c1:GetCode())) and c1:IsFaceup()and c2:IsFaceup())
end
function c33701352.tgfilter1(g,sg)
local g1=Group.__bxor(g,sg)
return not g1:CheckSubGroup(c33701352.tgfilter,2,2) and g1:FilterCount(Card.IsFacedown,nil)<2
end
function c33701352.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local sg=Group.CreateGroup()
for p=0,1 do
local g=Duel.GetMatchingGroup(nil,p,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
if g:CheckSubGroup(c33701352.tgfilter,2,g:GetCount()) or g:FilterCount(Card.IsFacedown,nil)>1 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOGRAVE)
local g=g:SelectSubGroup(p,c33701352.tgfilter1,true,1,g:GetCount(),nil,g)
sg:Merge(dg)
end
end
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_RULE)
Duel.Readjust()
end
end
\ No newline at end of file
--动物朋友 小包EX
if not pcall(function() require("expansions/script/c16101100") end) then require("script/c16101100") end
local m=33701353
local cm=_G["c"..m]
function c33701353.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,33700055),1,1)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.target)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e2=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.sprcon,cm.sprop)
end
function cm.spcfilter(c,tp)
return c:IsAbleToDeckAsCost() and c:IsCode(33700055)
end
function cm.spzfilter(c,tp)
return Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.sprcon(e,c,tp)
local g=Duel.GetMatchingGroup(cm.spcfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tp)
return g:IsExists(cm.spzfilter,1,nil,tp)
end
function cm.sprop(e,tp)
local g=Duel.GetMatchingGroup(cm.spcfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
local sg=g:SelectSubGroup(tp,cm.spzfilter,false,1,1,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,0,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,0,0,0)
end
function cm.tgfilter(c)
return c:IsSetCard(0x442) and c:IsAbleToGrave()
end
function cm.regop(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local g1=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x442)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(tp,g)
if g:GetClassCount(Card.GetCode,nil)==g:GetCount() then
if g1:GetCount()==0 and g:Filter(cm.tgfilter,nil):GetClassCount(Card.GetCode,nil)>=7 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,cm.thfilter,true,7,7)
Duel.SendtoGrave(sg,REASON_EFFECT)
elseif g1:FilterCount(Card.IsAbleToDeck,nil)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:FilterSelect(tp,Card.IsAbleToDeck,1,math.min(7,g:GetCount()),nil)
Duel.DisableShuffleCheck()
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
local g2=Duel.GetOperatedGroup()
g2=g2:Filter(Card.IsLocation,nil,LOCATION_DECK)
if g2:GetCount()>0 then
local num=g2:GetCount()
Duel.Recover(tp,500*num,REASON_EFFECT)
Duel.SortDecktop(tp,tp,num)
end
end
end
end
end
\ No newline at end of file
--动物朋友 哈士奇家犬
local m=33701354
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_CUSTOM+33700000)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--cannot be target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(function(e,c) return c:IsSetCard(0x442) and c:IsFaceup() and not c==e:GetHandler() end)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
local e4=e5:Clone()
e4:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
c:RegisterEffect(e4)
if not aux.Monster_Friend_Excavate_check then
aux.Monster_Friend_Excavate_check=true
_confirmdeckgroup=Duel.ConfirmDecktop
function Duel.ConfirmDecktop(tp,count)
local re,rp=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local eg=Duel.GetDecktopGroup(tp,count)
Duel.RaiseEvent(eg,EVENT_CUSTOM+33700000,re,0,rp,tp,count)
return _confirmdeckgroup(tp,count)
end
end
end
function cm.check(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.check,1,nil)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,0)
end
function cm.rmcheck(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local sg=Duel.GetDecktopGroup(tp,7)
if sg:GetCount()==7 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.ConfirmDecktop(tp,7)
local og=sg:Filter(cm.rmcheck,nil)
Duel.Remove(og,POS_FACEUP,REASON_EFFECT)
end
end
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x442) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_REMOVED,0,nil,e,tp)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
tc:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EFFECT_CANNOT_SUMMON)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
function cm.splimit(e,c)
return not c:IsSetCard(0x442)
end
\ No newline at end of file
--动物朋友 西六线风鸟
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33701355
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_DECK)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CUSTOM+33700000)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local f1=function(tp,re,rp)
return tp~=rp
end
local e2=rsef.QO(c,EVENT_CHAINING,{m,1},1,"tg,neg","dsp,dcal",LOCATION_MZONE,rscon.negcon(f1),nil,cm.tg2,cm.op2)
if not aux.Monster_Friend_Excavate_check then
aux.Monster_Friend_Excavate_check=true
_confirmdeckgroup=Duel.ConfirmDecktop
function Duel.ConfirmDecktop(tp,count)
local re,rp=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local eg=Duel.GetDecktopGroup(tp,count)
Duel.RaiseEvent(eg,EVENT_CUSTOM+33700000,re,0,rp,tp,count)
return _confirmdeckgroup(tp,count)
end
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x442) and eg:IsContains(e:GetHandler()) and eg:GetClassCount(Card.GetCode)==#eg
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<15 then return false end
local g=Duel.GetDecktopGroup(tp,15)
return g:FilterCount(Card.IsAbleToGrave,nil)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3)
local codect=rg:GetClassCount(Card.GetCode)
if #rg<=0 or codect<#rg then return end
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsAbleToGrave() and rc:IsType(TYPE_MONSTER)
end
if rg:IsExists(f,3,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
if Duel.SendtoGrave(rg,REASON_EFFECT)~=0 then
Duel.NegateActivation(ev)
end
end
end
\ No newline at end of file
--动物朋友 华美风鸟
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33701356
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CUSTOM+33700000)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=rsef.QO(c,EVENT_SPSUMMON_SUCCESS,{m,1},1,"tg,th",nil,LOCATION_MZONE,cm.con,nil,cm.tg2,cm.op2)
if not aux.Monster_Friend_Excavate_check then
aux.Monster_Friend_Excavate_check=true
_confirmdeckgroup=Duel.ConfirmDecktop
function Duel.ConfirmDecktop(tp,count)
local re,rp=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local eg=Duel.GetDecktopGroup(tp,count)
Duel.RaiseEvent(eg,EVENT_CUSTOM+33700000,re,0,rp,tp,count)
return _confirmdeckgroup(tp,count)
end
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x442) and eg:IsContains(e:GetHandler()) and eg:GetClassCount(Card.GetCode)==#eg
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function (c) return c:GetSummonPlayer()==1-tp and c:IsAbleToHand() end ,1,nil)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<15 then return false end
local g=Duel.GetDecktopGroup(tp,15)
return g:FilterCount(Card.IsAbleToGrave,nil)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3)
local codect=rg:GetClassCount(Card.GetCode)
local og=eg:Filter(function (c) return c:GetSummonPlayer()==1-tp and c:IsAbleToHand() end,nil)
if og:GetCount()==0 then return end
if #rg<=0 or codect<#rg then return end
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsAbleToGrave() and rc:IsType(TYPE_MONSTER)
end
if rg:IsExists(f,3,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
if Duel.SendtoGrave(rg,REASON_EFFECT)~=0 then
Duel.SendtoHand(og,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--动物朋友 GothicxLuck
local m=33701357
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,33701355,33701356,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_ONFIELD+LOCATION_HAND,0,Duel.SendtoGrave,REASON_COST)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CUSTOM+33700000)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
end
function cm.check(c,re)
return c:IsSetCard(0x442) and re:GetHandler():IsSetCard(0x442) and c:IsLocation(LOCATION_DECK)
end
function cm.spcheck(c,re,e,tp)
return c:IsSetCard(0x442) and re:GetHandler():IsSetCard(0x442) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLocation(LOCATION_DECK)
end
function cm.thcheck(c,re)
return c:IsSetCard(0x442) and re:GetHandler():IsSetCard(0x442) and c:IsAbleToHand() and c:IsLocation(LOCATION_DECK)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.check,1,nil,re)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local check=e:GetHandler():GetSequence()>4
if chk==0 then
if check then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(cm.spcheck,1,nil,re,e,tp)
else
return eg:IsExists(cm.thcheck,1,nil,re)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local check=e:GetHandler():GetSequence()>4
if check then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(cm.spcheck,1,nil,re,e,tp) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=eg:Filter(cm.spcheck,nil,re,e,tp)
ft=math.min(ft,#sg)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
sg=sg:SelectSubGroup(tp,aux.dncheck,false,1,ft)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
else
if eg:IsExists(cm.thcheck,1,nil,re) then
local sg=eg:Filter(cm.thcheck,nil,re)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local ag=sg:SelectSubGroup(tp,aux.dncheck,false,1,3)
Duel.SendtoHand(ag,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,ag)
end
end
end
end
\ No newline at end of file
--兽质的重生
function c33701358.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--deck check 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33701358,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c33701358.spcost)
e2:SetTarget(c33701358.sptg)
e2:SetOperation(c33701358.spop)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetCondition(c33701358.sdcon)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(33701358,ACTIVITY_SPSUMMON,c33701358.counterfilter)
end
function c33701358.sdcon(e)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
if g:GetCount()==0 then return false end
return not g:GetClassCount(Card.GetCode,nil)==g:GetCount()
end
function c33701358.counterfilter(c)
return c:IsSetCard(0x442)
end
function c33701358.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(33701358,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c33701358.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c33701358.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x442)
end
function c33701358.spfilter(c,e,tp)
return c:IsSetCard(0x442) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33701358.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 and Duel.GetMatchingGroupCount(c33701358.spfilter,tp,LOCATION_DECK,0,nil,e,tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33701358.spop(e,tp,eg,ep,ev,re,r,rp)
if not (e:GetHandler():IsRelateToEffect(e) and Duel.GetFieldGroup(tp,LOCATION_DECK,0)>2) then return end
local sg=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3)
if sg:GetClassCount(Card.GetCode,nil)==3 and sg:IsExists(c33701358.spfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:FilterSelect(tp,c33701358.spfilter,1,1,nil,e,tp):GetFirst()
Duel.DisableShuffleCheck()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
sg:RemoveCard(tc)
sg=sg:Filter(Card.IsLocation,nil,LOCATION_DECK)
Duel.SortDecktop(tp,tp,sg:GetCount())
if Duel.SelectYesNo(tp,aux.Stringid(33701358,1)) then
for i=1,sg:GetCount() do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
end
\ No newline at end of file
--跨世界线勇跃锦标赛
local m=33701364
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<1 or (not c:IsRelateToEffect(e)) then return end
Duel.ConfirmCards(tp,g)
if g:GetClassCount(Card.GetCode)<=5 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
--Effect Draw
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_FZONE)
e0:SetCode(EFFECT_CHANGE_DAMAGE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(0,1)
e0:SetValue(cm.val)
c:RegisterEffect(e0)
end
if g:GetClassCount(Card.GetCode)>=30 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_FZONE)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.val1)
c:RegisterEffect(e1)
end
if g:GetClassCount(Card.GetCode)>=40 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(cm.val2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
if g:GetClassCount(Card.GetCode)>=52 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetValue(cm.target)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1)
e5:SetOperation(cm.actop)
c:RegisterEffect(e5)
end
end
function cm.val(e,re,dam,r,rp,rc)
return dam*3
end
function cm.val1(e,re,dam,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then
return 0
end
return val
end
function cm.val2(e,re,dam,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 then
return 0
end
return val
end
function cm.target(e,c)
return c~=e:GetHandler()
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) and ep==tp then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
--乘上加帕里节奏!
local m=33701366
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCost(cm.cost)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsSetCard(0x442) and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.adcheck(c)
return c:IsSetCard(0x442) and c:IsAbleToHand()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=tp
local num=Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.filter,p,LOCATION_GRAVE+LOCATION_HAND,0,1,num,nil)
if g:GetCount()>0 then
local ct=Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
Duel.BreakEffect()
local sg=Duel.GetDecktopGroup(tp,ct)
Duel.ConfirmDecktop(tp,ct)
if sg:GetClassCount(Card.GetCode)==sg:GetCount() then
local og=sg:Filter(cm.adcheck,nil)
sg:Sub(og)
Duel.DisableShuffleCheck()
Duel.SendtoHand(og,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,og)
if sg:GetCount()==0 then Duel.ShuffleDeck(tp) return end
local op=Duel.SelectOption(p,aux.Stringid(m,2),aux.Stringid(m,3))
if op==0 then
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
end
end
function cm.disfilter(c)
return c:IsDiscardable() and c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.disfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_COST)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.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
......@@ -65,7 +65,8 @@ function cm.clear(e,tp,eg,ep,ev,re,r,rp)
end
function cm.spcon(e,c)
if c==nil then return true end
return #Monster_Friend_Time>2
local tp=c:GetControler()
return #Monster_Friend_Time>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......@@ -81,6 +82,7 @@ function cm.poop(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetValue(cm.val)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
if #Monster_Friend_Time>6 then
......@@ -90,6 +92,7 @@ function cm.poop(e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......@@ -100,13 +103,14 @@ function cm.poop(e,tp,eg,ep,ev,re,r,rp)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(cm.tgtg)
e5:SetOperation(cm.tgop)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
end
end
end
......
......@@ -65,7 +65,8 @@ function cm.clear(e,tp,eg,ep,ev,re,r,rp)
end
function cm.spcon(e,c)
if c==nil then return true end
return #Monster_Friend_Time>2
local tp=c:GetControler()
return #Monster_Friend_Time>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......@@ -78,18 +79,19 @@ function cm.poop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
if #Monster_Friend_Time>2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(cm.setcheck,tp,LOCATION_DECK,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,cm.setcheck,tp,LOCATION_DECK,0,1,1,nil)
Duel.SSet(tp,sg)
end
if #Monster_Friend_Time>4 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.cpcost)
e1:SetTarget(cm.cptg)
e1:SetOperation(cm.cpop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if #Monster_Friend_Time>6 then
......@@ -101,6 +103,7 @@ function cm.poop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
......
--动物朋友 桃红豹
local m=33701382
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x40)
--link summon
aux.AddLinkProcedure(c,nil,2,3,cm.lcheck)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(cm.condition)
e2:SetOperation(cm.counter)
c:RegisterEffect(e2)
--
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x40,3,REASON_COST) end
c:RemoveCounter(tp,0x40,3,REASON_COST)
end
function cm.lcheck(g)
return g:IsExists(Card.IsSetCard,1,nil,0x442)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x442)
end
function cm.counter(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x40,1,true)
end
function cm.spfilter(c,e,tp,zone)
local ok=false
for p=0,1 do
local zone=e:GetHandler():GetLinkedZone(p)&0xff
ok=ok or (Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER))
end
return ok
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone(tp)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local zone={}
local flag={}
for p=0,1 do
zone[p]=c:GetLinkedZone(p)&0xff
local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[p])
flag[p]=(~flag_tmp)&0x7f
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,flag)
local sc=g:GetFirst()
if sc then
local ava_zone=0
for p=0,1 do
if sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sump=0
if sel_zone&0xff>0 then
sump=tp
else
sump=1-tp
sel_zone=sel_zone>>16
end
Duel.SpecialSummon(sc,0,tp,sump,false,false,POS_FACEUP_DEFENSE,sel_zone)
end
end
\ No newline at end of file
--加帕里探险队记录
local m=33701396
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.check(c)
return c:IsAbleToRemove() and c:IsSetCard(0x442)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK,0,1,7,nil)
local tg=g:GetFirst()
if tg==nil then return end
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
if og:GetCount()>0 then
for tc in aux.Next(og) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,aux.Stringid(m,2))
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.adcheck(c)
return c:IsAbleToHand() and c:GetFlagEffect(m)~=0
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.adcheck,tp,LOCATION_REMOVED,0,1,nil) then
e:Reset()
end
return Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(cm.adcheck,tp,LOCATION_REMOVED,0,1,nil)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.adcheck,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x442) and re:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
--动物朋友编年史
local m=33701409
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode,nil)==g:GetCount()
end
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:IsFaceup() and c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,g:GetCount(),nil)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,g:GetCount())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:GetCount()>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e2,tp)
end
if og:GetCount()>6 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_DRAW)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END,3)
e1:SetCondition(cm.condition1)
e1:SetOperation(cm.operation)
Duel.RegisterEffect(e1,tp)
end
if og:GetCount()>14 then
Duel.Recover(tp,1000*og:GetCount(),REASON_EFFECT)
end
end
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,nil)
if ct>=7 then e:Reset() return end
local ct=7-ct
Duel.Draw(tp,ct,REASON_EFFECT)
Duel.BreakEffect()
local rg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
Duel.ConfirmCards(1-tp,rg)
if rg:GetClassCount(Card.GetCode)~=#g then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--虚拟YouTuber 坚韧的梓璃梦
local m=33701418
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
cm.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(cm.splimit)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_DAMAGE)
e3:SetCondition(cm.atkcon)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_GRAVE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.splimit(e,se,sp,st)
return Duel.GetCustomActivityCount(m,sp,ACTIVITY_SPSUMMON)==0
end
function cm.counterfilter(c)
return not c:IsLocation(LOCATION_EXTRA)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(c:GetSummonPlayer(),m,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.AddSynchroProcedure(c,f1,f2,minc,maxc)
if maxc==nil then maxc=99 end
local e1=Effect.CreateEffect(c)
e1:SetDescription(1164)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cm.SynCondition(f1,f2,minc,maxc))
e1:SetTarget(cm.SynTarget(f1,f2,minc,maxc))
e1:SetOperation(cm.SynOperation(f1,f2,minc,maxc))
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
end
function cm.SynMaterialFilter(c,syncard)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
function cm.GetSynMaterials(tp,syncard)
local mg=Duel.GetMatchingGroup(cm.SynMaterialFilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,syncard)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_HAND,0,nil,syncard)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
return mg
end
function cm.check(c,syncard)
return c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or (c:IsLocation(LOCATION_HAND) and c:IsAbleToGrave()))
end
function cm.SynCondition(f1,f2,minc,maxc)
return function(e,c,smat,mg,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg1=Group.CreateGroup()
local tp=c:GetControler()
if not mg then
mg=cm.GetSynMaterials(tp,c)
if Duel.GetFlagEffect(c:GetControler(),m)==0 then
local sg=Duel.GetMatchingGroup(cm.check,tp,LOCATION_HAND+LOCATION_REMOVED,0,nil,c)
mg:Merge(sg)
mg1=mg
end
else
mg1=mg
end
if smat and smat:IsType(TYPE_TUNER) and (not f1 or f1(smat)) then
return Duel.CheckTunerMaterial(c,smat,f1,f2,minc,maxc,mg1) end
return Duel.CheckSynchroMaterial(c,f1,f2,minc,maxc,smat,mg1)
end
end
function cm.SynTarget(f1,f2,minc,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,smat,mg,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg1=Group.CreateGroup()
if not mg then
mg=cm.GetSynMaterials(tp,c)
if Duel.GetFlagEffect(c:GetControler(),m)==0 then
local sg=Duel.GetMatchingGroup(cm.check,tp,LOCATION_HAND+LOCATION_REMOVED,0,nil,c)
mg:Merge(sg)
mg1=mg
end
else
mg1=mg
end
local g=nil
if smat and smat:IsType(TYPE_TUNER) and (not f1 or f1(smat)) then
g=Duel.SelectTunerMaterial(c:GetControler(),c,smat,f1,f2,minc,maxc,mg1)
else
g=Duel.SelectSynchroMaterial(c:GetControler(),c,f1,f2,minc,maxc,smat,mg1)
end
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function cm.SynOperation(f1,f2,minct,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,smat,mg,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
local rg=g:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
Duel.SendtoGrave(rg,REASON_MATERIAL+REASON_SYNCHRO+REASON_RETURN)
g:Sub(rg)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ev)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Damage(tp,2000,REASON_EFFECT) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -7,7 +7,6 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,34512021)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.rectg)
e1:SetOperation(cm.recop)
......@@ -17,7 +16,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(cm.condition)
e2:SetCost(aux.bfgcost)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -44,7 +44,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
......
......@@ -179,6 +179,10 @@
#零儿/02 648&650
!setname 0x6da0 幻梦迷境
!setname 0x9da0 星光歌剧
!setname 0x641a 神代丰
#ღ/蝶
!setname 0x3e12 饮食艺术
#星眼 334 0x340-0x34f
!setname 0x340 灵装
......@@ -534,6 +538,7 @@
!setname 0x3f3e 灵核机
!setname 0x5f3e Pecftlcus(未来圣罚)
!setname 0x6f3e Se7en(罪名)
!setname 0x3f3f 死蔷薇
!counter 0xf3 陨星指示物
!counter 0xf3c 幻象指示物
!counter 0x1f35 龙鳞指示物
......@@ -551,6 +556,7 @@
!setname 0x1313 神欲
!setname 0x3313 神欲下仆
!setname 0x6313 伊迦塔斯 Ichyaltas
!setname 0x4315 木灵
!setname 0x0310 燧烽
!setname 0x3310 赤燧烽
!setname 0x5310 苍燧烽
......@@ -640,6 +646,7 @@
!setname 0x87af 方舟骑士
!setname 0x77af 深海猎人
!setname 0x87ab 机影
!setname 0x87ac 钢铁方舟
!counter 0x10ae 战术指示物
#空想上の人格保持者
......@@ -666,6 +673,7 @@
!setname 0xfd07 源生
#飄上月球の不死煙 2338626051 724 0x720-0x72f
!setname 0x720 大庭院
!setname 0xc727 /无畏
!setname 0x6728 神花
!setname 0xe728 神花姬
......@@ -724,6 +732,7 @@
!setname 0x625 迷石宫
!setname 0x1625 风海帆
!setname 0x628 哈伊瓦纳斯 Haiiwanas
!setname 0x62b Roaring Flare
#MEKK
!setname 0x730 圣印
......@@ -815,7 +824,7 @@
!setname 0x3276 械龙铠
!counter 0x3276 械龙铠指示物
#???
#AD钙 537 0x530-0x53f
!setname 0x3530 惧轮
!setname 0x3531 大祭环
!setname 0x5531 迫真空手
......@@ -837,7 +846,6 @@
!setname 0x353d 吞天铠
!setname 0x353e 皮猫
!counter 0x153a Q指示物
!setname 0x720 大庭院
!setname 0xc531 不息轮
......
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