Commit a94196ab authored by Nemo Ma's avatar Nemo Ma

0216 wd

parent 1f9c4ec4
......@@ -48,6 +48,7 @@
700023 0
700024 0
700025 0
3679515 0
4865004 0
4865007 0
4865008 0
......@@ -167,6 +168,16 @@
11591111 0
11591112 0
11662004 0
11845760 0
11845762 0
11845764 0
11845766 0
11845768 0
11845769 0
11845771 0
11845772 0
11845773 0
11845775 0
12070000 0
12070001 0
12070002 0
......@@ -1866,6 +1877,7 @@
99700295 0
99700296 0
99700298 0
106556909 0
108740000 0
108740001 0
108740002 0
......@@ -1930,6 +1942,7 @@
118939991 0
118973938 0
119041155 0
119044827 0
119102057 0
119150521 0
119799730 0
......@@ -2008,6 +2021,25 @@
211000010 0
211000011 0
211000012 0
260013001 0
260013002 0
260013003 0
260013004 0
260013008 0
260013009 0
260013010 0
260013011 0
260013012 0
260013013 0
260013015 0
260013016 0
260013018 0
260013020 0
260013024 0
260013027 0
260013028 0
260013029 0
260013035 0
#Semi-Wild 1003
31409200 0
31409201 0
......
No preview for this file type
--真红眼黑魔龙
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.cpcon)
e1:SetCost(s.cpcost1)
e1:SetTarget(s.cptg)
e1:SetOperation(s.cpop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(s.cpcost2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(s.tdcon)
e3:SetTarget(s.tdtg)
e3:SetOperation(s.tdop)
c:RegisterEffect(e3)
end
function s.listfilter(c)
return c:IsCode(92353449,6172122,32566831,45410988,18803791,52684508)
end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.costfilter(c)
if not (s.listfilter(c) and bit.band(c:GetType(),0x82)==c:GetType() and c:IsAbleToGraveAsCost()) then return end
local ae=c:CheckActivateEffect(true,true,false)
return ae and (not ae:IsHasCategory(CATEGORY_SPECIAL_SUMMON) or Duel.IsPlayerCanSpecialSummonCount(tp,2))
end
function s.cpcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
e:SetLabelObject(g:GetFirst():CheckActivateEffect(true,true,false))
Duel.SendtoGrave(g,REASON_COST)
end
function s.cpcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabelObject(g:GetFirst():CheckActivateEffect(true,true,false))
Duel.SendtoGrave(g,REASON_COST)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local te=e:GetLabelObject()
if chkc then
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc,c)
end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
e:SetProperty(te:GetProperty())
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(HALF_DAMAGE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil)
end
function s.tdfilter(c)
return c:IsSetCard(0x3b) and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.setfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsCode(74677422) and not sc:IsCode(74677422) then return end
local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
end
This diff is collapsed.
-- 白数契约 塞恩
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg1)
e1:SetOperation(s.thop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--fusion summon
local e3= Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id, 1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.fustg)
e3:SetOperation(s.fusop)
c:RegisterEffect(e3)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_CYBERSE) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.filter2,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 mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.fusop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,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 fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function s.thfilter1(c)
return c:IsSetCard(0xf80) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and not c:IsCode(id)
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1 - tp,g)
end
end
\ No newline at end of file
local s,id,o = GetID()
function s.initial_effect(c)
-- 效果①:检索
local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
-- 效果②:融合召唤
local e2 = Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id, 1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) -- 修改计数限制参数
e2:SetTarget(s.fustg)
e2:SetOperation(s.fusop)
c:RegisterEffect(e2)
-- 效果③:抽卡
local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id, 2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.drcon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c:IsSetCard(0xf80) and c:IsAbleToHand()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_CYBERSE) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.filter2,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 mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.fusop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,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 fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
-- 效果③条件
function s.drcon(e, tp)
return e:GetHandler():IsReason(REASON_FUSION)
end
-- 效果③目标
function s.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 s.drop(e, tp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Draw(p, d, REASON_EFFECT)
end
\ No newline at end of file
--白数契约 泰哲尔
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) or c:IsSetCard(0xf80)and c:IsFaceup()
and c:IsRace(RACE_CYBERSE)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.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.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.thfilter(c)
return c:IsSetCard(0xf80) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT)
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
-- 数契尖兵 阿尔法之座
local s,id,o= GetID()
function s.initial_effect(c)
-- 融合召唤
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,s.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),2,2,true,true,s.fcheck)
-- 效果①:融合召唤
local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.fuscon)
e1:SetTarget(s.fustg)
e1:SetOperation(s.fusop)
c:RegisterEffect(e1)
-- 效果②:额外攻击
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--
local e3 = Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.drcon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.ffilter(c)
return c:IsSetCard(0xf80) and c:IsType(TYPE_MONSTER)
end
--融合素材筛选器
function s.fcheck(g,lc)
return g:IsExists(Card.IsFusionType,3,nil,(TYPE_MONSTER))
end
-- 效果①条件
function s.fuscon(e, tp, eg, ep, ev, re, r, rp)
return true
end
-- 效果①目标
function s.fusfilter(c, e, tp, m, f, chkf)
return c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false)
and c:CheckFusionMaterial(m, nil, chkf)
end
function s.fustg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
local chkf = tp
local mg1 = Duel.GetMatchingGroup(Card.IsAbleToRemove, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE, 0, nil)
local res = Duel.IsExistingMatchingCard(s.fusfilter, 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 mf = ce:GetValue()
res = Duel.IsExistingMatchingCard(s.fusfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, mg2, mf, chkf)
end
end
return res
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
-- 效果①操作
function s.fusop(e, tp, eg, ep, ev, re, r, rp)
local chkf = tp
local mg1 = Duel.GetMatchingGroup(Card.IsAbleToRemove, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE, 0, nil)
local sg1 = Duel.GetMatchingGroup(s.fusfilter, tp, LOCATION_EXTRA, 0, nil, e, tp, mg1, nil, chkf)
local mg2 = nil
local sg2 = nil
local ce = Duel.GetChainMaterial(tp)
if ce ~= nil then
local fgroup = ce:GetTarget()
mg2 = fgroup(ce, e, tp)
local mf = ce:GetValue()
sg2 = Duel.GetMatchingGroup(s.fusfilter, tp, LOCATION_EXTRA, 0, nil, e, tp, mg2, mf, chkf)
end
if sg1:GetCount() > 0 or (sg2 ~= nil and sg2:GetCount() > 0) then
local sg = sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local tg = sg:Select(tp, 1, 1, nil)
local tc = tg:GetFirst()
local mat = nil
if sg1:IsContains(tc) and (sg2 == nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp, ce:GetDescription())) then
mat = Duel.SelectFusionMaterial(tp, tc, mg1, nil, chkf)
Duel.Remove(mat, POS_FACEUP, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION)
else
mat = Duel.SelectFusionMaterial(tp, tc, mg2, nil, chkf)
local fop = ce:GetOperation()
fop(ce, e, tp, tc, mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP)
tc:CompleteProcedure()
end
end
-- 效果②额外攻击数量
function s.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_MZONE,0,nil,TYPE_FUSION)-1 -- 排除自身
end
-- 效果③条件
function s.drcon(e, tp, eg, ep, ev, re, r, rp)
return true
end
-- 效果③目标
function s.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 s.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
\ No newline at end of file
-- 数契尖兵 宇普西龙斩
local s, id ,o= GetID()
function s.initial_effect(c)
-- 融合召唤
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,s.ffilter1,s.ffilter2, 2, 2,true, true) --②删去s.fcheck
-- 效果①:特殊召唤成功时,选卡返回卡组
local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1, id)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetCondition(s.atkcon)
e3:SetCost(s.atkcost)
e3:SetOperation(s.atkop)
c:RegisterEffect(e3)
end
function s.fcheck(g,lc)
return g:IsExists(Card.IsFusionType,3,nil,(TYPE_MONSTER))
end
function s.ffilter1(c)
return c:IsSetCard(0xf80) and c:IsType(TYPE_MONSTER)
end
function s.ffilter2(c)
return (c:IsFusionType(TYPE_FUSION) or c:IsFusionType(TYPE_SYNCHRO) or c:IsFusionType(TYPE_XYZ) or c:IsFusionType(TYPE_LINK)) and c:IsRace(RACE_CYBERSE)
end
-- 效果①目标筛选函数,修改为可检查对手区域的卡片
function s.tdfilter(c)
return c:IsAbleToDeck()
end
-- 效果①目标设定函数,增加对手区域的检查
function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
local owng = Duel.IsExistingMatchingCard(s.tdfilter, tp, LOCATION_ONFIELD + LOCATION_GRAVE + LOCATION_REMOVED, 0, 1, nil)
local oppg = Duel.IsExistingMatchingCard(s.tdfilter, 1 - tp, LOCATION_ONFIELD + LOCATION_GRAVE + LOCATION_REMOVED, 0, 1, nil)
return owng or oppg
end
Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, 0, LOCATION_ONFIELD + LOCATION_GRAVE + LOCATION_REMOVED)
Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, 1, LOCATION_ONFIELD + LOCATION_GRAVE + LOCATION_REMOVED)
end
-- 效果①操作函数,增加对手区域的选择
function s.tdop(e, tp, eg, ep, ev, re, r, rp)
local owng = Duel.GetMatchingGroup(s.tdfilter, tp, LOCATION_ONFIELD + LOCATION_GRAVE + LOCATION_REMOVED, 0, nil)
local oppg = Duel.GetMatchingGroup(s.tdfilter, 1 - tp, LOCATION_ONFIELD + LOCATION_GRAVE + LOCATION_REMOVED, 0, nil)
local g = owng:Clone()
g:Merge(oppg)
if #g > 0 then
local sg = g:Select(tp, 1, 5, nil)
Duel.SendtoDeck(sg, nil, 1, REASON_EFFECT)
end
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:GetAttack()>0
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(id)==0 end
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
end
end
\ No newline at end of file
-- 数契尖兵 贝塔的信条
local s,id,o=GetID()
function s.initial_effect(c)
-- 融合召唤
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,s.ffilter1,s.ffilter2,1,1,true,true)
-- 效果①:检索并盖放
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
-- 效果②:无效并返回卡组
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.negcon)
e2:SetCost(s.negcost)
e2:SetTarget(aux.nbtg)
e2:SetOperation(s.negop)
c:RegisterEffect(e2)
end
function s.fcheck(g,lc)
return g:IsExists(Card.IsFusionType,2,nil,(TYPE_MONSTER))
end
function s.ffilter1(c)
return c:IsSetCard(0xf80) and c:IsType(TYPE_MONSTER)
end
function s.ffilter2(c)
return c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.thcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.thfilter(c)
return c:IsSetCard(0xf80) and (c:IsAbleToHand() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()))
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,
LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp, s.thfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
if #g > 0 then
if Duel.SendtoHand(g, nil, REASON_EFFECT) then
local dc = Duel.GetOperatedGroup():GetFirst()
if dc:IsType(TYPE_QUICKPLAY + TYPE_TRAP) and dc:IsSSetable()
and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
Duel.BreakEffect()
if Duel.SSet(tp, dc, tp, false) == 0 then return end
if dc:IsType(TYPE_QUICKPLAY) then
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id, 2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
dc:RegisterEffect(e1)
end
if dc:IsType(TYPE_TRAP) then
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id, 2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
dc:RegisterEffect(e1)
end
end
end
Duel.ConfirmCards(1 - tp, g)
end
end
function s.costfilter(c)
return c:IsRace(RACE_CYBERSE)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsRace,1,false,nil,nil,RACE_CYBERSE,LOCATION_HAND+LOCATION_MZONE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,false,nil,nil,RACE_CYBERSE,LOCATION_HAND+LOCATION_MZONE)
Duel.Release(g,REASON_COST)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
-- 数契约融合
local s, id, o = GetID()
function s.initial_effect(c)
-- 融合效果
local e3 = Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1, id, EFFECT_COUNT_CODE_OATH)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.activate)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsRace(RACE_CYBERSE)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(11845771,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
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:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e, c)
return not c:IsSetCard(0xf80)
end
function s.filter1(c, e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c, e, tp, m, f, chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_CYBERSE)
and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false)
and c:CheckFusionMaterial(m, nil, chkf)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
local chkf = tp
local mg1 = Duel.GetMatchingGroup(Card.IsAbleToGrave, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_EXTRA, 0, nil)
local res = Duel.IsExistingMatchingCard(s.filter2, 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 mf = ce:GetValue()
res = Duel.IsExistingMatchingCard(s.filter2, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, mg2, mf, chkf)
end
end
return res
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
-- 融合效果操作
function s.activate(e, tp, eg, ep, ev, re, r, rp)
local chkf = tp
local mg1 = Duel.GetMatchingGroup(Card.IsAbleToGrave, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_EXTRA, 0, nil):Filter(s.filter1, nil, e)
local sg1 = Duel.GetMatchingGroup(s.filter2, tp, LOCATION_EXTRA, 0, nil, e, tp, mg1, nil, chkf)
local mg2 = nil
local sg2 = nil
local ce = Duel.GetChainMaterial(tp)
if ce ~= nil then
local fgroup = ce:GetTarget()
mg2 = fgroup(ce, e, tp)
local mf = ce:GetValue()
sg2 = Duel.GetMatchingGroup(s.filter2, tp, LOCATION_EXTRA, 0, nil, e, tp, mg2, mf, chkf)
end
if sg1:GetCount() > 0 or (sg2 ~= nil and sg2:GetCount() > 0) then
local sg = sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local tg = sg:Select(tp, 1, 1, nil)
local tc = tg:GetFirst()
if tc and tc:IsType(TYPE_MONSTER) then
if sg1:IsContains(tc) and (sg2 == nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp, ce:GetDescription())) then
local mat1 = Duel.SelectFusionMaterial(tp, tc, mg1, nil, chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1, 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 fop = ce:GetOperation()
fop(ce, e, tp, tc, mat2)
end
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
local s, id = GetID()
function s.initial_effect(c)
--activate
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE + CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1, id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--search
local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1, id)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
-- 修改后的筛选函数,加入怪兽筛选、相同卡名最多1张的限制
function s.rmfilter(c, g)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf80) and ((not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsAbleToRemove())
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE,0,nil)
if chk == 0 then
return Duel.IsExistingMatchingCard(s.rmfilter, tp, LOCATION_HAND + LOCATION_GRAVE + LOCATION_MZONE, 0, 1, nil, nil)
and Duel.IsExistingMatchingCard(nil, tp, 0, LOCATION_ONFIELD, 1, nil)
and g:GetClassCount(Card.GetCode)>=2
end
Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 1, tp, LOCATION_HAND + LOCATION_GRAVE + LOCATION_MZONE)
local g = Duel.GetMatchingGroup(nil, tp, 0, LOCATION_ONFIELD, nil)
Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
local dg = Duel.GetMatchingGroup(nil, tp, 0, LOCATION_ONFIELD, nil)
local ct = dg:GetCount()
local g = Duel.GetMatchingGroup(s.rmfilter, tp, LOCATION_HAND + LOCATION_GRAVE + LOCATION_MZONE, 0, nil, nil)
if ct == 0 or g:GetCount() == 0 then
return
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
aux.GCheckAdditional = aux.dlvcheck
local rg = g:SelectSubGroup(tp, aux.TRUE, false, 1, ct)
aux.GCheckAdditional = nil
local rc = Duel.Remove(rg, POS_FACEUP, REASON_EFFECT)
if rc > 0 then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
local sg = dg:Select(tp, rc, rc, nil)
Duel.HintSelection(sg)
Duel.Remove(sg, POS_FACEUP, REASON_EFFECT)
end
end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
return bit.band(r, REASON_EFFECT) ~= 0
end
function s.thfilter(c)
return c:IsType(TYPE_SPELL + TYPE_TRAP) and c:IsSetCard(0xf80) and c:IsAbleToHand()
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.IsExistingMatchingCard(s.thfilter, tp, LOCATION_DECK, 0, 1, nil)
end
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.thop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp, s.thfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
if g:GetCount() > 0 then
Duel.SendtoHand(g, nil, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, g)
end
end
\ No newline at end of file
function c11845773.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11845773+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c11845773.cost)
e1:SetTarget(c11845773.target)
e1:SetOperation(c11845773.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(11845773,ACTIVITY_SPSUMMON,c11845773.counterfilter)
end
function c11845773.counterfilter(c)
return c:IsRace(RACE_CYBERSE)
end
function c11845773.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(11845773,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
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:SetTarget(c11845773.splimit)
Duel.RegisterEffect(e1,tp)
end
function c11845773.splimit(e, c, sump, sumtype, sumpos, targetp, se)
return not c:IsRace(RACE_CYBERSE)
end
function c11845773.spfilter(c,e,tp)
return c:IsSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c11845773.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11845773.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c11845773.tgfilter(c,mc)
return c:IsSetCard(0xf80) and c:IsType(TYPE_MONSTER) and c:IsAttribute(mc:GetAttribute()) and not c:IsLevel(mc:GetLevel()) and c:IsAbleToGrave()
end
function c11845773.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11845773.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local tg=Duel.GetMatchingGroup(c11845773.tgfilter,tp,LOCATION_EXTRA,0,nil,g:GetFirst())
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11845773,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=tg:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
\ No newline at end of file
function c11845775.initial_effect(c)
--Activate
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE + CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1, 11845775 + EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c11845775.condition)
e1:SetTarget(aux.nbtg)
e1:SetOperation(c11845775.activate)
c:RegisterEffect(e1)
end
function c11845775.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf80)
end
function c11845775.condition(e, tp, eg, ep, ev, re, r, rp)
return Duel.IsExistingMatchingCard(c11845775.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c11845775.activate(e, tp, eg, ep, ev, re, r, rp)
local tc = re:GetHandler()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(re) then
Duel.SendtoDeck(eg, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
end
end
\ No newline at end of file
This diff is collapsed.
--天霆号 雷火沸动机
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1be),4,2,s.ovfilter,aux.Stringid(id,0),99,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH|CATEGORY_SPECIAL_SUMMON|CATEGORY_DECKDES|CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.discost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1be)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.thfilter(c,e,tp,tc)
if not (c:IsSetCard(0x1be) and c:IsType(TYPE_MONSTER)) then return false end
return c:IsAbleToHand() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) or tc:IsType(TYPE_XYZ) and c:IsCanOverlay()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c)
local tc=g:GetFirst()
local op=aux.SelectFromOptions(tp,{tc:IsAbleToHand(),1190},{Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false),1152},{c:IsType(TYPE_XYZ) and tc:IsCanOverlay(),aux.Stringid(id,1)})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif op==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Overlay(c,tc)
end
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x1be) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA)
end
function s.mtfilter(c,e)
return c:IsSetCard(0x1be) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
function s.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRank(4) and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if sg:GetCount()>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
local xc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e)
if mg:GetCount()>0 then
Duel.Overlay(xc,mg)
end
end
end
This diff is collapsed.
--自然妖精·蒲公英
function c3679515.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c3679515.matfilter,1,1)
c:EnableReviveLimit()
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(3679515)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
--force mzone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_USE_MZONE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_EXTRA,LOCATION_EXTRA)
e2:SetTarget(c3679515.target)
e2:SetValue(c3679515.frcval)
c:RegisterEffect(e2)
--synchro summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(3679515,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c3679515.syncon)
e0:SetTarget(c3679515.syntg)
e0:SetOperation(c3679515.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
--chain check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_ACTIVATING)
e3:SetOperation(c3679515.chainop)
Duel.RegisterEffect(e3,0)
--
if not c3679515.globle_check then
c3679515.globle_check=true
--synchro summon
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
ge1:SetTargetRange(LOCATION_EXTRA,0)
ge1:SetTarget(c3679515.target2)
ge1:SetLabelObject(e0)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetLabelObject(e0)
Duel.RegisterEffect(ge2,1)
--fusion summon
_hack_fusion_check=Card.CheckFusionMaterial
function Card.CheckFusionMaterial(card,Group_fus,Card_g,int_chkf,not_mat)
local exg=Group.CreateGroup()
local zone=c3679515.checkzone(card:GetControler())
if card:IsSetCard(0x2a) and Duel.GetFlagEffect(card:GetControler(),3679515)==0 then
exg=Duel.GetMatchingGroup(c3679515.filter0,int_chkf,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0,nil)
if exg:GetCount()>0 and Duel.GetLocationCountFromEx(card:GetControler(),card:GetControler(),exg,card,zone)>0 then
Group_fus:Merge(exg)
if Duel.GetFlagEffect(0,3679516)~=0 then
card:RegisterFlagEffect(3679515,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetLabelObject(card)
e1:SetOperation(c3679515.limitop)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,card:GetControler())
end
end
end
return _hack_fusion_check(card,Group_fus,Card_g,int_chkf,not_mat)
end
_SelectFusionMaterial=Duel.SelectFusionMaterial
function Duel.SelectFusionMaterial(player,card,group,groupc,chkf)
if card:GetFlagEffect(3679515)~=0 then
local mg=_SelectFusionMaterial(player,card,group,groupc,chkf)
local tc=mg:GetFirst()
while tc do
tc:RegisterFlagEffect(3679516,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
tc=mg:GetNext()
end
return mg
end
return _SelectFusionMaterial(player,card,group,groupc,chkf)
end
_SendtoGrave=Duel.SendtoGrave
function Duel.SendtoGrave(tg,reason)
if reason~=REASON_EFFECT+REASON_MATERIAL+REASON_FUSION or aux.GetValueType(tg)~="Group" then
return _SendtoGrave(tg,reason)
end
local rg=tg:Filter(c3679515.filter1,nil)
tg:Sub(rg)
local ct1=_SendtoGrave(tg,reason)
local ct2=Duel.Remove(rg,POS_FACEUP,reason)
return ct1+ct2
end
end
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(3679515,0))
--e3:SetType(EFFECT_TYPE_FIELD)
--e3:SetCode(EFFECT_CHAIN_MATERIAL)
--e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e3:SetTargetRange(1,0)
--e3:SetRange(LOCATION_MZONE)
--e3:SetTarget(c3679515.chain_target)
--e3:SetOperation(c3679515.chain_operation)
--e3:SetValue(aux.TRUE)
--c:RegisterEffect(e3)
end
function c3679515.matfilter(c)
return c:IsLinkSetCard(0x2a)
end
function c3679515.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c3679515.filter1(c)
return c:GetFlagEffect(3679516)~=0
end
function c3679515.chainop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,3679516,RESET_EVENT+RESET_CHAIN,0,1)
end
function c3679515.limitop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if eg:IsContains(tc) then
Duel.RegisterFlagEffect(tc:GetControler(),3679515,RESET_PHASE+PHASE_END,0,1)
else
tc:ResetFlagEffect(3679515)
end
end
function c3679515.target(e,c)
return c:GetFlagEffect(3679515)~=0
end
function c3679515.target2(e,c)
return c:IsSetCard(0x2a) and c:IsType(TYPE_SYNCHRO)
end
function c3679515.cfilter(c)
return c:IsFaceup() and c:IsCode(3679515) and c:IsType(TYPE_LINK)
end
function c3679515.frcval(e,c,fp,rp,r)
local zone=0
local g=Duel.GetMatchingGroup(c3679515.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
end
return bit.band(zone,0x1f)
end
function c3679515.checkzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c3679515.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
end
return bit.band(zone,0x1f)
end
function c3679515.synfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and ((c:IsFaceup() and c:IsLocation(LOCATION_MZONE)) or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemove()
end
function c3679515.syncon(e,c,smat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
if not Duel.IsPlayerAffectedByEffect(tp,3679515) then return false end
if Duel.GetFlagEffect(tp,3679515)~=0 then return false end
local mg=Duel.GetMatchingGroup(c3679515.synfilter,c:GetControler(),LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0,nil)
local zone=c3679515.checkzone(tp)
if smat and smat:IsType(TYPE_TUNER) and c3679515.synfilter(smat) then
return Duel.CheckTunerMaterial(c,smat,aux.Tuner(nil),aux.NonTuner(nil),1,99,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c,zone)>0 end
return Duel.CheckSynchroMaterial(c,aux.Tuner(nil),aux.NonTuner(nil),1,99,smat,mg) and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c3679515.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,smat)
local g=nil
local mg=Duel.GetMatchingGroup(c3679515.synfilter,c:GetControler(),LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0,nil)
if smat and smat:IsType(TYPE_TUNER) and c3679515.synfilter(smat) then
g=Duel.SelectTunerMaterial(c:GetControler(),c,smat,aux.Tuner(nil),aux.NonTuner(nil),1,99,mg)
else
g=Duel.SelectSynchroMaterial(c:GetControler(),c,aux.Tuner(nil),aux.NonTuner(nil),1,99,smat,mg)
end
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function c3679515.synop(e,tp,eg,ep,ev,re,r,rp,c,smat,mg,min,max)
Duel.Hint(HINT_CARD,0,3679515)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.Remove(g,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO)
c:RegisterFlagEffect(3679515,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,3679515,RESET_PHASE+PHASE_END,0,1)
g:DeleteGroup()
end
--function c3679515.filter(c,e)
-- return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
--end
--function c3679515.chain_target(e,te,tp)
-- local zone=c3679515.checkzone(tp)
-- return Duel.GetFlagEffect(tp,3679515)==0 and Duel.GetMatchingGroup(c3679515.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,nil,te) and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
--end
--function c3679515.chain_operation(e,te,tp,tc,mat,sumtype)
-- if not sumtype then sumtype=SUMMON_TYPE_FUSION end
-- Duel.Hint(HINT_CARD,0,3679515)
-- tc:SetMaterial(mat)
-- Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
-- Duel.BreakEffect()
-- tc:RegisterFlagEffect(3679515,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
-- Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
-- Duel.RegisterFlagEffect(tp,3679515,RESET_PHASE+PHASE_END,0,1)
--end
......@@ -124,24 +124,25 @@ function c98941056.activate(e,tp,eg,ep,ev,re,r,rp)
hg:RemoveCard(xc)
xc=mat1:GetNext()
end
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
if ct>0 and Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(98941056,3)) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(s.tgfilter1,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,ct,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
if tc:IsControlerCanBeChanged() and Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(98941056,3)) then
Duel.BreakEffect()
Duel.GetControl(tc,1-tp)
local g=Duel.GetMatchingGroup(s.tgfilter1,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,ct,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
tc:CompleteProcedure()
end
end
function s.tgfilter1(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
return c:IsSetCard(0x9d) and c:IsAbleToGrave()
end
function c98941056.desfilter(c,tp)
return c:IsControler(tp)
......
......@@ -1461,6 +1461,9 @@
#祈予之心 174 0x4b0-0x4bf
!setname 0x4b1 域控
#lnsania 250 0xf80 QQ:3460781659
!setname 0xf80 数契约
#???
#TYGOC Submissions
......
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