Commit 71c8d7d7 authored by Huangnan's avatar Huangnan

fix

parent b9b7a071
Pipeline #24730 passed with stages
in 21 minutes and 43 seconds
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function cm.mtfilter(c) function cm.mtfilter(c)
return c:GetBaseAttack()>=2000 and c:IsFusionType(TYPE_EFFECT) return c:GetBaseAttack()>=2000 and c:IsFusionType(TYPE_EFFECT)
end end
function cm.hspfilter(c) function cm.hspfilter(c,tp)
return c:IsSetCard(0x1cad) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(cm.hsp2filter,tp,LOCATION_GRAVE,0,1,c) return c:IsSetCard(0x1cad) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(cm.hsp2filter,tp,LOCATION_GRAVE,0,1,c)
end end
function cm.hsp2filter(c) function cm.hsp2filter(c)
...@@ -65,12 +65,13 @@ function cm.hsp2filter(c) ...@@ -65,12 +65,13 @@ function cm.hsp2filter(c)
end end
function cm.hspcon(e,c) function cm.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.IsExistingMatchingCard(cm.hspfilter,c:GetControler(),LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(cm.hspfilter,c:GetControler(),LOCATION_GRAVE,0,1,nil,c:GetControler())
and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),nil,c)>0
end end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c) function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ag=Duel.SelectMatchingCard(c:GetControler(),cm.hspfilter,c:GetControler(),LOCATION_GRAVE,0,1,1,nil) local ag=Duel.SelectMatchingCard(tp,cm.hspfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local ac=ag:GetFirst() local ac=ag:GetFirst()
local bg=Duel.SelectMatchingCard(c:GetControler(),cm.hsp2filter,c:GetControler(),LOCATION_GRAVE,0,1,1,ac) local bg=Duel.SelectMatchingCard(tp,cm.hsp2filter,tp,LOCATION_GRAVE,0,1,1,ac)
ag:Merge(bg) ag:Merge(bg)
Duel.Remove(ag,POS_FACEUP,REASON_COST) Duel.Remove(ag,POS_FACEUP,REASON_COST)
end end
...@@ -81,7 +82,7 @@ function cm.des2filter(c) ...@@ -81,7 +82,7 @@ function cm.des2filter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsSetCard(0xcad) and c:IsAbleToDeck() return c:IsSetCard(0xcad) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER)
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and cm.desfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and cm.desfilter(chkc) end
......
...@@ -50,7 +50,7 @@ function cm.initial_effect(c) ...@@ -50,7 +50,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e10) c:RegisterEffect(e10)
end end
function cm.ter1(c,e,tp) function cm.ter1(c,e,tp)
return c:IsCode(11600055) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsCode(11600005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -47,7 +47,7 @@ function cm.con1(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function cm.ter1(c) function cm.ter1(c)
return c:IsCode(40000013) and c:IsAbleToHand() return c:IsCode(11600113) and c:IsAbleToHand()
end end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.ter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
...@@ -90,7 +90,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp)
return g:GetClassCount(Card.GetCode)>5 return g:GetClassCount(Card.GetCode)>5
end end
function cm.e3ter2(c,e,tp,mc) function cm.e3ter2(c,e,tp,mc)
return c:IsCode(40000006) and mc:IsCanBeXyzMaterial(c) return c:IsCode(11600106) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -46,10 +46,10 @@ function cm.initial_effect(c) ...@@ -46,10 +46,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.ter0(c) function cm.ter0(c)
return c:IsCode(40000006) return c:IsCode(11600106)
end end
function cm.ter01(c) function cm.ter01(c)
return c:IsCode(40000012) return c:IsCode(11600112)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(cm.ter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
......
...@@ -26,10 +26,8 @@ function cm.initial_effect(c) ...@@ -26,10 +26,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end end
function cm.ter1(c,e,tp,check) function cm.ter1(c,e,tp,check)
return c:IsSetCard(0x3541) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) return c:IsSetCard(0x3541) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
...@@ -37,13 +35,13 @@ end ...@@ -37,13 +35,13 @@ end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,40000008) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,11600108)
return Duel.IsExistingMatchingCard(cm.ter1,tp,LOCATION_DECK,0,1,nil,e,tp,check) return Duel.IsExistingMatchingCard(cm.ter1,tp,LOCATION_DECK,0,1,nil,e,tp,check)
end end
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,40000008) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,11600108)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,cm.ter1,tp,LOCATION_DECK,0,1,1,nil,e,tp,check):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.ter1,tp,LOCATION_DECK,0,1,1,nil,e,tp,check):GetFirst()
if tc then if tc then
......
...@@ -77,5 +77,5 @@ function c50213245.cfilter(c) ...@@ -77,5 +77,5 @@ function c50213245.cfilter(c)
return c:IsSetCard(0xcbf) and c:IsFaceup() return c:IsSetCard(0xcbf) and c:IsFaceup()
end end
function c50213245.handcon(e) function c50213245.handcon(e)
return Duel.IsExistingMatchingCard(c50213245.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c50213245.cfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,nil)
end end
\ No newline at end of file
...@@ -56,7 +56,7 @@ function c65050147.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c65050147.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=tg:GetFirst() local tc=tg:GetFirst()
while tc and ft>0 do while tc and ft>0 do
local tgg=Group.FromCards(tc) local tgg=Group.FromCards(tc)
Duel.HintSelection(tp,tgg) Duel.HintSelection(tgg)
if Duel.SelectYesNo(tp,aux.Stringid(65050147,0)) then if Duel.SelectYesNo(tp,aux.Stringid(65050147,0)) then
if tc:IsType(TYPE_RITUAL) then if tc:IsType(TYPE_RITUAL) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
......
...@@ -6,7 +6,6 @@ function c65080068.initial_effect(c) ...@@ -6,7 +6,6 @@ function c65080068.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,65080068) e1:SetCountLimit(1,65080068)
e1:SetTarget(c65080068.tg) e1:SetTarget(c65080068.tg)
e1:SetOperation(c65080068.op) e1:SetOperation(c65080068.op)
...@@ -58,15 +57,15 @@ function c65080068.filter(c,e,tp) ...@@ -58,15 +57,15 @@ function c65080068.filter(c,e,tp)
return aux.IsCodeListed(c,65080061) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return aux.IsCodeListed(c,65080061) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c65080068.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c65080068.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsEnvironment(65080061) and Duel.IsExistingTarget(c65080068.filter0,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b1=Duel.IsEnvironment(65080061) and Duel.IsExistingMatchingCard(c65080068.filter0,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingTarget(c65080068.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b2=Duel.IsExistingMatchingCard(c65080068.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return (b1 or b2) and Duel.GetMZoneCount(tp)>0 end if chk==0 then return (b1 or b2) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c65080068.op(e,tp,eg,ep,ev,re,r,rp) function c65080068.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local b1=Duel.IsEnvironment(65080061) and Duel.IsExistingTarget(c65080068.filter0,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b1=Duel.IsEnvironment(65080061) and Duel.IsExistingTarget(c65080068.filter0,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingTarget(c65080068.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b2=Duel.IsExistingMatchingCard(c65080068.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local g=Group.CreateGroup() local g=Group.CreateGroup()
if b1 then if b1 then
local g1=Duel.GetMatchingGroup(c65080068.filter0,tp,LOCATION_GRAVE,0,nil,e,tp) local g1=Duel.GetMatchingGroup(c65080068.filter0,tp,LOCATION_GRAVE,0,nil,e,tp)
...@@ -74,7 +73,7 @@ function c65080068.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +73,7 @@ function c65080068.op(e,tp,eg,ep,ev,re,r,rp)
g1:Merge(g2) g1:Merge(g2)
g=g1:Select(tp,1,1,nil) g=g1:Select(tp,1,1,nil)
elseif b2 then elseif b2 then
g=Duel.SelectMatchingCard(tp,c65080068.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) g=Duel.SelectMatchingCard(tp,c65080068.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
\ No newline at end of file
...@@ -3,6 +3,23 @@ yume=yume or {} ...@@ -3,6 +3,23 @@ yume=yume or {}
if c71401001 then if c71401001 then
function c71401001.initial_effect(c) function c71401001.initial_effect(c)
--spsummon --spsummon
--[[
Auxiliary effect to ensure this card in GY before effect cost for Magician's Rod.
In case of issues where this effect could activate when sent to GY because of effect cost,
such as tributed by Enemy Controller
or destroyed when Call of the Haunted was sent to GY by Forbidden Droplet.
Be informed that do not use this if the effect is a quick effect(Paleozoic)
or the trigger location is Hand according to game ruling.
]]
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_ACTIVATE_COST)
e0:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(c71401001.costtg)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,0)) e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -33,8 +50,12 @@ function c71401001.initial_effect(c) ...@@ -33,8 +50,12 @@ function c71401001.initial_effect(c)
c:RegisterEffect(e2a) c:RegisterEffect(e2a)
yume.ButterflyCounter() yume.ButterflyCounter()
end end
function c71401001.costtg(e,te,tp)
return te:IsActiveType(TYPE_MONSTER)
end
function c71401001.con1(e,tp,eg,ep,ev,re,r,rp) function c71401001.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) local c=e:GetHandler()
return c:GetFlagEffect(FLAG_ID_CHAINING)>0 or re:IsActiveType(TYPE_MONSTER) and c:IsLocation(LOCATION_HAND)
end end
function c71401001.filterc1(c,tp) function c71401001.filterc1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToRemoveAsCost() return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToRemoveAsCost()
......
...@@ -2,6 +2,23 @@ ...@@ -2,6 +2,23 @@
if not c71401001 then dofile("expansions/script/c71401001.lua") end if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401007.initial_effect(c) function c71401007.initial_effect(c)
--spsummon --spsummon
--[[
Auxiliary effect to ensure this card in GY before effect cost for Magician's Rod.
In case of issues where this effect could activate when sent to GY because of effect cost,
such as tributed by Enemy Controller
or destroyed when Call of the Haunted was sent to GY by Forbidden Droplet.
Be informed that do not use this if the effect is a quick effect(Paleozoic)
or the trigger location is Hand according to game ruling.
]]
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_ACTIVATE_COST)
e0:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(c71401007.costtg)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,0)) e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -29,8 +46,12 @@ function c71401007.initial_effect(c) ...@@ -29,8 +46,12 @@ function c71401007.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
yume.ButterflyCounter() yume.ButterflyCounter()
end end
function c71401007.costtg(e,te,tp)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
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) local c=e:GetHandler()
return c:GetFlagEffect(FLAG_ID_CHAINING)>0 or re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND)
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_HAND,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
......
--阴暗天使 糖歌
local m=81011088
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon1)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(cm.discon2)
c:RegisterEffect(e2)
end
function cm.discon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsCode(81011087)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.thcfilter(c)
return c:IsFacedown() or not (c:IsLevel(2) or c:IsRank(2))
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
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=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
if not Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
...@@ -6,6 +6,7 @@ function c9310049.initial_effect(c) ...@@ -6,6 +6,7 @@ function c9310049.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,9310049)
e1:SetTarget(c9310049.thtg) e1:SetTarget(c9310049.thtg)
e1:SetOperation(c9310049.thop) e1:SetOperation(c9310049.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
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