Commit 1153cdcc authored by POLYMER's avatar POLYMER

fix

parent eb646372
...@@ -1298,10 +1298,6 @@ ...@@ -1298,10 +1298,6 @@
70052430 0 70052430 0
70052431 0 70052431 0
70052433 0 70052433 0
71500005 0
71500006 0
71500016 0
71500017 0
72100301 0 72100301 0
72100302 0 72100302 0
72100303 0 72100303 0
...@@ -2948,7 +2944,6 @@ ...@@ -2948,7 +2944,6 @@
37818797 0 --卡通真红眼龙骑士 37818797 0 --卡通真红眼龙骑士
10150077 0 --救世蔷薇龙 10150077 0 --救世蔷薇龙
#Limited #Limited
71500009 1 --执刀警戒
33701329 0 --水晶魔法小妖精 露克西 33701329 0 --水晶魔法小妖精 露克西
#Semi-Limited #Semi-Limited
53796110 2 --无可替代 53796110 2 --无可替代
......
No preview for this file type
No preview for this file type
--枯荣
local cm,m=GetID()
function c71500004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.tdtg2)
e1:SetOperation(cm.tdop2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.rfilter(c,e,tp)
return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.stfilter(c)
return c:IsCode(63086455,11110218,85698115) and not c:IsForbidden()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.rfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.rfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) and Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
local b2=Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,2)},
{b2,aux.Stringid(m,3)})
if op==1 then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
elseif op==2 then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
end
function cm.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function cm.tdop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,g)
end
end
--陷阱反击防护罩
local cm,m=GetID()
function c71500005.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+2)
e2:SetCost(cm.thcost)
e2:SetOperation(cm.cdop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10045474,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.tdcon2)
e3:SetTarget(cm.tdtg2)
e3:SetOperation(cm.tdop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_REMOVED)
c:RegisterEffect(e4)
if cm.counter==nil then
cm.counter=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
end
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
if re:GetHandlerPlayer()==tp then
local rc=re:GetHandler()
local g71500005=Group.CreateGroup()
if e:GetLabelObject()==nil then
g71500005:AddCard(rc)
else
g71500005:Merge(e:GetLabelObject())
g71500005:AddCard(rc)
end
g71500005:KeepAlive()
e:SetLabelObject(g71500005)
if g71500005:GetClassCount(Card.GetCode)>=3 then Duel.RegisterFlagEffect(tp,m,0,0,0) end
else
local rc=re:GetHandler()
local g71500006=Group.CreateGroup()
if e:GetLabelObject()==nil then
g71500006:AddCard(rc)
else
g71500006:Merge(e:GetLabelObject())
g71500006:AddCard(rc)
end
g71500006:KeepAlive()
e:SetLabelObject(g71500006)
if g71500006:GetClassCount(Card.GetCode)>=3 then Duel.RegisterFlagEffect(1-tp,m,0,0,0) end
end
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.cdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.damval1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_LPCOST_CHANGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetValue(cm.costchange)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetValue(1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return not re:GetHandler():IsType(TYPE_TRAP)
end
function cm.damval1(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetOwnerPlayer() then return 0
else return val end
end
function cm.costchange(e,re,rp,val)
if re and not re:GetHandler():IsCode(9236985,57496978) then
return 0
else
return val
end
end
function cm.fit(c)
return not c:IsType(TYPE_TRAP)
end
function cm.handcon(e)
return Duel.GetMatchingGroupCount(cm.fit,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)==0
end
function cm.tdcon2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)==nil then return false
else return Duel.GetFlagEffect(tp,m)>0 end
end
function cm.stfilter(c)
return c:IsSSetable() and not c:IsForbidden() and c:IsType(TYPE_TRAP) and c:IsFaceup()
end
function cm.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsAbleToHand() end
end
function cm.tdop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local tg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if #tg<1 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local sg=tg:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--集结!陷阱风暴
local cm,m=GetID()
function c71500006.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.stfilter(c)
return c:IsSSetable() and not c:IsForbidden() and c:IsType(TYPE_TRAP)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetChainLimit(aux.FALSE)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,cm.stfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(cm.target)
e1:SetValue(cm.indct)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition1)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetCondition(cm.actcon1)
e3:SetValue(cm.aclimit)
Duel.RegisterEffect(e3,tp)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetCondition(cm.checkcon)
e5:SetOperation(cm.checkop)
Duel.RegisterEffect(e5,tp)
local e10=Effect.CreateEffect(e:GetHandler())
e10:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e10:SetCode(EVENT_SPSUMMON_SUCCESS)
e10:SetCondition(cm.spcon)
e10:SetOperation(cm.spop)
Duel.RegisterEffect(e10,tp)
local e11=e10:Clone()
e11:SetCode(EVENT_SUMMON_SUCCESS)
Duel.RegisterEffect(e11,tp)
local e12=e10:Clone()
e12:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(e12,tp)
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_FIELD)
e14:SetCode(EFFECT_SET_ATTACK_FINAL)
e14:SetTargetRange(LOCATION_MZONE,0)
e14:SetValue(0)
Duel.RegisterEffect(e14,tp)
local e15=e14:Clone()
e15:SetCode(EFFECT_SET_DEFENSE_FINAL)
Duel.RegisterEffect(e15,tp)
end
end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_MONSTER)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.fit(c)
return c:GetType()&TYPE_EFFECT~=0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and eg:IsExists(cm.fit,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetTarget(cm.limittg)
e6:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e6,tp)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e7,tp)
local e8=e6:Clone()
e8:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e8,tp)
end
function cm.target(e,c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function cm.stfilter(c)
return c:IsType(TYPE_TRAP) and not c:IsForbidden() and c:IsSSetable()
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 end
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
aux.GiveUpNormalDraw(e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,2,2,nil)
Duel.SSet(tp,sg)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
end
function cm.actcon1(e)
local tp=e:GetHandlerPlayer()
local n=Duel.GetFlagEffect(tp,m)
if n==nil then return false end
return Duel.GetFlagEffect(tp,m)>0
end
function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL+TYPE_MONSTER)
end
function cm.limittg(e,c,sump,sumtype,sumpos,targetp)
return c:GetOriginalType()&TYPE_EFFECT>0
end
--樱花指向的通路
local cm,m=GetID()
function c71500007.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.condition)
e1:SetTarget(cm.tdtg2)
e1:SetOperation(cm.tdop2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+2)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,71521025)
end
function cm.stfilter(c,tp)
return c:IsCode(63086455,11110218,85698115) and not c:IsForbidden()and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function cm.tdop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SSet(tp,g)
end
end
function cm.rfilter(c,e,tp)
return c:IsCode(71521025) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.rfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.rfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and rc:IsRelateToEffect(e) and Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECTS) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsImmuneToEffect(e) then
Duel.MoveToField(c,tp,c:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil,REASON_EFFECTS)
end
end
\ No newline at end of file
local cm,m=GetID()
function cm.initial_effect(c)
-- 效果①:从额外卡组送墓,特殊召唤衍生物
aux.AddCodeList(c,71521025)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
-- 效果②:除外自身,盖放陷阱
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.con2)
e2:SetCost(cm.cost2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
-- 效果①:条件 - 自己场上不存在怪兽
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
-- 效果①:目标
function cm.release_filter(c)
return c:IsReleasable() and (c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) or c:IsType(TYPE_LINK))
end
function cm.check_type_group(g)
local has_fusion=0
local has_synchro=0
local has_xyz=0
local has_link=0
for tc in aux.Next(g) do
if tc:IsType(TYPE_FUSION) then has_fusion=1 end
if tc:IsType(TYPE_SYNCHRO) then has_synchro=1 end
if tc:IsType(TYPE_XYZ) then has_xyz=1 end
if tc:IsType(TYPE_LINK) then has_link=1 end
end
return (has_fusion+has_synchro+has_xyz+has_link)==4
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.release_filter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return g:CheckSubGroup(cm.check_type_group,4) and Duel.GetLocationCount(tp,LOCATION_MZONE)>3 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsPlayerCanSpecialSummonMonster(tp,71500022,nil,TYPES_TOKEN_MONSTER,2000,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0)
end
-- 效果①:操作
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ng=Duel.GetMatchingGroup(cm.release_filter,tp,LOCATION_EXTRA,0,nil)
-- 依次选择四个类型的各1张
if not ng:CheckSubGroup(cm.check_type_group,4) or Duel.GetLocationCount(tp,LOCATION_MZONE)<4 or Duel.IsPlayerAffectedByEffect(tp,59822133) or not Duel.IsPlayerCanSpecialSummonMonster(tp,71500022,nil,TYPES_TOKEN_MONSTER,2000,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local c=e:GetHandler()
local tg=ng:SelectSubGroup(tp,cm.check_type_group,false,4,4)
if #tg==4 and Duel.SendtoGrave(tg,REASON_EFFECT)==4 then
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
-- 特殊召唤衍生物
for i=1,4 do
local token=Duel.CreateToken(tp,71500022)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetAbsoluteRange(tp,1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
-- 限制额外卡组特殊召唤
end
-- 效果①:额外卡组筛选
function cm.filter1(c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
-- 效果①:限制额外卡组特殊召唤
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
-- 效果②:条件 - 自己场上没有怪兽或有「幽世之血樱」
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_MZONE,0,1,nil))
end
-- 效果②:成本 - 除外自身
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
-- 效果②:目标
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
-- 效果②:操作
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter3),tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,e:GetHandler())
if #g>0 then
Duel.SSet(tp,g:GetFirst())
end
end
-- 效果②:「幽世之血樱」筛选
function cm.filter2(c)
return c:IsCode(71521025) and c:IsFaceup()
end
-- 效果②:陷阱卡筛选
function cm.filter3(c)
return c:IsType(TYPE_TRAP) and (aux.IsCodeListed(c,71521025)or c:IsCode(65899925,71500007,71500010,71500012,71500015,71527471)) and c:IsSSetable() and not c:IsCode(m)
end
local cm,m=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,71500019)
--激活限制
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
--效果1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
--效果2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.eqtarget)
e3:SetOperation(cm.eqoperation)
c:RegisterEffect(e3)
end
cm.card_atk=0
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(71500019)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsAbleToRemove() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(aux.AND(Card.IsAbleToRemove,Card.IsType),tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectTarget(tp,aux.AND(Card.IsAbleToRemove,Card.IsType),tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if sg:GetCount()>0 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REMOVED_REASON_COST)
end
function cm.eqfilter(c)
return c:IsFaceup() and c:IsCode(71500019)
end
function cm.eqtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.eqfilter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.eqoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(cm.atkup)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
end
function cm.efilter(e,te)
return te:GetHandler()~=e:GetHandler() and te:GetHandler():IsType(TYPE_MONSTER)
end
function cm.atkfilter(c,tc)
return c:IsFaceup() and c~=tc
end
function cm.atkup(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
Debug.Message(tc:GetCode())
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tc)
local atk=0
local c=g:GetFirst()
while c do
--Debug.Message(atk)
atk=atk+c:GetAttack()
atk=atk+c:GetDefense()
c=g:GetNext()
end
Debug.Message(atk)
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
\ No newline at end of file
--战术先决
local cm,m=GetID()
function c71500016.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m+1+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(cm.discost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation2)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(bit.band(re:GetActiveType(),0x7))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
if e:GetLabel()==0x1 then
e1:SetDescription(aux.Stringid(m,2))
e1:SetValue(cm.aclimit1)
elseif e:GetLabel()==0x2 then
e1:SetDescription(aux.Stringid(m,3))
e1:SetValue(cm.aclimit2)
else
e1:SetDescription(aux.Stringid(m,4))
e1:SetValue(cm.aclimit3)
end
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit1(e,re,tp)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.aclimit2(e,re,tp)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL))
end
function cm.aclimit3(e,re,tp)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP))
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
if e:GetLabel()==0 then
e1:SetDescription(aux.Stringid(m,5))
e1:SetValue(cm.aclimit11)
elseif e:GetLabel()==1 then
e1:SetDescription(aux.Stringid(m,6))
e1:SetValue(cm.aclimit12)
else
e1:SetDescription(aux.Stringid(m,7))
e1:SetValue(cm.aclimit13)
end
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e11=e1:Clone()
e11:SetTargetRange(1,0)
e11:SetReset(RESET_PHASE+PHASE_END,999)
Duel.RegisterEffect(e11,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(0,1)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e4,tp)
end
function cm.aclimit11(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.aclimit12(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL))
end
function cm.aclimit13(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP))
end
--陷阱大崩落
local cm,m=GetID()
function c71500017.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
--e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10045474,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.fit0(c)
return not c:IsType(TYPE_TRAP)
end
function cm.handcon(e)
return Duel.GetMatchingGroupCount(cm.fit0,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)==0
end
function cm.chainfilter(re,tp,cid)
return re:GetHandler():IsType(TYPE_TRAP)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return not re:GetHandler():IsType(TYPE_TRAP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.fit(c)
return c:IsType(TYPE_TRAP) and c:IsFaceup() and c:IsSSetable()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg1,REASON_EFFECT)
local a=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_TRAP):GetCount()
local sg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg2,REASON_EFFECT)
local b=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_TRAP):GetCount()
local s1=Duel.GetLocationCount(tp,LOCATION_SZONE)
local s2=a+b
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fit),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,math.min(s1,s2),math.min(s1,s2),nil)
Duel.SSet(tp,g)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--
local cm,m=GetID()
function c71500018.initial_effect(c)
-- 这张卡的发动和效果不会被无效化
-- 效果①:给予伤害并抽卡
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(cm.cost1)
e3:SetTarget(cm.target1)
e3:SetOperation(cm.operation1)
c:RegisterEffect(e3)
-- 效果②:回复基本分
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e4:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e4:SetCost(cm.cost2)
e4:SetTarget(cm.target2)
e4:SetOperation(cm.operation2)
c:RegisterEffect(e4)
end
-- 效果①:Cost
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsCode(71500018) and re:IsActivated(EFFECT_TYPE_ACTIVATE) then
Debug.Message(1)
Duel.RegisterFlagEffect(tp,m,0,0,0)
end
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
-- 效果①:Target
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsCode(m) then
Duel.RegisterFlagEffect(tp,m,0,EFFECT_FLAG_OATH,0)
end
local ct=Duel.GetFlagEffect(tp,m)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*200+200)
if ct-2>0 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct-3)
end
end
-- 效果①:Operation
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,m)
if ct==0 then return end
-- 给予伤害
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
-- 抽卡
local draw=math.max(ct-3,0)
if draw>0 then
Duel.Draw(tp,draw,REASON_EFFECT)
end
end
-- 效果②:Cost
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
-- 效果②:Target
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFlagEffect(tp,m)
if chk==0 then return ct>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*1000)
end
-- 效果②:Operation
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,m)
if ct==0 then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
-- 记录「璀璨的未来」发动次数的全局函数
local cm,m=GetID()
function cm.initial_effect(c)
-- 效果①:从手卡特殊召唤
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
-- 效果②:解放自身,盖放陷阱
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+5)
e2:SetCost(cm.cost2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
-- 效果①:目标
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.filter1,tp,0,LOCATION_GRAVE,1,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,PLAYER_ALL,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
-- 效果①:操作
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,cm.filter1,tp,0,LOCATION_GRAVE,1,1,nil)
if #g1>0 and #g2>0 then
g1:Merge(g2)
if Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)==2 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
-- 效果①:墓地怪兽筛选
function cm.filter1(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
-- 效果②:成本 - 解放自身
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
-- 效果②:目标
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
-- 目标选择检查
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.tg3filter(chkc,tp) end
if chk==0 then
-- 核心检测逻辑:检查对方墓地的陷阱卡是否存在"满足自己墓地有对应不同种类"的卡
return Duel.IsExistingTarget(cm.tg3filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp)
end
-- 提示选择对方墓地的陷阱卡(仅限可满足后续条件的候选目标)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.tg3filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
if #g>0 then
-- 设置操作信息(移除 + 盖放)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
end
function cm.tg3filter(c,tp)
-- 检查自己墓地是否存在不同类型(TYPE)的陷阱卡
return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetType()) and c:IsType(TYPE_TRAP) and c:IsAbleToRemove()
end
-- 筛选自己墓地不同类型的可盖放陷阱卡
function cm.setfilter(c,ttype)
return c:IsType(TYPE_TRAP) and c:GetType()~=tttype and c:IsSSetable()
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsAbleToRemove() then
Duel.Remove(tc,POS_FACEUP,REMOVED_REASON_EFFECT)
local type=tc:GetType()&0x70 --获取种类
local g=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil,type)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SSET)
local sg=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_GRAVE,0,1,1,nil,type)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
end
-- 效果②:操作
-- 效果②:自己墓地陷阱筛选
function cm.filter3(c,typ)
return c:IsType(TYPE_TRAP) and (c:GetType()&(TYPE_TRAP))~=typ and c:IsSSetable()
end
local cm,m=GetID()
function cm.initial_effect(c)
-- 效果①
aux.AddCodeList(c,71521025)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
-- 效果②
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+5)
e2:SetCost(cm.cost2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
-- 效果① Cost (除外墓地1张卡)
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
-- 效果① 解放检查
function cm.release_filter(g)
return g:FilterCount(Card.IsType,nil,TYPE_FUSION)>0
and g:FilterCount(Card.IsType,nil,TYPE_SYNCHRO)>0
and g:FilterCount(Card.IsType,nil,TYPE_XYZ)>0
and g:FilterCount(Card.IsType,nil,TYPE_LINK)>0
end
function cm.fit(c)
return c:IsReleasableByEffect()
end
-- 效果① Target (选择特殊召唤方式)
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(cm.fit,tp,LOCATION_MZONE,0,nil)
local check_alt=g:CheckSubGroup(cm.release_filter)
return (Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and #g>3
or (check_alt and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp)))
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_GRAVE_SPSUMMON,nil,1,tp,0)
end
-- 效果① SpecialSummon过滤器
function cm.spfilter1(c,e,tp)
return c:IsCode(71521025) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spfilter2(c,e,tp)
return c:IsCode(71527471) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.fitn(g,e,tp)
return (g:FilterCount(Card.IsType,nil,TYPE_FUSION)>0 and g:FilterCount(Card.IsType,nil,TYPE_SYNCHRO)>0 and g:FilterCount(Card.IsType,nil,TYPE_XYZ)>0 and g:FilterCount(Card.IsType,nil,TYPE_LINK)>0 and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp)) or Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
end
-- 效果①操作
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.fit,tp,LOCATION_MZONE,0,nil)
if #g<4 then return end
local rg=g:SelectSubGroup(tp,cm.fitn,false,4,4,e,tp)
-- 解放检查
if Duel.Release(rg,REASON_EFFECT)~=4 then return end
-- 判断是否能特殊召唤特殊类型
local g2=Duel.GetOperatedGroup()
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter1),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
local b2=g2:FilterCount(Card.IsType,nil,TYPE_FUSION)>0
and g2:FilterCount(Card.IsType,nil,TYPE_SYNCHRO)>0
and g2:FilterCount(Card.IsType,nil,TYPE_XYZ)>0
and g2:FilterCount(Card.IsType,nil,TYPE_LINK)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp)
if b2 then
local g3=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp)
g1:Merge(g3)
end
local spg=g1:Select(tp,1,1,nil)
local tc=spg:GetFirst()
if Duel.SpecialSummon(tc,SUMMON_TYPE_SPECIAL,tp,tp,true,true,POS_FACEUP) then
-- 攻击力变化效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(g2:GetSum(Card.GetAttack)+g2:GetSum(Card.GetDefense))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
-- 效果抗性
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cm.efilter1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function cm.efilter1(e,te)
return te:IsActiveType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
-- 效果② Cost
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
-- 效果② Target
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spfilter3(c,e,tp)
return c:IsCode(71521025) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
-- 效果②操作
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
-- 效果抗性
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
-- 战斗破坏抗性
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
tc:RegisterEffect(e2)
end
end
end
function cm.efilter2(e,te)
return te:GetOwner()~=e:GetOwner()
end
--樱花树下的邂逅
local cm,m=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,71500019,71521025)
-- 效果①:将「幽世之血樱」或「阿冉」加入手卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
-- 效果②:除外自身,检索卡
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+5)
e2:SetCost(cm.cost2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
-- 效果①:目标
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
-- 效果①:操作
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter1),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-- 效果①:筛选「幽世之血樱」或「阿冉」
function cm.filter1(c)
return c:IsCode(71500019,71521025) and c:IsAbleToHand()
end
-- 效果②:成本 - 除外自身
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
-- 效果②:目标
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if chk==0 then
return (#g==0 or g:IsExists(cm.filter2,1,nil))
and Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
-- 效果②:筛选「幽世之血樱」或「阿冉」在场
function cm.filter2(c)
return c:IsCode(71500019,71521025) and c:IsFaceup()
end
-- 效果②:筛选有「幽世之血樱」或「阿冉」卡名记述的卡
function cm.filter3(c)
return c:IsAbleToHand() and (aux.IsCodeListed(c,71521025) or aux.IsCodeListed(c,71500019) or c:IsCode(65899925,71500007,71500010,71500012,71500015,71527471)) and not c:IsCode(m)
end
-- 效果②:操作
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
...@@ -21,6 +21,7 @@ function c9911060.initial_effect(c) ...@@ -21,6 +21,7 @@ function c9911060.initial_effect(c)
e2:SetCost(c9911060.rccost) e2:SetCost(c9911060.rccost)
e2:SetTarget(c9911060.rctg) e2:SetTarget(c9911060.rctg)
e2:SetOperation(c9911060.rcop) e2:SetOperation(c9911060.rcop)
e2:SetLabel(9911060)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9911060.spcfilter(c) function c9911060.spcfilter(c)
...@@ -35,7 +36,6 @@ function c9911060.rccon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +36,6 @@ function c9911060.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c9911060.rccost(e,tp,eg,ep,ev,re,r,rp,chk) function c9911060.rccost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end if chk==0 then return true end
end end
function c9911060.rcfilter1(c,e) function c9911060.rcfilter1(c,e)
...@@ -52,11 +52,7 @@ function c9911060.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -52,11 +52,7 @@ function c9911060.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsCanRemoveCounter(tp,1,1,0x1954,3,REASON_COST) and dg:CheckSubGroup(c9911060.fselect,3,3,1) local b1=Duel.IsCanRemoveCounter(tp,1,1,0x1954,3,REASON_COST) and dg:CheckSubGroup(c9911060.fselect,3,3,1)
local b2=Duel.IsCanRemoveCounter(tp,1,1,0x1954,6,REASON_COST) and dg:CheckSubGroup(c9911060.fselect,3,3,2) local b2=Duel.IsCanRemoveCounter(tp,1,1,0x1954,6,REASON_COST) and dg:CheckSubGroup(c9911060.fselect,3,3,2)
if chkc then return false end if chkc then return false end
if chk==0 then if chk==0 then return e:IsCostChecked() and (b1 or b2) end
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return b1 or b2
end
local ct=aux.SelectFromOptions(tp,{b1,aux.Stringid(9911060,0)},{b2,aux.Stringid(9911060,1)}) local ct=aux.SelectFromOptions(tp,{b1,aux.Stringid(9911060,0)},{b2,aux.Stringid(9911060,1)})
Duel.RemoveCounter(tp,1,1,0x1954,ct*3,REASON_COST) Duel.RemoveCounter(tp,1,1,0x1954,ct*3,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
...@@ -22,6 +22,7 @@ function c9911075.initial_effect(c) ...@@ -22,6 +22,7 @@ function c9911075.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,9911075) e3:SetCountLimit(1,9911075)
e3:SetCost(c9911075.thcost)
e3:SetTarget(c9911075.thtg) e3:SetTarget(c9911075.thtg)
e3:SetOperation(c9911075.thop) e3:SetOperation(c9911075.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -42,6 +43,10 @@ end ...@@ -42,6 +43,10 @@ end
function c9911075.deftg(e,c) function c9911075.deftg(e,c)
return c:IsFaceup() and c:GetCounter(0x1954)>0 return c:IsFaceup() and c:GetCounter(0x1954)>0
end end
function c9911075.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c9911075.thfilter(c) function c9911075.thfilter(c)
return (c:IsCode(9911056) or aux.IsCodeListed(c,9911056)) and c:IsAbleToHand() return (c:IsCode(9911056) or aux.IsCodeListed(c,9911056)) and c:IsAbleToHand()
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment