Commit c24521aa authored by Nemo Ma's avatar Nemo Ma

fix

parent ba8315b1
--可可莉柯特·布兰琪
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rsof.DefineCard(33310100,"Cochrot")
local m=33310100
local cm=_G["c"..m]
cm.rssetcode="Cochrot"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=rsef.SC(c,EVENT_SPSUMMON_SUCCESS,nil,nil,nil,rscon.sumtype("rit"),cm.atkop)
local e2,e3=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
local e4=rsef.RegisterClone(c,e3,"code",EFFECT_AVOID_BATTLE_DAMAGE)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetCondition(cm.damcon)
e5:SetOperation(cm.damop)
--bgm
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetOperation(cm.bgmop)
c:RegisterEffect(e0)
--announce
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_ATTACK_ANNOUNCE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetOperation(cm.anop)
c:RegisterEffect(e7)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--deepen damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--damage val
local e5=e3:Clone()
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e5)
local e6=rsef.STO(c,EVENT_REMOVE,{m,0},nil,nil,"de,dsp",nil,nil,rsop.target(cm.actfilter,nil,LOCATION_GRAVE+LOCATION_DECK),cm.actop)
--act
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_REMOVE)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetTarget(cm.acttg)
e6:SetOperation(cm.actop)
c:RegisterEffect(e6)
end
function cm.atkop(e,tp)
function cm.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,tp,aux.Stringid(m,0))
end
function cm.anop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(m,1))
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) then return end
if #g<=0 then return end
Duel.Hint(HINT_CARD,0,m)
for tc in aux.Next(g) do
local e1=rsef.SV_SET({e:GetHandler(),tc},"atkf",0,nil,rsreset.est)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -28,16 +80,18 @@ end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
function cm.actfilter(c,e,tp)
return c:IsCode(33310101) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
function cm.actfilter(c,tp)
return c:IsCode(33310101) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp)
end
function cm.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function cm.actop(e,tp)
rsof.SelectHint(tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.actfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.actfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if not tc then return end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
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
......
--恶魔的提线魔术
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rsof.DefineCard(33310101)
local m=33310101
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},{1,0x1},"tg",nil,LOCATION_SZONE,nil,nil,rsop.target2(cm.fun,cm.copyfilter,"tg",LOCATION_DECK),cm.copyop)
local e3=rsef.QO(c,nil,{m,1},{1,0x1},"dis",nil,LOCATION_SZONE,nil,nil,rsop.target(aux.disfilter1,"dis",0,LOCATION_ONFIELD),cm.disop)
local e4=rsef.QO(c,nil,{m,2},{1,0x1},nil,nil,LOCATION_SZONE,cm.skipcon,nil,nil,cm.skipop)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(cm.copytg)
e2:SetOperation(cm.copyop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCondition(cm.discon)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
--skip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCondition(cm.skipcon)
e4:SetOperation(cm.skipop)
c:RegisterEffect(e4)
end
function cm.copyfilter(c,e,tp)
if not c:IsCode(33310102) or not c:IsAbleToGrave() then return false end
return c:CheckActivateEffect(false,true,false)~=nil
end
function cm.copyop(e,tp)
rsof.SelectHint(tp,"tg")
local tc=Duel.SelectMatchingCard(tp,cm.copyfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
function cm.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.copyfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.copyop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.copyfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil):GetFirst()
if not tc or Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then return end
local te=tc:GetActivateEffect()
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function cm.disop(e,tp)
function cm.filter0(c)
return c:IsFaceup() and c:GetType()&0x81==0x81
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_MZONE,0,1,nil)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
end
function cm.disop(e,tp,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
rsof.SelectHint(tp,"dis")
local tc=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(rsgf.Mix2(tc))
local e1,e2=rsef.SV_LIMIT({c,tc},"dis,dise",nil,nil,rsreset.est)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g==0 then return end
Duel.HintSelection(g)
local tc=g:GetFirst()
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)
Duel.AdjustInstantly(c)
if tc:IsDisabled() and tc:IsType(TYPE_MONSTER) then
local e3=rsef.SV_INDESTRUCTABLE({c,tc},"battle",nil,nil,rsreset.est)
if tc:IsType(TYPE_MONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetReset(rsreset.est)
e4:SetCode(EFFECT_MUST_ATTACK)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
end
function cm.skipcon(e,tp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and rscon.excard2(rscf.CheckSetCard,LOCATION_MZONE,0,1,nil,"Cochrot")
function cm.cfilter(c)
return c:IsFaceup() and _G["c"..c:GetCode()].rssetcode and _G["c"..c:GetCode()].rssetcode=="Cochrot"
end
function cm.skipcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.skipop(e,tp)
function cm.skipop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
Duel.SkipPhase(p,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e2=Effect.CreateEffect(e:GetHandler())
......
--睡美人的小憇
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rsof.DefineCard(33310102)
local m=33310102
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"sp,rm",nil,nil,nil,cm.tg,cm.act)
local e2=rsef.I(c,{m,0},nil,"td,th","tg",LOCATION_GRAVE,nil,nil,rstg.target({cm.tdfilter,"td",LOCATION_REMOVED },rsop.list(Card.IsAbleToHand,"th")),cm.tdop)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.act)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:CheckSetCard("Cochrot") and Duel.IsExistingMatchingCard(cm.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,c,c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and _G["c"..c:GetCode()].rssetcode and _G["c"..c:GetCode()].rssetcode=="Cochrot" and Duel.IsExistingMatchingCard(cm.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,c,c,e,tp)
end
function cm.matfilter(c,tc,e,tp)
if c:GetRitualLevel(tc)<tc:GetLevel() then return false end
......@@ -26,10 +42,10 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function cm.act(e,tp)
rsof.SelectHint(tp,"sp")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
rsof.SelectHint(tp,"res")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local matc=Duel.SelectMatchingCard(tp,cm.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc,tc,e,tp):GetFirst()
tc:SetMaterial(Group.FromCards(matc))
if matc:IsLocation(LOCATION_GRAVE) then
......@@ -41,11 +57,20 @@ function cm.act(e,tp)
tc:CompleteProcedure()
end
function cm.tdfilter(c)
return c:IsAbleToDeck() and c:CheckSetCard("Cochrot") and c:IsFaceup()
return c:IsAbleToDeck() and _G["c"..c:GetCode()].rssetcode and _G["c"..c:GetCode()].rssetcode=="Cochrot" and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.tdop(e,tp)
local c,tc=aux.ExceptThisCard(e),rscf.GetTargetCard()
if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) and c then
Duel.SendtoHand(c,nil,REASON_EFFECT)
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--可可莉柯特·兽耳布偶
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rsof.DefineCard(33310103,"Cochrot")
local m=33310103
local cm=_G["c"..m]
cm.rssetcode="Cochrot"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=rsef.I(c,{m,0},{1,m},"se,th,sp,dish,ga",nil,LOCATION_HAND,nil,nil,rsop.target({aux.FilterBoolFunction(Card.IsDiscardable,REASON_EFFECT),"dish",LOCATION_HAND },{cm.thfilter,"th",LOCATION_DECK }),cm.thop)
local e2=rsef.FC(c,EVENT_SPSUMMON_SUCCESS)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.limitop)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
local e4=rsef.RegisterClone(c,e2,"code",EVENT_FLIP_SUMMON_SUCCESS)
local e5=rsef.RegisterClone(c,e2,"code",EVENT_TO_GRAVE,"op",cm.limitop2)
local e6=rsef.STO(c,EVENT_REMOVE,{m,1},{1,m+100},"th","de,dsp",nil,nil,rsop.target(cm.thfilter2,"th",LOCATION_GRAVE),cm.thop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_TO_GRAVE)
e5:SetOperation(cm.limitop2)
c:RegisterEffect(e5)
--tohand
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_REMOVE)
e6:SetCountLimit(1,m+100)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetTarget(cm.thtg)
e6:SetOperation(cm.thop2)
c:RegisterEffect(e6)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.thfilter(c)
return c:IsCode(33310102) and c:IsAbleToHand()
end
function cm.thop(e,tp)
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil,REASON_EFFECT)
if ct==0 then return end
rsof.SelectHint(tp,"th")
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g<=0 or Duel.SendtoHand(g,nil,REASON_EFFECT)<=0 then return end
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_GRAVE,nil,e,tp)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"sp")
local sc=sg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(sc,0,tp,1-tp,false,false,POS_FACEUP)>0 then
local e1,e2=rsef.SV_LIMIT({e:GetHandler(),sc,true},"dis,dise",nil,nil,rsreset.est)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g<=0 or Duel.SendtoHand(g,nil,REASON_EFFECT)<=0 then return end
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_GRAVE,nil,e,tp)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=sg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(sc,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
end
......@@ -43,7 +92,7 @@ function cm.limitop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cfilter2(c,tp)
return c:GetOwner()~=tp
return c:GetOwner()~=tp and c:IsType(TYPE_MONSTER)
end
function cm.limitop2(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter2,1,nil,tp) then
......@@ -56,8 +105,12 @@ end
function cm.thfilter2(c)
return c:IsAbleToHand() and c:GetType()&0x82==0x82
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop2(e,tp)
rsof.SelectHint(tp,"th")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
rsof.SendtoHand(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
\ No newline at end of file
--可可莉柯特·地狱尖啸者
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rsof.DefineCard(33310104,"Cochrot")
local m=33310104
local cm=_G["c"..m]
cm.rssetcode="Cochrot"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=rsef.QO(c,nil,{m,0},{1,m},"se,th,rm,dish,ga",nil,LOCATION_HAND,nil,nil,rsop.target({aux.FilterBoolFunction(Card.IsDiscardable,REASON_EFFECT),"dish",LOCATION_HAND },{cm.thfilter,"th",LOCATION_DECK }),cm.thop)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetCondition(cm.con)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(cm.con)
e2:SetValue(cm.aclimit)
c:RegisterEffect(e2)
local e6=rsef.STO(c,EVENT_REMOVE,{m,1},{1,m+100},"td","de,dsp",nil,nil,rsop.target(Card.IsAbleToDeck,"td",LOCATION_GRAVE+LOCATION_REMOVED),cm.tdop)
c:RegisterEffect(e2)
--todeck
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_REMOVE)
e6:SetCountLimit(1,m+100)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetTarget(cm.tdtg)
e6:SetOperation(cm.tdop)
c:RegisterEffect(e6)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.thfilter(c)
return c:IsCode(33310101) and c:IsAbleToHand()
end
function cm.thop(e,tp)
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil,REASON_EFFECT)
if ct==0 then return end
rsof.SelectHint(tp,"th")
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g<=0 or Duel.SendtoHand(g,nil,REASON_EFFECT)<=0 then return end
Duel.ConfirmCards(1-tp,g)
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil)
if #rg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
rsof.SelectHint(tp,"rm")
rg=rg:Select(tp,1,1,nil)
rsof.Remove(rg)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g<=0 or Duel.SendtoHand(g,nil,REASON_EFFECT)<=0 then return end
Duel.ConfirmCards(1-tp,g)
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil)
if #rg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
rg=rg:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function cm.con(e)
......@@ -41,8 +70,12 @@ end
function cm.aclimit(e,re,tp)
return not re:GetOwnerPlayer()~=e:GetOwnerPlayer()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.tdop(e,tp)
rsof.SelectHint(tp,"td")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
rsof.SendtoDeck(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
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