Commit 7ec5a14a authored by Tachibana's avatar Tachibana

ndyd

parent 0413ac9b
Pipeline #4560 passed with stages
in 23 minutes and 21 seconds
......@@ -21,17 +21,19 @@ function cm.initial_effect(c)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x6fa8))
e3:SetValue(cm.atkval)
c:RegisterEffect(e3)
--indes
local e22=Effect.CreateEffect(c)
e22:SetDescription(aux.Stringid(m,0))
e22:SetCategory(CATEGORY_SPECIAL_SUMMON)
e22:SetType(EFFECT_TYPE_QUICK_O)
e22:SetRange(LOCATION_MZONE)
e22:SetCountLimit(1,m+100)
e22:SetCode(EVENT_FREE_CHAIN)
e22:SetTarget(cm.target)
e22:SetOperation(cm.activate)
c:RegisterEffect(e22)
--SpecialSummon
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_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon1)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x6fa8)
......@@ -56,20 +58,23 @@ end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*300
end
function cm.filter1(c,e,tp)
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x6fa8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter1(chkc,e,tp) end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -22,7 +22,7 @@ function c60000038.initial_effect(c)
e3:SetOperation(c60000038.thop)
c:RegisterEffect(e3)
end
function cm.aclimit(e,re,tp)
function c60000038.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetLevel()<=e:GetHandler():GetLevel()
end
function c60000038.thcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -50,8 +50,3 @@ function c60000038.thop(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
Duel.Hint(HINT_SOUND,0,aux.Stringid(60000038,1))
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