Commit aa6ea085 authored by 未闻皂名's avatar 未闻皂名

2025/10/24 特殊召唤手续的卡片选择方式修改

parent de8c1305
...@@ -417,11 +417,11 @@ function RushDuel.HandConfirmSpecialSummonCondition(filter) ...@@ -417,11 +417,11 @@ function RushDuel.HandConfirmSpecialSummonCondition(filter)
end end
function RushDuel.HandConfirmSpecialSummonTarget(filter) function RushDuel.HandConfirmSpecialSummonTarget(filter)
return function(e, tp, eg, ep, ev, re, r, rp, chk, c) return function(e, tp, eg, ep, ev, re, r, rp, chk, c)
local mg = Duel.GetMatchingGroup(filter, tp, LOCATION_HAND, 0, nil, e, tp, c)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONFIRM)
local g = Duel.SelectMatchingCard(tp, filter, tp, LOCATION_HAND, 0, 0, 1, nil, e, tp, c) local tc = mg:SelectUnselect(nil, tp, false, true, 1, 1)
if #g > 0 then if tc then
g:KeepAlive() e:SetLabelObject(tc)
e:SetLabelObject(g)
return true return true
else else
return false return false
...@@ -429,8 +429,7 @@ function RushDuel.HandConfirmSpecialSummonTarget(filter) ...@@ -429,8 +429,7 @@ function RushDuel.HandConfirmSpecialSummonTarget(filter)
end end
end end
function RushDuel.HandConfirmSpecialSummonOperation(e, tp, eg, ep, ev, re, r, rp, c) function RushDuel.HandConfirmSpecialSummonOperation(e, tp, eg, ep, ev, re, r, rp, c)
local g = e:GetLabelObject() local tc = e:GetLabelObject()
Duel.ConfirmCards(1 - tp, g) Duel.ConfirmCards(1 - tp, tc)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
g:DeleteGroup()
end end
...@@ -15,18 +15,17 @@ function cm.spcon(e,c) ...@@ -15,18 +15,17 @@ function cm.spcon(e,c)
and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_HAND,0,1,e:GetHandler())
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg=Duel.GetMatchingGroup(cm.spconfilter,tp,LOCATION_HAND,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.spconfilter,tp,LOCATION_HAND,0,0,1,e:GetHandler()) local tc=mg:SelectUnselect(nil,tp,false,true,1,1)
if g:GetCount()>0 then if tc then
g:KeepAlive() e:SetLabelObject(tc)
e:SetLabelObject(g)
return true return true
else else
return false return false
end end
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 g=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON) Duel.SendtoGrave(tc,REASON_SPSUMMON)
g:DeleteGroup()
end end
\ No newline at end of file
...@@ -25,11 +25,11 @@ function cm.spcon(e,c) ...@@ -25,11 +25,11 @@ function cm.spcon(e,c)
and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_HAND,0,2,e:GetHandler())
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local mg=Duel.GetMatchingGroup(cm.spconfilter,tp,LOCATION_HAND,0,e:GetHandler())
local g=Duel.SelectMatchingCard(tp,cm.spconfilter,tp,LOCATION_HAND,0,0,2,e:GetHandler()) local sg=RD.Select(HINTMSG_TOGRAVE,tp,mg,nil,true,2,2)
if g:GetCount()==2 then if sg and sg:GetCount()==2 then
g:KeepAlive() sg:KeepAlive()
e:SetLabelObject(g) e:SetLabelObject(sg)
return true return true
else else
return false return false
......
local cm,m=GetID()
local list={120294000}
cm.name="真红眼暗钢龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon,cm.sptg,cm.spop)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon Procedure
function cm.spconfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeckAsCost()
and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg=Duel.GetMatchingGroup(cm.spconfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=mg:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else
return false
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_SPSUMMON)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,1),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return tc:IsCode(list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120294036}
cm.name="炎灵艾米特尔"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Hand
function cm.confilter(c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function cm.thfilter(c)
return c:IsLevelAbove(5) and c:IsLevelBelow(8) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,1),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return tc:IsCode(list[1])
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment