Commit 2b706e65 authored by songtongtong's avatar songtongtong

bug fix

parent 373da155
--恋爱头脑战-藤原千花 --恋爱头脑战-藤原千花
local m=12812006 local m=12812006
local cm=_G["c"..m] local cm=_G["c"..m]
function c12812006.initial_effect(c) function c12812006.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
c:SetSPSummonOnce(12812006) c:SetSPSummonOnce(12812006)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(cm.psplimit) e1:SetTarget(cm.psplimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,12812106) e2:SetCountLimit(1,12812106)
e2:SetCondition(cm.discon) e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg) e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop) e2:SetOperation(cm.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end
-- function cm.psplimit(e,c,tp,sumtp,sumpos)
cm.self_summon_effect=e3 return not c:IsSetCard(0xa73) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
function cm.psplimit(e,c,tp,sumtp,sumpos) --效果1
return not c:IsSetCard(0xa73) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM function cm.discon(e,tp,eg,ep,ev,re,r,rp)
end return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
--效果1 and Duel.IsChainDisablable(ev) and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp
function cm.discon(e,tp,eg,ep,ev,re,r,rp) end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsChainDisablable(ev) and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp if chk==0 then return e:GetHandler():IsDestructable() end
end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
if chk==0 then return e:GetHandler():IsDestructable() end end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then
end Duel.NegateEffect(ev)
function cm.disop(e,tp,eg,ep,ev,re,r,rp) end
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then return end end
Duel.NegateEffect(ev) --效果2
end function cm.filter(c)
--效果2 return c:IsSetCard(0xa73) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
function cm.filter(c) end
return c:IsSetCard(0xa73) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end local c=e:GetHandler()
function cm.thop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end
local c=e:GetHandler() local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK,0,1,1,nil)
if not c:IsRelateToEffect(e) then return end if g:GetCount()>0 then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoHand(g,nil,REASON_EFFECT)
if g:GetCount()>0 then Duel.ConfirmCards(1-tp,g)
Duel.SendtoHand(g,nil,REASON_EFFECT) end
Duel.ConfirmCards(1-tp,g)
end
end end
\ No newline at end of file
--冲锋陷阵的教团骑士 --天命真王 梦想王
if not pcall(function() require("expansions/script/c16104200") end) then require("script/c16104200") end if not pcall(function() require("expansions/script/c16104200") end) then require("script/c16104200") end
local m,cm=rk.set(16104240) local m,cm=rk.set(16104240)
function cm.initial_effect(c) function cm.initial_effect(c)
...@@ -132,7 +132,7 @@ function cm.is_include(value,tab) ...@@ -132,7 +132,7 @@ function cm.is_include(value,tab)
return false return false
end end
function cm.xyz(c) function cm.xyz(c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsSetCard(0xccd)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local ex=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE) local ex=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE)
......
...@@ -90,8 +90,8 @@ function cm.splimit(e,c) ...@@ -90,8 +90,8 @@ function cm.splimit(e,c)
end end
--Effect 2 --Effect 2
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return (c:IsSetCard(0xccb) return c:IsSetCard(0xccb)
and c:IsType(TYPE_MONSTER) and c:IsFaceup()) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
......
...@@ -3,7 +3,6 @@ local m=16104425 ...@@ -3,7 +3,6 @@ local m=16104425
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c16199990.lua") Duel.LoadScript("c16199990.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--splimit --splimit
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
......
...@@ -16,7 +16,8 @@ end ...@@ -16,7 +16,8 @@ end
function c33310200.filter1(c,e) function c33310200.filter1(c,e)
return c:IsPublic() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) and c:IsAbleToDeck() return c:IsPublic() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) and c:IsAbleToDeck()
end end
function c33310200.filter2(c,e,tp,m,f,chkf,m2) function c33310200.filter2(c,e,tp,sg,f,chkf,m2)
local m=sg:Clone()
if c:IsSetCard(0x551) then m:Merge(m2) end if c:IsSetCard(0x551) then m:Merge(m2) end
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
......
This diff is collapsed.
--星曜女神·乐音 --星曜女神·乐音
local m=66915007 local m=66915007
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit) e1:SetValue(cm.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA) e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon) e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tograve --tograve
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetTarget(cm.tgtg) e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop) e3:SetOperation(cm.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--cannot be link material --cannot be link material
local e33=Effect.CreateEffect(c) local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_SINGLE) e33:SetType(EFFECT_TYPE_SINGLE)
e33:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e33:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e33:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e33:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e33:SetValue(1) e33:SetValue(1)
c:RegisterEffect(e33) c:RegisterEffect(e33)
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and ((c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)) or c:IsType(TYPE_TRAP)) return c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and ((c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)) or c:IsType(TYPE_TRAP))
end end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
if not StarLight_from_K then return false end if not StarLight_from_K then return false end
return StarLight_from_K.Brightstarlight_Effect[se] return StarLight_from_K.Brightstarlight_Effect[se]
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil) return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.filter(c) function cm.filter(c)
return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001) return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g) Duel.SSet(tp,g)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsType(TYPE_TRAP) then if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
end end
--行星女神·希冀 --行星女神·希冀
function c66915038.initial_effect(c) function c66915038.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c66915038.splimit) e1:SetValue(c66915038.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--base atk/def --base atk/def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c66915038.atkval) e1:SetValue(c66915038.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_LEAVE_GRAVE) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetTarget(c66915038.rectg) e3:SetTarget(c66915038.rectg)
e3:SetOperation(c66915038.recop) e3:SetOperation(c66915038.recop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c66915038.splimit(e,se,sp,st) function c66915038.splimit(e,se,sp,st)
if not StarLight_from_K then return false end if not StarLight_from_K then return false end
return StarLight_from_K.Brightstarlight_Effect[se] return StarLight_from_K.Brightstarlight_Effect[se]
end end
function c66915038.atkval(e,c) function c66915038.atkval(e,c)
return c:GetOverlayCount()*200 return c:GetOverlayCount()*200
end end
function c66915038.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c66915038.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function c66915038.matfilter(c,tp) function c66915038.matfilter(c,tp)
return not (c:IsCode(66915037) and c:IsControler(tp)) return not (c:IsCode(66915037) and c:IsControler(tp))
end end
function c66915038.matfilters(c) function c66915038.matfilters(c)
return c:IsCode(66915037) and c:IsAbleToRemove() return c:IsCode(66915037) and c:IsAbleToRemove()
end end
function c66915038.filter(c) function c66915038.filter(c)
return c:IsCode(66915037) and c:IsAbleToHand() return c:IsCode(66915037) and c:IsAbleToHand()
end end
function c66915038.recop(e,tp,eg,ep,ev,re,r,rp) function c66915038.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local count=c:GetOverlayCount() local count=c:GetOverlayCount()
if count<=20 then if count<=20 then
if not c:IsType(TYPE_XYZ) then return end if not c:IsType(TYPE_XYZ) then return end
local ct=10 local ct=10
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanOverlay),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanOverlay),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
if g:GetCount()<10 then if g:GetCount()<10 then
ct=g:GetCount() ct=g:GetCount()
end end
local sg=g:RandomSelect(tp,ct) local sg=g:RandomSelect(tp,ct)
Duel.Overlay(c,sg) Duel.Overlay(c,sg)
else else
local g=Duel.GetMatchingGroup(c66915038.matfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e),tp) local g=Duel.GetMatchingGroup(c66915038.matfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e),tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
if count>=50 then if count>=50 then
local g1=Duel.GetMatchingGroup(c66915038.matfilters,tp,LOCATION_ONFIELD,0,nil) local g1=Duel.GetMatchingGroup(c66915038.matfilters,tp,LOCATION_ONFIELD,0,nil)
g1:AddCard(c) g1:AddCard(c)
if Duel.Remove(g1,POS_FACEDOWN,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c66915038.filter,tp,LOCATION_DECK,0,1,nil) then if Duel.Remove(g1,POS_FACEDOWN,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c66915038.filter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66915038.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66915038.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
end end
\ No newline at end of file
--耀星女神·希冀 --耀星女神·希冀
local m=66915073 local m=66915073
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,66915070) aux.AddCodeList(c,66915070)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,cm.mfilter,4,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop) aux.AddXyzProcedure(c,cm.mfilter,4,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
--code --code
aux.EnableChangeCode(c,m-3,LOCATION_MZONE+LOCATION_GRAVE) aux.EnableChangeCode(c,m-3,LOCATION_MZONE+LOCATION_GRAVE)
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit) e1:SetValue(cm.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--X M --X M
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DICE) e1:SetCategory(CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--T F --T F
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_DICE) e2:SetCategory(CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetTarget(cm.target1) e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1) e2:SetOperation(cm.operation1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
if not StarLight_from_K then return true end if not StarLight_from_K then return true end
return not StarLight_from_K.Brightstarlight_Effect[se] return not StarLight_from_K.Brightstarlight_Effect[se]
end end
function cm.mfilter(c) function cm.mfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function cm.ovfilter(c) function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(m-3) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsCode(m-3) and c:IsType(TYPE_XYZ)
end end
function cm.xfilter(c) function cm.xfilter(c)
return c:IsCanOverlay() return c:IsCanOverlay()
end end
function cm.xfilter2(c) function cm.xfilter2(c)
return c:IsCanOverlay() and c:IsSetCard(0x374) and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsCanOverlay() and c:IsSetCard(0x374) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:GetOriginalType()&TYPE_CONTINUOUS~=0 and c:GetOriginalType()&TYPE_SPELL~=0 and c:IsSetCard(0x374) and c:CheckUniqueOnField(tp) and not c:IsForbidden() return c:GetOriginalType()&TYPE_CONTINUOUS~=0 and c:GetOriginalType()&TYPE_SPELL~=0 and c:IsSetCard(0x374) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end end
function cm.xyzop(e,tp,chk) function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(cm.xfilter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(cm.xfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=Duel.SelectMatchingCard(tp,cm.xfilter,tp,LOCATION_SZONE,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,cm.xfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Overlay(e:GetHandler(),tg) Duel.Overlay(e:GetHandler(),tg)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function cm.condition(e,tp) function cm.condition(e,tp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(cm.xfilter2,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(cm.xfilter2,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,PLAYER_ALL,1)
end end
cm.toss_dice=true cm.toss_dice=true
function cm.operation(e,tp) function cm.operation(e,tp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return false end if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return false end
local dice_for_it_half=math.ceil(Duel.TossDice(tp,1)/2) local dice_for_it_half=math.ceil(Duel.TossDice(tp,1)/2)
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_MESSAGE,tp,HINTMSG_XMATERIAL)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.xfilter2),tp,LOCATION_DECK+LOCATION_SZONE,0,dice_for_it_half,dice_for_it_half,nil) local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.xfilter2),tp,LOCATION_DECK+LOCATION_SZONE,0,dice_for_it_half,dice_for_it_half,nil)
if not tg or tg:GetCount()<1 then return end if not tg or tg:GetCount()<1 then return end
Duel.Overlay(e:GetHandler(),tg) Duel.Overlay(e:GetHandler(),tg)
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(cm.xfilter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(cm.xfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,PLAYER_ALL,1)
end end
function cm.operation1(e,tp) function cm.operation1(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return false end if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return false end
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_MESSAGE,tp,HINTMSG_XMATERIAL)
local tg=Duel.SelectMatchingCard(tp,cm.xfilter,tp,LOCATION_SZONE,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,cm.xfilter,tp,LOCATION_SZONE,0,1,1,nil)
if not tg or tg:GetCount()<1 then return end if not tg or tg:GetCount()<1 then return end
Duel.Overlay(e:GetHandler(),tg) Duel.Overlay(e:GetHandler(),tg)
local dice_for_it_half=math.ceil(Duel.TossDice(tp,1)/2) local dice_for_it_half=math.ceil(Duel.TossDice(tp,1)/2)
Duel.BreakEffect() Duel.BreakEffect()
local ft=dice_for_it_half local ft=dice_for_it_half
if ft>Duel.GetLocationCount(tp,LOCATION_SZONE) then if ft>Duel.GetLocationCount(tp,LOCATION_SZONE) then
ft=Duel.GetLocationCount(tp,LOCATION_SZONE) ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)==0 then if Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)==0 then
ft=ft-1 ft=ft-1
end end
end end
if ft<=0 then return end if ft<=0 then return end
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_MESSAGE,tp,HINTMSG_TOFIELD)
local sg=c:GetOverlayGroup() local sg=c:GetOverlayGroup()
local tfg=sg:FilterSelect(tp,cm.tffilter,1,ft,nil) local tfg=sg:FilterSelect(tp,cm.tffilter,1,ft,nil)
for tc in aux.Next(tfg) do for tc in aux.Next(tfg) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
--蝶梦-「绽」 --蝶梦-「绽」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end) xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401002.initial_effect(c) function c71401002.initial_effect(c)
yume.AddButterflySpell(c,71401002) yume.AddButterflySpell(c,71401002)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401002,0)) e2:SetDescription(aux.Stringid(71401002,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,71501002) e2:SetCountLimit(1,71501002)
e2:SetCondition(c71401002.con2) e2:SetCondition(c71401002.con2)
e2:SetCost(c71401002.cost2) e2:SetCost(c71401002.cost2)
e2:SetTarget(c71401002.tg2) e2:SetTarget(c71401002.tg2)
e2:SetOperation(c71401002.op2) e2:SetOperation(c71401002.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
yume.ButterflyCounter() yume.ButterflyCounter()
end end
function c71401002.con2(e,tp,eg,ep,ev,re,r,rp) function c71401002.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS return re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end end
function c71401002.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401002.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp) yume.RegButterflyCostLimit(e,tp)
end end
function c71401002.filter2(c,tp) function c71401002.filter2(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp)) return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp))
end end
function c71401002.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401002.filter2,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c71401002.filter2,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c71401002.op2(e,tp,eg,ep,ev,re,r,rp) function c71401002.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c71401002.filter2,tp,LOCATION_DECK,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c71401002.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local b1=tc:IsAbleToHand() local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp) local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1150,aux.Stringid(71401002,1))==0) then if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401002,1))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS) e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
end end
end end
\ No newline at end of file
--蝶现-「宴」 --蝶现-「宴」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end) xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401007.initial_effect(c) function c71401007.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401007,0)) e1:SetDescription(aux.Stringid(71401007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,71401007) e1:SetCountLimit(1,71401007)
e1:SetCondition(c71401007.con1) e1:SetCondition(c71401007.con1)
e1:SetCost(c71401007.cost1) e1:SetCost(c71401007.cost1)
e1:SetTarget(c71401007.tg1) e1:SetTarget(c71401007.tg1)
e1:SetOperation(c71401007.op1) e1:SetOperation(c71401007.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401007,1)) e2:SetDescription(aux.Stringid(71401007,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,71501007) e2:SetCountLimit(1,71501007)
e2:SetCost(c71401007.cost2) e2:SetCost(c71401007.cost2)
e2:SetTarget(c71401007.tg2) e2:SetTarget(c71401007.tg2)
e2:SetOperation(c71401007.op2) e2:SetOperation(c71401007.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
yume.ButterflyCounter() yume.ButterflyCounter()
end end
function c71401007.con1(e,tp,eg,ep,ev,re,r,rp) function c71401007.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function c71401007.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71401007.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp) yume.RegButterflyCostLimit(e,tp)
end end
function c71401007.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71401007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c71401007.op1(e,tp,eg,ep,ev,re,r,rp) function c71401007.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c71401007.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401007.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp) yume.RegButterflyCostLimit(e,tp)
end end
function c71401007.filter2ext(c) function c71401007.filter2ext(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS)
end end
function c71401007.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401007.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401007.filter2ext,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71401007.filter2ext,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end end
function c71401007.filter2(c,e,tp) function c71401007.filter2(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71401007.op2(e,tp,eg,ep,ev,re,r,rp) function c71401007.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,2,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.BreakEffect() Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
This diff is collapsed.
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