Commit 29f09785 authored by mercury233's avatar mercury233

update

parent c1f0de4a
--アウトバースト・ドラゴン
--scripted by XyLeN
function c100200205.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200205,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100200205)
e1:SetCondition(c100200205.spcon)
e1:SetTarget(c100200205.sptg)
e1:SetOperation(c100200205.spop)
c:RegisterEffect(e1)
--link summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200205,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100200205+100)
e2:SetCondition(c100200205.lkcon)
e2:SetTarget(c100200205.lktg)
e2:SetOperation(c100200205.lkop)
c:RegisterEffect(e2)
end
function c100200205.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
end
function c100200205.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)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler())
if #g>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
end
function c100200205.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local res=false
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
res=true
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200205,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c100200205.splimit)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler())
if res and #g>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c100200205.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
function c100200205.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c100200205.lkfilter(c,lc)
return c:IsRace(RACE_DRAGON) and c:IsLinkSummonable(nil,lc)
end
function c100200205.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200205.lkfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100200205.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c100200205.lkfilter,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
--冥府の執行者 プルート
--
--scripted by XyLeN
function c100312040.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
aux.AddCodeList(c,56433456)
c:EnableReviveLimit()
--position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100312040,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(c100312040.noqkcon)
e1:SetCost(c100312040.poscost)
e1:SetTarget(c100312040.postg)
e1:SetOperation(c100312040.posop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE)
e2:SetCondition(c100312040.qkcon)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100312040,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100312040+100)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100312040.thtg)
e3:SetOperation(c100312040.thop)
c:RegisterEffect(e3)
end
function c100312040.cfilter(c)
return c:IsCode(56433456) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c100312040.noqkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c100312040.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end
function c100312040.qkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100312040.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end
function c100312040.poscostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function c100312040.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100312040.poscostfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100312040.poscostfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100312040.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c100312040.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100312040.posfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c100312040.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100312040.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c100312040.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
function c100312040.thfilter(c)
return c:IsCode(56433456) and c:IsAbleToHand()
end
function c100312040.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100312040.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c100312040.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100312040.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--代行者の近衛 ムーン
--
--scripted by XyLeN
function c100312052.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_FAIRY),2,2)
aux.AddCodeList(c,56433456)
c:EnableReviveLimit()
--to grave or to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100312052,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100312052)
e1:SetCondition(c100312052.condition)
e1:SetTarget(c100312052.target)
e1:SetOperation(c100312052.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100312052,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100312052+100)
e2:SetCost(c100312052.descost)
e2:SetTarget(c100312052.destg)
e2:SetOperation(c100312052.desop)
c:RegisterEffect(e2)
end
function c100312052.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100312052.tgfilter(c)
return (c:IsCode(56433456) or aux.IsCodeListed(c,56433456)) and c:IsAbleToGrave()
end
function c100312052.thfilter(c)
return c:IsCode(91188343) and c:IsAbleToHand()
end
function c100312052.cfilter(c)
return c:IsCode(56433456) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c100312052.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b=Duel.IsExistingMatchingCard(c100312052.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c100312052.tgfilter,tp,LOCATION_DECK,0,1,nil)
or b and Duel.IsExistingMatchingCard(c100312052.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100312052.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.IsExistingMatchingCard(c100312052.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b=Duel.IsExistingMatchingCard(c100312052.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
if b and Duel.IsExistingMatchingCard(c100312052.thfilter,tp,LOCATION_DECK,0,1,nil) and (not a or Duel.SelectYesNo(tp,aux.Stringid(100312052,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100312052.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
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100312052.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c100312052.costfilter(c)
return c:IsRace(RACE_FAIRY)
end
function c100312052.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100312052.costfilter,1,nil) end
local rg=Duel.SelectReleaseGroup(tp,c100312052.costfilter,1,1,nil)
Duel.Release(rg,REASON_COST)
end
function c100312052.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100312052.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--天空の聖水
--
--scripted by XyLeN
function c100312053.initial_effect(c)
aux.AddCodeList(c,56433456)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,100312053)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100312053.target)
e1:SetOperation(c100312053.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100312053+100)
e2:SetTarget(c100312053.reptg)
e2:SetValue(c100312053.repval)
e2:SetOperation(c100312053.repop)
c:RegisterEffect(e2)
end
function c100312053.actfilter(c,tp)
return c:IsCode(56433456) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c100312053.thfilter(c)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,56433456) and c:IsAbleToHand()
end
function c100312053.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c100312053.actfilter,tp,LOCATION_DECK,0,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(c100312053.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
end
function c100312053.recfilter(c)
return c:IsFaceup() and c:IsSetCard(0x44,0x26b)
end
function c100312053.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(c100312053.actfilter,tp,LOCATION_DECK,0,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(c100312053.thfilter,tp,LOCATION_DECK,0,1,nil)
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(100312053,0)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(100312053,1)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
local resolve=false
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c100312053.actfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
resolve=true
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100312053.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
resolve=true
end
end
local ct=Duel.GetMatchingGroupCount(c100312053.recfilter,tp,LOCATION_MZONE,0,nil)
if resolve and ct>0 and Duel.SelectYesNo(tp,aux.Stringid(100312053,2)) then
Duel.BreakEffect()
Duel.Recover(tp,ct*500,REASON_EFFECT)
end
end
function c100312053.repfilter(c,tp)
return c:IsFaceup() and aux.IsCodeListed(c,56433456)
and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c100312053.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c100312053.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c100312053.repval(e,c)
return c100312053.repfilter(c,e:GetHandlerPlayer())
end
function c100312053.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--Uk-P.U.N.K.娑楽斎
--
--scripted by XyLeN
function c100417001.initial_effect(c)
--fusion summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417001)
e1:SetCost(c100417001.spcost)
e1:SetTarget(c100417001.sptg)
e1:SetOperation(c100417001.spop)
c:RegisterEffect(e1)
--synchro summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417001,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417001+100)
e2:SetCondition(c100417001.sccon)
e2:SetTarget(c100417001.sctarg)
e2:SetOperation(c100417001.scop)
c:RegisterEffect(e2)
end
function c100417001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c100417001.spfilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c100417001.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x26f) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c100417001.sptg(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(c100417001.spfilter2,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(c100417001.spfilter2,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 c100417001.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100417001.spfilter1,nil,e)
local sg1=Duel.GetMatchingGroup(c100417001.spfilter2,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(c100417001.spfilter2,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 c100417001.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c100417001.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c100417001.syncfilter(c)
return c:IsSetCard(0x26f) and c:IsSynchroSummonable(nil)
end
function c100417001.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417001.syncfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100417001.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c100417001.syncfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
--Ga-P.U.N.K.ワゴン
--
--scripted by XyLeN
function c100417002.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417002)
e1:SetCost(c100417002.thcost)
e1:SetTarget(c100417002.thtg)
e1:SetOperation(c100417002.thop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417002,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417002+100)
e2:SetCondition(c100417002.drcon1)
e2:SetTarget(c100417002.drtg)
e2:SetOperation(c100417002.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BECOME_TARGET)
e3:SetCondition(c100417002.drcon2)
c:RegisterEffect(e3)
end
function c100417002.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c100417002.thfilter(c)
return c:IsSetCard(0x26f) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c100417002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100417002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100417002.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 c100417002.drcon1(e,tp,eg,ep,ev,re,r,rp)
local bc=eg:GetFirst()
return bc:IsSetCard(0x26f) and bc:IsControler(tp)
end
function c100417002.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x26f)
end
function c100417002.drcon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(c100417002.cfilter,1,nil,tp)
end
function c100417002.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 c100417002.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
--Jo-P.U.N.K.Mme.スパイダー
--
--scripted by XyLeN
function c100417003.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417003,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417003)
e1:SetCost(c100417003.thcost)
e1:SetTarget(c100417003.thtg)
e1:SetOperation(c100417003.thop)
c:RegisterEffect(e1)
--half atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417003,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417003+100)
e2:SetCondition(c100417003.atkcon)
e2:SetTarget(c100417003.atktg)
e2:SetOperation(c100417003.atkop)
c:RegisterEffect(e2)
end
function c100417003.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c100417003.thfilter(c)
return c:IsSetCard(0x26f) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c100417003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100417003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100417003.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 c100417003.cfilter(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_ONFIELD)
end
function c100417003.atkcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsSetCard(0x26f) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
and eg:IsExists(c100417003.cfilter,1,nil,tp)
end
function c100417003.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c100417003.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.floor(-tc:GetAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--No-P.U.N.K.セアミン
--
--Script by REIKAI
function c100417004.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417004,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417004)
e1:SetCost(c100417004.thcost)
e1:SetTarget(c100417004.thtg)
e1:SetOperation(c100417004.thop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417004,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100417004+100)
e2:SetTarget(c100417004.atktg2)
e2:SetOperation(c100417004.atkop2)
c:RegisterEffect(e2)
end
function c100417004.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c100417004.thfilter(c)
return c:IsSetCard(0x26f) and not c:IsCode(100417004) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c100417004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100417004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100417004.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 c100417004.atkfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x26f)
end
function c100417004.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100417004.atkfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100417004.atkfilter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100417004.atkfilter2,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100417004.atkop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--No-P.U.N.K.フォクシー・チューン
--
--Script by REIKAI
function c100417005.initial_effect(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(100417005,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,100417005)
e0:SetCost(c100417005.spcost)
e0:SetTarget(c100417005.sptg)
e0:SetOperation(c100417005.spop)
c:RegisterEffect(e0)
--Special Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417005,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,100417005+100)
e1:SetCost(c100417005.spcost1)
e1:SetTarget(c100417005.sptg1)
e1:SetOperation(c100417005.spop1)
c:RegisterEffect(e1)
--recover(battle)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417005,2))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCountLimit(1)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c100417005.rctg)
e2:SetOperation(c100417005.rcop)
c:RegisterEffect(e2)
end
function c100417005.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsSetCard(0x26f)
end
function c100417005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100417005.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c100417005.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100417005.sptg(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)
end
function c100417005.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 c100417005.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c100417005.spfilter(c,e,tp)
return c:IsSetCard(0x26f) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100417005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c100417005.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100417005.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
if tg:GetCount()>0 then
if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417005.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100417005.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local dam=bc:GetAttack()
if dam<0 then dam=0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam)
end
function c100417005.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--Uk-P.U.N.K.カープ・ライジング
--Scripted by mallu11
function c100417007.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x26f),2,true)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417007)
e1:SetCondition(c100417007.spcon)
e1:SetCost(c100417007.spcost)
e1:SetTarget(c100417007.sptg)
e1:SetOperation(c100417007.spop)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417007,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100417007+100)
e2:SetCondition(c100417007.atkcon)
e2:SetTarget(c100417007.atktg)
e2:SetOperation(c100417007.atkop)
c:RegisterEffect(e2)
end
function c100417007.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c100417007.spfilter(c,e,tp)
return not c:IsLevel(8) and c:IsSetCard(0x26f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100417007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c100417007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417007.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c100417007.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c100417007.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c100417007.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return r==REASON_SYNCHRO and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE or Duel.IsAbleToEnterBP())
end
function c100417007.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26f) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c100417007.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100417007.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100417007.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.SelectTarget(tp,c100417007.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100417007.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
--Uk-P.U.N.K.アメイジング・ドラゴン
--Scripted by mallu11
function c100417008.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417008,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100417008)
e1:SetCondition(c100417008.thcon)
e1:SetTarget(c100417008.thtg)
e1:SetOperation(c100417008.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417008,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417008)
e2:SetTarget(c100417008.sptg)
e2:SetOperation(c100417008.spop)
c:RegisterEffect(e2)
end
function c100417008.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100417008.thfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsRace(RACE_PSYCHO) and c:IsLevel(3)
end
function c100417008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingMatchingCard(c100417008.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c100417008.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c100417008.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c100417008.spfilter(c,e,tp)
return not c:IsCode(100417008) and c:IsSetCard(0x26f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100417008.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100417008.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100417008.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100417008.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100417008.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--Ga-P.U.N.K.ワイルド・ピッキング
--
--Script by REIKAI
function c100417009.initial_effect(c)
--ACT
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417009,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100417009)
e2:SetCondition(c100417009.descon2)
e2:SetTarget(c100417009.destg2)
e2:SetOperation(c100417009.desop2)
c:RegisterEffect(e2)
--Cannot Break
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417009,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c100417009.limcon)
e3:SetOperation(c100417009.limop)
c:RegisterEffect(e3)
end
function c100417009.descon2(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
if not ac:IsSetCard(0x26f) or not ac:IsControler(tp) then return false end
local bc=ac:GetBattleTarget()
e:SetLabelObject(bc)
return bc and bc:IsControler(1-tp) and bc:IsRelateToBattle()
end
function c100417009.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c100417009.desop2(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function c100417009.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26f)
end
function c100417009.limcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE)
and Duel.GetMatchingGroupCount(c100417009.cfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c100417009.limop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100417009.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
\ No newline at end of file
--Ga-P.U.N.K.クラッシュ・ビート
--
--Script by REIKAI
function c100417010.initial_effect(c)
--ACT
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417010,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,100417010)
e2:SetCondition(c100417010.discon)
e2:SetTarget(c100417010.distg)
e2:SetOperation(c100417010.disop)
c:RegisterEffect(e2)
--Cannot Break
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417010,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c100417010.limcon)
e3:SetOperation(c100417010.limop)
c:RegisterEffect(e3)
end
function c100417010.acfilter(c,tp)
return c:IsSetCard(0x26f) and c:IsControler(tp)
end
function c100417010.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not tg or not tg:IsExists(c100417010.acfilter,1,nil,tp) then return false end
return rp~=tp
end
function c100417010.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100417010.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c100417010.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26f)
end
function c100417010.limcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE) and Duel.GetMatchingGroupCount(c100417010.cfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c100417010.limop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c100417010.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(c100417010.tgval)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(c100417010.tgval)
e2:SetOwnerPlayer(tp)
tc:RegisterEffect(e2,true)
tc=g:GetNext()
end
end
function c100417010.tgval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
\ No newline at end of file
--Jo-P.U.N.K.デンジャラス・ガブ
--
--Script by REIKAI
function c100417011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,100417011+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100417011.target)
e1:SetOperation(c100417011.activate)
c:RegisterEffect(e1)
end
function c100417011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c100417011.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26f)
end
function c100417011.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if Duel.IsExistingMatchingCard(c100417011.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Recover(tp,tc:GetTextAttack(),REASON_EFFECT)
end
end
end
\ No newline at end of file
--Jo-P.U.N.K.ナシワリ・サプライズ
--
--Script by REIKAI
function c100417012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,100417012+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100417012.destg)
e1:SetOperation(c100417012.desop)
c:RegisterEffect(e1)
end
function c100417012.filter(c,tp)
return c:IsFacedown() or (c:IsFaceup() and Duel.IsExistingMatchingCard(c100417012.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function c100417012.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26f)
end
function c100417012.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100417012.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100417012.filter,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100417012.filter,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100417012.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--Beetrooper Scout Buggy
--scripted by XyLeN
function c101105111.initial_effect(c)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101105111.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105111,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,101105111)
e2:SetTarget(c101105111.sptg)
e2:SetOperation(c101105111.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101105111.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c101105111.spfilter(c,e,tp)
return c:IsCode(101105111) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105111.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101105111.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c101105111.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101105111.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -9,7 +9,7 @@ function c101106001.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101106001+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101106001.spcon)
e1:SetCondition(c101106001.spcon)
e1:SetValue(c101106001.spval)
c:RegisterEffect(e1)
--spsummon 2
......
--白の聖女エクレシア
--
--scripted by KillerDJ
function c101106007.initial_effect(c)
aux.AddCodeList(c,68468459)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101106007+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101106007.sspcon)
c:RegisterEffect(e1)
--special summon other monsters
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101106007,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101106007)
e2:SetCondition(c101106007.spcon)
e2:SetCost(c101106007.spcost)
e2:SetTarget(c101106007.sptg)
e2:SetOperation(c101106007.spop)
c:RegisterEffect(e2)
--grave to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101106007,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,101106007+100)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c101106007.thcon)
e3:SetTarget(c101106007.thtg)
e3:SetOperation(c101106007.thop)
c:RegisterEffect(e3)
if not c101106007.global_check then
c101106007.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c101106007.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101106007.sspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
end
function c101106007.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101106007.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 c101106007.spfilter(c,e,tp)
return (c:IsSetCard(0x26d) or c:IsCode(68468459)) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101106007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101106007.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101106007.spop(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,c101106007.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101106007.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c101106007.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c101106007.checkfilter,1,nil,0) then Duel.RegisterFlagEffect(0,101106007,RESET_PHASE+PHASE_END,0,1) end
if eg:IsExists(c101106007.checkfilter,1,nil,1) then Duel.RegisterFlagEffect(1,101106007,RESET_PHASE+PHASE_END,0,1) end
end
function c101106007.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101106007)~=0
end
function c101106007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101106007.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
......@@ -29,7 +29,7 @@ function c101106018.initial_effect(c)
c:RegisterEffect(e3)
end
function c101106018.tdfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsExtraDeckMonster() and c:IsSetCard(0xc008)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc008)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
and (not c:IsLocation(LOCATION_DECK) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1)
end
......@@ -39,16 +39,26 @@ function c101106018.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c101106018.tdop(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_GRAVE+LOCATION_REMOVED
if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101106018.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
or Duel.IsExistingMatchingCard(c101106018.tdfilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101106018,3)) then
loc=loc+LOCATION_DECK
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101106018,2))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101106018.tdfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101106018.tdfilter),tp,loc,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not tc:IsLocation(LOCATION_DECK) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
if loc&LOCATION_DECK>0 then
Duel.ShuffleDeck(tp)
end
if tc:IsLocation(LOCATION_DECK) then
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
function c101106018.cfilter(c)
......
--大魔鍵マフテアル
--大魔鍵マフテアル
--scripted by XyLeN
function c101106021.initial_effect(c)
--synchro and xyz limit
......
......@@ -35,6 +35,7 @@ function c101106029.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local atk=tc:GetBaseAttack()
if atk<=0 then return end
local race=tc:GetOriginalRace()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
--陽竜果フォンリー
--
--scripted by KillerDJ
function c101106031.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101106031)
e1:SetCondition(c101106031.spcon)
e1:SetTarget(c101106031.sptg)
e1:SetOperation(c101106031.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetCountLimit(1)
e2:SetTarget(c101106031.desreptg)
c:RegisterEffect(e2)
end
function c101106031.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 and re:IsActiveType(TYPE_MONSTER)
and e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function c101106031.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 c101106031.checkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c101106031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c101106031.checkfilter,tp,LOCATION_MZONE,0,1,c)
and Duel.SelectYesNo(tp,aux.Stringid(101106031,1)) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(math.ceil(tc:GetAttack()/2))
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(math.ceil(tc:GetDefense()/2))
tc:RegisterEffect(e2)
end
end
end
function c101106031.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_DECK,0,1,nil,RACE_PLANT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_DECK,0,1,1,nil,RACE_PLANT)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
\ No newline at end of file
--重起士道-ゴルドナイト
--Script by Chrono-Genex
function c101106032.initial_effect(c)
aux.EnableDualAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106032,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101106032)
e1:SetCondition(aux.IsDualState)
e1:SetTarget(c101106032.thtg)
e1:SetOperation(c101106032.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--change race
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(aux.IsDualState)
e3:SetValue(RACE_MACHINE)
c:RegisterEffect(e3)
--atkup
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(500)
c:RegisterEffect(e4)
end
if Auxiliary.IsTypeInText==nil then
function Auxiliary.IsTypeInText(c,type)
return c.has_text_type and type&c.has_text_type==type
end
end
function c101106032.thfilter(c)
return aux.IsTypeInText(c,TYPE_DUAL) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101106032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101106032.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101106032.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101106032.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
--不屈の獣僕
--
--scripted by KillerDJ
function c101106033.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106033,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,101106033)
e1:SetCondition(c101106033.spcon)
e1:SetTarget(c101106033.sptg)
e1:SetOperation(c101106033.spop)
c:RegisterEffect(e1)
if not c101106033.global_check then
c101106033.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c101106033.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
--ind
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c101106033.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c101106033.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),101106033,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c101106033.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,101106033)>=3 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101106033.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 c101106033.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 c101106033.indcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)<=1 and e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
--ニャータリング
--
--scripted by KillerDJ
function c101106034.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106034,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101106034)
e1:SetCondition(c101106034.spcon)
e1:SetTarget(c101106034.sptg)
e1:SetOperation(c101106034.spop)
c:RegisterEffect(e1)
--disable self turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_FZONE)
e2:SetCondition(c101106034.con1)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--disable oppo turn
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_FZONE,0)
e3:SetCondition(c101106034.con2)
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
end
function c101106034.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_FIELD)
end
function c101106034.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 c101106034.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)==2 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
end
end
function c101106034.con1(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp
end
function c101106034.con2(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==1-tp
end
......@@ -2,7 +2,7 @@
--
--Script by 222DIY-KillerDJ
function c101106037.initial_effect(c)
c:EnableReviveLimit()
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106037,0))
......
......@@ -47,14 +47,14 @@ function c101106039.desfilter1(c)
return Duel.IsExistingMatchingCard(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c101106039.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101106039.desfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c101106039.desfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c101106039.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,c101106039.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
if not g1 then return end
if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
......
......@@ -37,7 +37,7 @@ function c101106045.initial_effect(c)
c:RegisterEffect(e3)
end
function c101106045.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101106045.eqfilter(c,ec)
return c:IsSetCard(0x150) and not c:IsForbidden()
......@@ -68,7 +68,7 @@ end
function c101106045.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101106045.cfilter(c,rtype)
function c101106045.cfilter(c,rtype)
return c:IsFaceup() and c:IsSetCard(0x150) and c:GetOriginalType()&rtype>0
end
function c101106045.actlimit(e,re,rp)
......
--ルイ・キューピット
--
--scripted by KillerDJ
function c101106046.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--lv up/down
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c101106046.lvcon)
e1:SetOperation(c101106046.lvop)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c101106046.valcheck)
e0:SetLabelObject(e1)
c:RegisterEffect(e0)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101106046.atkval)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101106046,0))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101106046)
e3:SetCondition(c101106046.thcon)
e3:SetTarget(c101106046.thtg)
e3:SetOperation(c101106046.thop)
c:RegisterEffect(e3)
end
function c101106046.matfilter(c)
return c:IsType(TYPE_TUNER)
end
function c101106046.valcheck(e,c)
local g=c:GetMaterial()
local mg=g:Filter(Card.IsType,nil,TYPE_TUNER)
if #mg==1 then
local tc=mg:GetFirst()
e:GetLabelObject():SetLabel(tc:GetLevel())
end
end
function c101106046.lvcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101106046.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local ct=e:GetLabel()
local sel=nil
if c:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(101106046,1))
else
sel=Duel.SelectOption(tp,aux.Stringid(101106046,1),aux.Stringid(101106046,2))
end
if sel==1 then
ct=ct*-1
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c101106046.atkval(e,c)
return c:GetLevel()*400
end
function c101106046.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c101106046.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(8) and c:IsDefense(600)
end
function c101106046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=e:GetHandler():GetReasonCard()
local lv=rc:GetLevel()
if chk==0 then return lv>0 end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,lv*100)
end
function c101106046.thop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
local lv=rc:GetLevel()
if Duel.Damage(1-tp,lv*100,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c101106046.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(101106046,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101106046.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
end
......@@ -84,7 +84,7 @@ function c101106050.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT)
end
function c101106050.rmfilter(c,e,tp,check)
return c:IsFaceup() and c:IsAttackAbove(3000) and c:IsAttribute(ATTRIBUTE_DARK)
return c:IsFaceup() and c:IsAttackAbove(3000) and c:IsAttribute(ATTRIBUTE_DARK)
and (check or Duel.IsExistingMatchingCard(c101106050.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c))
end
function c101106050.spfilter(c,e,tp,tc)
......
......@@ -52,7 +52,7 @@ function c101106051.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101106051.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and #g>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101106051.gcheck,false,1,math.min(2,ft))
if sg then
......@@ -61,7 +61,7 @@ function c101106051.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101106051.costfilter(c,tp)
return c:IsSetCard(0x2151) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsFaceup())
return c:IsSetCard(0x2151) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsFaceup())
and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
......
......@@ -35,12 +35,15 @@ end
function c101106059.otfilter(c,tp)
return c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function c101106059.otfilter2(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c101106059.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc<=2
and Duel.IsExistingMatchingCard(c101106059.otfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(c101106059.otfilter2,tp,0,LOCATION_ONFIELD,1,nil,e)
end
function c101106059.ottg(e,c)
local mi,ma=c:GetTributeRequirement()
......@@ -50,7 +53,7 @@ function c101106059.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c101106059.otfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c101106059.otfilter2,tp,0,LOCATION_ONFIELD,1,1,nil,e)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
c:SetMaterial(nil)
......
--魔鍵
--魔鍵
--scripted by XyLeN
function c101106062.initial_effect(c)
--Activate
......
--スモール・ワールド
--
--scripted by KillerDJ
function c101106069.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101106069.target)
e1:SetOperation(c101106069.operation)
c:RegisterEffect(e1)
end
function c101106069.same_check(c,mc)
local flag=0
if c:GetRace()==mc:GetRace() then flag=flag+1 end
if c:GetAttribute()==mc:GetAttribute() then flag=flag+1 end
if c:GetLevel()==mc:GetLevel() then flag=flag+1 end
if c:GetAttack()==mc:GetAttack() then flag=flag+1 end
if c:GetDefense()==mc:GetDefense() then flag=flag+1 end
return flag==1
end
function c101106069.filter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost(POS_FACEDOWN) and not c:IsPublic()
and Duel.IsExistingMatchingCard(c101106069.filter2,tp,LOCATION_DECK,0,1,nil,tp,c)
end
function c101106069.filter2(c,tp,mc)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove(tp,POS_FACEDOWN) and c101106069.same_check(c,mc)
and Duel.IsExistingMatchingCard(c101106069.filter3,tp,LOCATION_DECK,0,1,nil,c)
end
function c101106069.filter3(c,mc)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c101106069.same_check(c,mc)
end
function c101106069.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101106069.filter1,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101106069.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c101106069.filter1,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g1)
if g1:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g2=Duel.SelectMatchingCard(tp,c101106069.filter2,tp,LOCATION_DECK,0,1,1,nil,tp,g1:GetFirst())
Duel.ConfirmCards(1-tp,g2)
if g2:GetCount()~=0 and Duel.Remove(g1,POS_FACEDOWN,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,c101106069.filter3,tp,LOCATION_DECK,0,1,1,nil,g2:GetFirst())
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
Duel.Remove(g2,POS_FACEDOWN,REASON_EFFECT)
end
end
end
......@@ -46,7 +46,7 @@ function c101106071.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101106071.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101106071.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON+RACE_MACHINE+RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_DARK)
return c:IsRace(RACE_DRAGON+RACE_MACHINE+RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_DARK)
and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101106071.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
--デュアル・ブースター
function c18096222.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(aux.dscon)
e1:SetCost(c18096222.cost)
e1:SetTarget(c18096222.target)
e1:SetOperation(c18096222.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(18096222,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c18096222.dacon)
e2:SetTarget(c18096222.datg)
e2:SetOperation(c18096222.daop)
c:RegisterEffect(e2)
end
c18096222.has_text_type=TYPE_DUAL
function c18096222.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c18096222.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c18096222.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c18096222.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL)
end
function c18096222.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18096222.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c18096222.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c18096222.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c18096222.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
--Atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c18096222.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end
end
function c18096222.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_DUAL)
end
function c18096222.dacon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if c:IsReason(REASON_LOST_TARGET) then
ec=c:GetPreviousEquipTarget()
end
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY) and ec~=nil
end
function c18096222.dafilter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
function c18096222.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c18096222.dafilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c18096222.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c18096222.daop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c18096222.dafilter(tc) then
tc:EnableDualState()
end
end
--完全燃焼
function c25669282.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,25669282+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c25669282.cost)
e1:SetTarget(c25669282.target)
e1:SetOperation(c25669282.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(25669282,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c25669282.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c25669282.sptg)
e2:SetOperation(c25669282.spop)
c:RegisterEffect(e2)
end
c25669282.has_text_type=TYPE_DUAL
function c25669282.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xeb) and c:IsAbleToRemoveAsCost()
end
function c25669282.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c25669282.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c25669282.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c25669282.spfilter1(c,e,tp)
return c:IsSetCard(0xeb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c25669282.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c25669282.spfilter2(c,e,tp,code)
return c:IsSetCard(0xeb) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25669282.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c25669282.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c25669282.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c25669282.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c25669282.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1:GetFirst():GetCode())
g1:Merge(g2)
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
function c25669282.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end
function c25669282.spfilter3(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25669282.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c25669282.spfilter3(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c25669282.spfilter3,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c25669282.spfilter3,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c25669282.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:EnableDualState()
end
Duel.SpecialSummonComplete()
end
--スペシャル・デュアル・サモン
function c26120084.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c26120084.target)
e1:SetOperation(c26120084.operation)
c:RegisterEffect(e1)
end
c26120084.has_text_type=TYPE_DUAL
function c26120084.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
function c26120084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26120084.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c26120084.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c26120084.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c26120084.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c26120084.filter(tc) then
tc:EnableDualState()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(c26120084.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
end
end
function c26120084.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
--武装鍛錬
function c27979109.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27979109,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,27979109)
e2:SetCondition(c27979109.thcon)
e2:SetTarget(c27979109.thtg)
e2:SetOperation(c27979109.thop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(27979109,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,27979110)
e3:SetCondition(c27979109.drcon)
e3:SetCost(c27979109.drcost)
e3:SetTarget(c27979109.drtg)
e3:SetOperation(c27979109.drop)
c:RegisterEffect(e3)
end
c27979109.has_text_type=TYPE_DUAL
function c27979109.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0
end
function c27979109.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c27979109.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27979109.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function c27979109.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27979109.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c27979109.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP)
end
function c27979109.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c27979109.cfilter,tp,LOCATION_SZONE,0,1,nil)
end
function c27979109.costfilter(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WARRIOR)) or c:IsType(TYPE_DUAL)) and c:IsAbleToDeckAsCost()
end
function c27979109.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27979109.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c27979109.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function c27979109.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 c27979109.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--デュアルスパーク
function c33846209.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c33846209.cost)
e1:SetTarget(c33846209.target)
e1:SetOperation(c33846209.activate)
c:RegisterEffect(e1)
end
c33846209.has_text_type=TYPE_DUAL
function c33846209.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c33846209.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c33846209.costfilter(c,ec,tp)
if c:IsFacedown() or not c:IsLevel(4) or not c:IsType(TYPE_DUAL) then return false end
return Duel.IsExistingTarget(c33846209.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c33846209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c33846209.costfilter,1,c,c,tp)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c33846209.costfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c33846209.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--金剛真力
function c57441100.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57441100,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c57441100.condition)
e1:SetTarget(c57441100.target)
e1:SetOperation(c57441100.operation)
c:RegisterEffect(e1)
end
c57441100.has_text_type=TYPE_DUAL
function c57441100.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0
end
function c57441100.filter(c,e,sp)
return c:IsType(TYPE_DUAL) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c57441100.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c57441100.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c57441100.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
or Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c57441100.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--化合電界
function c65959844.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--decrease tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65959844,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetCountLimit(1)
e2:SetCondition(c65959844.ntcon)
e2:SetTarget(c65959844.nttg)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65959844,2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_DUAL))
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65959844,1))
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetTarget(c65959844.destg)
e4:SetOperation(c65959844.desop)
c:RegisterEffect(e4)
end
c65959844.has_text_type=TYPE_DUAL
function c65959844.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c65959844.nttg(e,c)
return c:IsLevelAbove(5) and c:IsType(TYPE_DUAL)
end
function c65959844.rmfilter(c)
return c:IsDualState() and c:IsAbleToRemove()
end
function c65959844.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c65959844.rmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c65959844.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65959844.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
local rc=g:GetFirst()
if rc and Duel.Remove(rc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and rc:IsLocation(LOCATION_REMOVED) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
rc:RegisterFlagEffect(65959844,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(rc)
e1:SetCondition(c65959844.retcon)
e1:SetOperation(c65959844.retop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
end
function c65959844.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and e:GetLabelObject():GetFlagEffect(65959844)~=0
end
function c65959844.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ReturnToField(tc)
end
--二重の落とし穴
function c67045174.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c67045174.condition)
e1:SetTarget(c67045174.target)
e1:SetOperation(c67045174.activate)
c:RegisterEffect(e1)
if not c67045174.global_check then
c67045174.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c67045174.checkop)
Duel.RegisterEffect(ge1,0)
end
end
c67045174.has_text_type=TYPE_DUAL
function c67045174.checkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local t=Duel.GetAttackTarget()
if a and a:IsDualState() and a:IsStatus(STATUS_BATTLE_DESTROYED) then
a:RegisterFlagEffect(67045174,RESET_PHASE+PHASE_DAMAGE,0,1)
end
if t and t:IsDualState() and t:IsStatus(STATUS_BATTLE_DESTROYED) then
t:RegisterFlagEffect(67045174,RESET_PHASE+PHASE_DAMAGE,0,1)
end
end
function c67045174.filter(c)
return c:GetFlagEffect(67045174)~=0
end
function c67045174.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67045174.filter,1,nil)
end
function c67045174.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c67045174.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--フォース・リリース
function c73567374.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c73567374.target)
e1:SetOperation(c73567374.operation)
c:RegisterEffect(e1)
end
c73567374.has_text_type=TYPE_DUAL
function c73567374.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
function c73567374.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73567374.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c73567374.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetTargetCard(g)
end
function c73567374.filter2(c,e)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState() and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
end
function c73567374.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c73567374.filter2,tp,LOCATION_MZONE,0,nil,e)
local tc=g:GetFirst()
local fid=c:GetFieldID()
while tc do
tc:EnableDualState()
tc:RegisterFlagEffect(73567374,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
tc=g:GetNext()
end
g:KeepAlive()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetLabelObject(g)
e2:SetCondition(c73567374.flipcon)
e2:SetOperation(c73567374.flipop)
Duel.RegisterEffect(e2,tp)
end
function c73567374.flipfilter(c,fid)
return c:GetFlagEffectLabel(73567374)==fid
end
function c73567374.flipcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c73567374.flipfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c73567374.flipop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local dg=g:Filter(c73567374.flipfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.ChangePosition(dg,POS_FACEDOWN_DEFENSE)
end
--デュアル・アブレーション
function c80758812.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(80758812,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,80758812)
e2:SetCondition(c80758812.condition)
e2:SetCost(c80758812.cost)
e2:SetTarget(c80758812.sptg1)
e2:SetOperation(c80758812.spop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(80758812,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetTarget(c80758812.sptg2)
e3:SetOperation(c80758812.spop2)
c:RegisterEffect(e3)
end
c80758812.has_text_type=TYPE_DUAL
function c80758812.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c80758812.cost(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c80758812.spfilter1(c,e,tp)
return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c80758812.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c80758812.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c80758812.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c80758812.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:EnableDualState()
end
Duel.SpecialSummonComplete()
end
function c80758812.relfilter(c,tp)
return c:IsType(TYPE_DUAL) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0
end
function c80758812.spfilter2(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c80758812.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c80758812.relfilter,1,nil)
and Duel.IsExistingMatchingCard(c80758812.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c80758812.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local rg=Duel.SelectReleaseGroup(tp,c80758812.relfilter,1,1,nil,tp)
if rg:GetCount()==0 then return end
local relchk=rg:GetFirst():IsDualState()
if Duel.Release(rg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c80758812.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local dg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if dg:GetCount()>0 and relchk and Duel.SelectYesNo(tp,aux.Stringid(80758812,2)) then
Duel.BreakEffect()
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
--ヴィクティム・カウンター
function c81601517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c81601517.condition)
e1:SetTarget(c81601517.target)
e1:SetOperation(c81601517.activate)
c:RegisterEffect(e1)
end
c81601517.has_text_type=TYPE_DUAL
function c81601517.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c81601517.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and c:IsCanTurnSet()
end
function c81601517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81601517.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81601517.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c81601517.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c81601517.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
--二量合成
function c90965652.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(90965652,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,90965652)
e1:SetTarget(c90965652.target)
e1:SetOperation(c90965652.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(90965652,3))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,90965653)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c90965652.atktg)
e2:SetOperation(c90965652.atkop)
c:RegisterEffect(e2)
end
c90965652.has_text_type=TYPE_DUAL
function c90965652.thfilter1(c)
return c:IsCode(65959844) and c:IsAbleToHand()
end
function c90965652.thfilter2(c)
return c:IsCode(25669282) and c:IsAbleToHand()
end
function c90965652.thfilter3(c)
return c:IsSetCard(0xeb) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c90965652.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c90965652.thfilter1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c90965652.thfilter2,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c90965652.thfilter3,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(90965652,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(90965652,2)
opval[off-1]=2
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
local res=opval[op]
e:SetLabel(res)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,res,tp,LOCATION_DECK)
end
function c90965652.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c90965652.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
if Duel.IsExistingMatchingCard(c90965652.thfilter2,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c90965652.thfilter3,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c90965652.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c90965652.thfilter3,tp,LOCATION_DECK,0,1,1,nil)
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
end
function c90965652.tgfilter(c,e)
return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end
function c90965652.atkfilter(c)
return c:GetAttack()>0 and c:GetBaseAttack()>0
end
function c90965652.tgcheck(g)
return g:IsExists(Card.IsDualState,1,nil) and g:IsExists(c90965652.atkfilter,1,nil)
end
function c90965652.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c90965652.tgfilter,tp,LOCATION_MZONE,0,nil,e)
if chk==0 then return g:CheckSubGroup(c90965652.tgcheck,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=g:SelectSubGroup(tp,c90965652.tgcheck,false,2,2)
Duel.SetTargetCard(sg)
end
function c90965652.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsFaceup,nil)
if #g<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90965652,4))
local g1=g:FilterSelect(tp,c90965652.atkfilter,1,1,nil)
if #g1<1 then return end
local tc1=g1:GetFirst()
local tc2=(g-g1):GetFirst()
if tc1:IsImmuneToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tc1:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(tc1:GetBaseAttack())
tc2:RegisterEffect(e2)
end
--スーペルヴィス
function c95750695.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c95750695.target)
e1:SetOperation(c95750695.operation)
c:RegisterEffect(e1)
--duel status
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DUAL_STATUS)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c95750695.eqlimit)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(95750695,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c95750695.spcon)
e4:SetTarget(c95750695.sptg)
e4:SetOperation(c95750695.spop)
c:RegisterEffect(e4)
end
c95750695.has_text_type=TYPE_DUAL
function c95750695.eqlimit(e,c)
return c:IsType(TYPE_DUAL)
end
function c95750695.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL)
end
function c95750695.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c95750695.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c95750695.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c95750695.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c95750695.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c95750695.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95750695.spfilter(chkc,e,tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c95750695.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c95750695.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
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