Commit ac5f40ec authored by Nemo Ma's avatar Nemo Ma

remove

parent 84746a8e
No preview for this file type
--异态魔女·炉-01
local m=14000501
local cm=_G["c"..m]
--script thanks for Real_Scl and 777
--functions
if not Spositch then
Spositch=Spositch or {}
spo=Spositch
function spo.splimit(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--revive limit
aux.EnableReviveLimitPendulumSummonable(c,0xff)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetTargetRange(1,0)
e0:SetTarget(spo.plimit)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
end
function spo.SpositchSpellEffect(c,cate,prop,tg,op)
local code=c:GetOriginalCodeRule()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(code,0))
if cate then
e2:SetCategory(cate)
end
e2:SetType(EFFECT_TYPE_ACTIVATE+EFFECT_TYPE_QUICK_O)
prop=prop or 0
e2:SetProperty(prop,EFFECT_FLAG2_SPOSITCH)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(spo.spellcon)
e2:SetCost(spo.spellcost)
if tg then
e2:SetTarget(tg)
end
e2:SetOperation(op)
c:RegisterEffect(e2)
local ccode=_G["c"..code]
ccode.SpositchSpellEffect=e2
end
function spo.SpositchPendulumEffect(c,cate,tg,op)
local code=c:GetOriginalCodeRule()
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(code,2))
if cate then
e3:SetCategory(cate)
end
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,code)
e3:SetCondition(spo.pencon)
if tg then
e3:SetTarget(tg)
end
e3:SetOperation(op)
c:RegisterEffect(e3)
local ccode=_G["c"..code]
ccode.SpositchPendulumEffect=e3
end
end
function spo.named(c)
local code=c:GetCode()
local mt=_G["c"..code]
if not mt then
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
mt=_G["c"..code]
_G["c"..code]=nil
else
_G["c"..code]=nil
return false
end
end
return mt and mt.named_with_Spositch
end
--function spo.splimit1(e,se,sp,st)
--if not se then return end
--local sc=se:GetHandler()
--return sc and spo.named(sc)
--end
function spo.plimit(e,c,tp,sumtp,sumpos)
return not c:IsLevel(11) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function spo.spellcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_HAND) and (Duel.GetTurnPlayer()==tp or c:IsHasEffect(EFFECT_QP_ACT_IN_NTPHAND))
end
function spo.spellcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
c:RegisterEffect(e1)
c:CancelToGrave(false)
end
function spo.pencon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:IsActiveType(TYPE_SPELL) or re:GetHandler():IsType(TYPE_SPELL) or spo.named(re:GetHandler()))
end
if cm then
cm.named_with_Spositch=1
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_DESTROY+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.destg,cm.desop)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_TOEXTRA+CATEGORY_SEARCH+CATEGORY_TOHAND,cm.thtg,cm.thop)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and cm.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.thfilter(c)
return spo.named(c) and (c:IsAbleToHand() or not c:IsForbidden()) and ((c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()) or c:IsLocation(LOCATION_DECK))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=tc:IsForbidden()
if b1 and (b2 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0) or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if tc:IsType(TYPE_PENDULUM) and Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if not tc:IsType(TYPE_SPELL) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL)
tc:RegisterEffect(e1)
end
end
end
end
end
end
\ No newline at end of file
--异态魔女·路-02
local m=14000502
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_DESTROY+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.destg,cm.desop)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_TOEXTRA+CATEGORY_TOHAND,cm.thtg,cm.thop)
--[[spsummon condition
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
--e1:SetCode(EFFECT_SPSUMMON_CONDITION)
--e1:SetValue(cm.splimit)
--c:RegisterEffect(e1)]]--
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and spo.named(sc)
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and cm.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.thfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--异态魔女·溜-03
local m=14000503
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_REMOVE+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.rmtg,cm.rmop)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_TOEXTRA+CATEGORY_TODECK,cm.tdtg,cm.tdop)
--spsummon condition
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
--e1:SetCode(EFFECT_SPSUMMON_CONDITION)
--e1:SetValue(cm.splimit)
--c:RegisterEffect(e1)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and spo.named(sc)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,c) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--异态魔女·門-04
local m=14000504
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_TODECK+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.stdtg,cm.stdop)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_TOEXTRA+CATEGORY_TODECK,cm.tdtg,cm.tdop)
end
function cm.tdfilter(c)
return c:IsFaceup() and spo.named(c) and c:IsAbleToDeck()
end
function cm.stdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.stdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.upfilter(c)
return c:IsFaceup() and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(cm.upfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.upfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--异态魔女·浸-23
local m=14000505
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_TOHAND+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.stdtg,cm.stdop)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON,cm.tdtg,cm.tdop)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function cm.stdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.thfilter(chkc) end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.stdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.spfilter(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--异态魔女·戒-44
local m=14000506
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_DISABLE+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.tg,cm.op)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_TOEXTRA+CATEGORY_DISABLE,cm.tdtg,cm.tdop)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() 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 c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_ONFIELD)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc 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 tc:IsType(TYPE_TRAPMONSTER) then
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--异态魔女·解-99
local m=14000507
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SPELLCASTER),3,3,cm.lcheck)
c:EnableReviveLimit()
--act qp in hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.qpcon)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--
local e3=e1:Clone()
e3:SetCode(m)
c:RegisterEffect(e3)
--activate cost
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetTargetRange(1,0)
e4:SetTarget(cm.costtg)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
end
function cm.lfilter(c)
return c:IsLinkType(TYPE_TUNER)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.lfilter,1,nil) and g:GetClassCount(Card.GetLinkAttribute)==g:GetCount()
end
function cm.qpcon(e)
return e:GetHandler():GetSequence()>4
end
function cm.costtg(e,te,tp)
local tc=te:GetHandler()
return tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 and Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
and tc:IsLocation(LOCATION_HAND) and tc:GetEffectCount(m)>0
and (tc:GetEffectCount(EFFECT_QP_ACT_IN_NTPHAND)<=tc:GetEffectCount(m) and (tc:IsType(TYPE_QUICKPLAY) or spo.named(tc)))
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=Duel.GetMatchingGroup(cm.eqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,e,tp)
if #cg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=cg:Select(tp,1,1,c):GetFirst()
if tc then
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
end
end
end
function cm.eqfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsImmuneToEffect(e)
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
--异态魔女·毒-??
local m=14000508
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,11,2)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:IsActiveType(TYPE_SPELL) or re:GetHandler():IsType(TYPE_SPELL) or spo.named(re:GetHandler()))
end
function cm.thfilter(c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToHand() and not c:IsForbidden()
end
function cm.ovfilter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_TOKEN)
and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsImmuneToEffect(e)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():GetOverlayCount()~=0 and e:GetHandler():GetOverlayGroup():IsExists(cm.thfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_OVERLAY)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=og:Filter(cm.thfilter,nil,nil)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
local cg=Duel.GetMatchingGroup(cm.ovfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,e,tp)
if cg:GetCount()>0 and c:IsType(TYPE_XYZ) and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=cg:Select(tp,1,1,c):GetFirst()
if tc then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
end
--异态魔女·过去式
local m=14000509
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,0x1e0)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
end
function cm.filter(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA)) or c:IsLocation(LOCATION_DECK)) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
function cm.cost(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 cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>=1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--异态魔女·进行时
local m=14000510
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.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,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,0x1e0)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
end
function cm.filter(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.filter1(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if Duel.GetLocationCountFromEx(tp)<1 then return end
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_EXTRA,0,nil,e,tp)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SpecialSummon(sg1,0,tp,tp,true,true,POS_FACEUP)
end
function cm.cost(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 cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,0)
end
function cm.thfilter(c,e,tp)
return spo.named(c) and c:IsAbleToHand()
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>=1 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--异态魔女·将来时
local m=14000511
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,0x1e0)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
end
function cm.filter(c,e,tp)
return spo.named(c) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.tdfilter(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil)
if g1:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
if Duel.SendtoHand(sg1,tp,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,sg1)
if Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
function cm.cost(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 cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,LOCATION_PZONE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--异态魔女·岚-78
local m=14000512
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_RELEASE+CATEGORY_TOEXTRA,EFFECT_FLAG_CARD_TARGET,cm.tg,cm.op)
--peneffect
spo.SpositchPendulumEffect(c,CATEGORY_RELEASE+CATEGORY_TOEXTRA,cm.tdtg,cm.tdop)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsReleasableByEffect() end
if chk==0 then
local checknum=0
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CHANGE_TYPE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(TYPE_SPELL+TYPE_QUICKPLAY)
e1_2:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1_2,true)
local ce=c:GetActivateEffect()
if ce:IsActivatable(tp,false,true) then checknum=1 end
e1_2:Reset()
return checknum==1 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and not c:IsForbidden()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
c:CancelToGrave(false)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
end
end
function cm.cfilter(c)
return c:IsReleasableByEffect() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_ONFIELD)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_PENDULUM) or not c:IsRelateToEffect(e) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)==0 then return end
if not Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Release(tc,REASON_EFFECT)
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment