Commit bdc5c83f authored by Tachibana's avatar Tachibana

watele

parent cec70caf
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -15,6 +15,7 @@ function c47580003.initial_effect(c) ...@@ -15,6 +15,7 @@ function c47580003.initial_effect(c)
e2:SetCondition(c47580003.spcon) e2:SetCondition(c47580003.spcon)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,47580003) e2:SetCountLimit(1,47580003)
e2:SetCost(cm.spcost)
e2:SetTarget(c47580003.sptg) e2:SetTarget(c47580003.sptg)
e2:SetOperation(c47580003.spop) e2:SetOperation(c47580003.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -26,9 +27,28 @@ function c47580003.initial_effect(c) ...@@ -26,9 +27,28 @@ function c47580003.initial_effect(c)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,47580003) e3:SetCountLimit(1,47580003)
e3:SetCondition(c47580003.spcon2) e3:SetCondition(c47580003.spcon2)
e3:SetCost(cm.spcost)
e3:SetTarget(c47580003.sptg2) e3:SetTarget(c47580003.sptg2)
e3:SetOperation(c47580003.spop2) e3:SetOperation(c47580003.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function c47580003.filter(c) function c47580003.filter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK)
...@@ -86,10 +106,11 @@ function c47580003.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,10 +106,11 @@ function c47580003.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end end
function c47580003.cfilter(c) function c47580003.cfilter(c)
return not (c:IsType(TYPE_LINK) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)) return c:IsType(TYPE_LINK) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function c47580003.spcon2(e,tp,eg,ep,ev,re,r,rp) function c47580003.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c47580003.cfilter,tp,LOCATION_MZONE,0,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetCount()>0 and g:FilterCount(c47580003.cfilter,nil)==g:GetCount()
end end
function c47580003.spfilter2(c,e,tp) function c47580003.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
...@@ -111,6 +132,6 @@ function c47580003.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,6 +132,6 @@ function c47580003.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c47580003.fselect,false,3,3) local sg=g:SelectSubGroup(tp,c47580003.fselect,false,3,3)
if sg and sg:GetCount()==3 then if sg and sg:GetCount()==3 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -73,11 +73,11 @@ function c65020096.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,11 +73,11 @@ function c65020096.thop(e,tp,eg,ep,ev,re,r,rp)
m=1 m=1
end end
if m==0 then if m==0 then
local g1=Duel.SelectMatchingCard(tp,c65020080.thfil,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c65020096.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g1,tp,REASON_EFFECT) Duel.SendtoHand(g1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
elseif m==1 then elseif m==1 then
local g2=Duel.SelectMatchingCard(tp,c65020084.thfil,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g2=Duel.SelectMatchingCard(tp,c65020096.thfil,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end end
e:Reset() e:Reset()
......
...@@ -53,10 +53,11 @@ function cm.efilter(e,te) ...@@ -53,10 +53,11 @@ function cm.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFacedown() or not (c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK)) return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetCount()>0 and g:FilterCount(cm.cfilter,nil)==g:GetCount()
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(81058000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCode(81058000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
......
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