Commit 9035a3bb authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 0fd50142
......@@ -93,10 +93,7 @@ function cm.spfilters(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(cm.spfilters,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,14801308)
and Duel.IsExistingMatchingCard(cm.spfilters,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,14801309) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
......
......@@ -93,10 +93,7 @@ function cm.spfilters(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(cm.spfilters,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp,14801325)
and Duel.IsExistingMatchingCard(cm.spfilters,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp,14801326) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
......
......@@ -13,8 +13,11 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.dafilter(c)
return c:IsFaceup() and c:IsSetCard(0x4808)
end
function cm.tgcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,0x4808)
return Duel.IsExistingMatchingCard(cm.dafilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -87,8 +87,7 @@ function cm.spfilter(c,e,tp,code)
return c:IsCode(14801326) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
......
......@@ -16,10 +16,7 @@ function cm.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x4808)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil))
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x4808) and c:IsSummonable(true,nil)
......
......@@ -17,10 +17,7 @@ function cm.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x4808)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil))
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x4808) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -5,32 +5,17 @@ function c65071063.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c65071063.cost)
e1:SetCost(c65071063.dacost)
e1:SetTarget(c65071063.target)
e1:SetOperation(c65071063.activate)
c:RegisterEffect(e1)
if not c65071063.global_check then
c65071063.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c65071063.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(65071063,ACTIVITY_CHAIN,c65071063.chainfilter)
end
function c65071063.checkop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:GetHandler()==e:GetHandler() then
Duel.RegisterFlagEffect(rp,65071063,RESET_PHASE+PHASE_END,0,1)
end
function c65071063.chainfilter(re,tp,cid)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP))
end
function c65071063.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler())
local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,0,e:GetHandler())
g:Merge(g2)
if chk==0 then return Duel.GetFlagEffect(tp,65071063)==0
and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsAbleToRemoveAsCost,nil) end
Duel.Remove(g,POS_FACEUP,REASON_COST)
--oath effects
if chk==0 then return Duel.GetCustomActivityCount(65071063,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......@@ -41,7 +26,16 @@ function c65071063.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c65071063.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler()==e:GetHandler()
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c65071063.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler())
local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,0,e:GetHandler())
g:Merge(g2)
if chk==0 then return c65071063.cost(e,tp,eg,ep,ev,re,r,rp,0)
and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsAbleToRemoveAsCost,nil) end
c65071063.cost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c65071063.filter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
......
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