Commit 0a601d7b authored by TanakaKotoha's avatar TanakaKotoha

none

parent 0781a13f
...@@ -54,7 +54,6 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,6 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.thsplimit) e1:SetTarget(cm.thsplimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
...@@ -120,16 +119,27 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -120,16 +119,27 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function cm.filter1(tc,c)
if not tc:IsFaceup() or not tc:IsCanBeSynchroMaterial() then return false end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL)
tc:RegisterEffect(e1,true)
return true
end
function cm.synfilter(c,mg)
return c:IsSynchroSummonable(nil,mg)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then local mg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) return not e:GetHandler():IsStatus(STATUS_CHAINING) local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,c) local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c,mg) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,e:GetHandler(),mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
...@@ -140,5 +150,5 @@ function cm.cfilter(c) ...@@ -140,5 +150,5 @@ function cm.cfilter(c)
return c:IsFacedown() or not c:IsLevel(10) return c:IsFacedown() or not c:IsLevel(10)
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp) function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(cm.cfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil)
end end
\ No newline at end of file
...@@ -56,7 +56,6 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,6 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
...@@ -64,7 +63,7 @@ function cm.cfilter(c) ...@@ -64,7 +63,7 @@ function cm.cfilter(c)
return c:IsFacedown() or not c:IsLevel(10) return c:IsFacedown() or not c:IsLevel(10)
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp) function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(cm.cfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil)
end end
function cm.counterfilter(c) function cm.counterfilter(c)
return c:IsSetCard(0xcc3) or c:IsLevel(10) or c:IsRank(10) return c:IsSetCard(0xcc3) or c:IsLevel(10) or c:IsRank(10)
...@@ -151,7 +150,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,7 +150,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject() local se=e:GetLabelObject()
se:Reset() se:Reset()
end end
function cm.thfiter(c) function cm.thfilter(c)
return c:IsLevel(10) and c:IsAbleToHand() return c:IsLevel(10) and c:IsAbleToHand()
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -176,6 +175,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -176,6 +175,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) then return end
local g=Group.CreateGroup() local g=Group.CreateGroup()
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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