Commit 2f250e6d authored by 未闻皂名's avatar 未闻皂名

2023/9/13 新增:落单使魔术师,凤凰龙骑兵

parent ba833b5f
Pipeline #23462 passed with stages
in 9 minutes and 30 seconds
No preview for this file type
local m=120109032
local list={120105010}
local cm=_G["c"..m]
cm.name="落单使魔术师"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
--Draw
function cm.costfilter(c)
return c:IsAttack(0) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c)
return c:IsCode(list[1])
end
function cm.filter(c,tp)
return c:IsFaceup() and c:IsAttack(0) and RD.IsCanAttachEffectIndes(c,tp,cm.indval)
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
RD.TargetDraw(tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
local filter=RD.Filter(cm.filter,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),filter,tp,LOCATION_MZONE,0,1,1,nil,function(sg)
RD.AttachEffectIndes(e,sg:GetFirst(),cm.indval,aux.Stringid(m,3),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
......@@ -23,6 +23,9 @@ end
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.filter(c,tp)
return c:IsFaceup() and RD.IsCanAttachEffectIndes(c,tp,cm.indval)
end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1)
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
......@@ -31,7 +34,8 @@ 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)
if RD.SendToHandAndExists(g,1-tp) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_FACEUP,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil,function(sg)
local filter=RD.Filter(cm.filter,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_FACEUP,filter,tp,LOCATION_ONFIELD,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.AttachEffectIndes(e,sg:GetFirst(),cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
......
local m=120252007
local cm=_G["c"..m]
cm.name="灵魂公鸭龙"
cm.name="灵魂龙兽"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
......
local m=120252008
local cm=_G["c"..m]
cm.name="凤凰龙骑兵"
function cm.initial_effect(c)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Recover
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c)
return c:IsLevel(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
or not Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) end
RD.TargetRecover(tp,300)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if RD.Recover()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
Duel.Draw(tp,1,REASON_EFFECT)
end
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