Commit 606d533f authored by wind2009's avatar wind2009

Fix 魔術師の弟子-ブラック・マジシャン・ガール

parent afb08e70
Pipeline #32672 passed with stages
in 1 minute and 55 seconds
--魔术师の弟子-ブラック・マジシャン・ガール --魔術師の弟子-ブラック・マジシャン・ガール
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,38033121,79791878) aux.AddCodeList(c,38033121,79791878)
...@@ -10,6 +10,7 @@ function s.initial_effect(c) ...@@ -10,6 +10,7 @@ function s.initial_effect(c)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
...@@ -39,12 +40,20 @@ function s.spcon(e,c) ...@@ -39,12 +40,20 @@ function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_SPSUMMON)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c) local tc=g:SelectUnselect(nil,tp,false,true,1,1)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_DISCARD)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
...@@ -70,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.atkval(e,c) function s.atkval(e,c)
return Duel.GetMatchingGroupCount(aux.IsCodeListed,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,79791878)*300 return Duel.GetMatchingGroupCount(aux.IsCodeListed,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,79791878)*300
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