Commit 3899b678 authored by Tachibana's avatar Tachibana

ndyd

parent 040f2064
...@@ -13,9 +13,9 @@ function cm.initial_effect(c) ...@@ -13,9 +13,9 @@ function cm.initial_effect(c)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost) e1:SetCost(cm.tkcost)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.tktg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.tkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -33,30 +33,28 @@ end ...@@ -33,30 +33,28 @@ end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
return (not c:IsType(TYPE_TOKEN)) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) return (not c:IsType(TYPE_TOKEN)) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end end
function cm.cfilter(c) function cm.tkcostfilter(c)
return c:IsAbleToRemoveAsCost() return c:IsAbleToRemoveAsCost()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_ONFIELD local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end if ft==0 then loc=LOCATION_MZONE end
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(cm.cfilter,tp,loc,0,1,e:GetHandler()) end if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(cm.tkcostfilter,tp,loc,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,loc,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.tkcostfilter,tp,loc,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,81006099,0,TYPES_TOKEN_MONSTER,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then if not Duel.IsPlayerCanSpecialSummonMonster(tp,81006099,0,TYPES_TOKEN_MONSTER,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,81011019) local token=Duel.CreateToken(tp,81006099)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end end
function cm.tpcon(e,tp,eg,ep,ev,re,r,rp) function cm.tpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
......
...@@ -31,14 +31,14 @@ function cm.ffilter(c,fc,sub,mg,sg) ...@@ -31,14 +31,14 @@ function cm.ffilter(c,fc,sub,mg,sg)
end end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,81006099,0,TYPES_TOKEN_MONSTER,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp) function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then if Duel.IsPlayerCanSpecialSummonMonster(tp,81006099,0,TYPES_TOKEN_MONSTER,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,81011019) local token=Duel.CreateToken(tp,81006099)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
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