Commit f40d4d44 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 231a75bd
......@@ -67,7 +67,7 @@ function cm.filter1(c)
return c:IsCode(14000006) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function cm.profilter(c,e,tp)
return c:IsCode(14000007) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false)
return c:IsCode(14000007) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.lkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......@@ -77,7 +77,7 @@ function cm.lkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(mat,REASON_COST)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_LINK)>0 and Duel.IsExistingMatchingCard(cm.profilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.profilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -67,7 +67,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_GRAVE,0,c,e,tp)
local mg=g:Filter(cm.ffilter,nil,e)
mg:AddCard(c)
if mg:GetCount()<2 or Duel.GetLocationCountFromEx(tp,tp,c,TYPE_FUSION)<=0 then return end
if mg:GetCount()<2 then return end
local sg=Duel.GetMatchingGroup(cm.ffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,c)
if sg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
......@@ -93,7 +93,7 @@ function cm.ffilter(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.ffilter2(c,e,tp,mg,gc)
return cm.Grava(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(mg,gc)
return cm.Grava(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(mg,gc) and Duel.GetLocationCountFromEx(tp,tp,mg:Filter(Card.IsLocation,nil,LOCATION_MZONE),c)
end
function cm.ffilter3(c,e,tp,gc)
local mg=Group.FromCards(c,gc)
......
......@@ -35,10 +35,10 @@ function cm.filter(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.filter1(c,e,tp)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return spo.named(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCountFromEx(tp,tp,nil,0)>0 and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA)
end
......
......@@ -15,13 +15,12 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.tfilter(c,e,tp)
return c:IsCode(14000538) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
function cm.tfilter(c,e,tp,mc)
return c:IsCode(14000538) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.filter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.GetLocationCountFromEx(tp,tp,c,0)>0
and Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
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_MZONE+LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
......
......@@ -25,11 +25,10 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -53,7 +53,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)>0) or c:IsLocation(LOCATION_DECK)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or c:IsLocation(LOCATION_DECK)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -51,11 +51,11 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)>0) or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)==0 then return end
if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 then return end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -70,9 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,e,tp)
local tc=g:GetFirst()
if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<2 then
if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<2 then
return
elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<1 then
elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<1 then
return
end
if g:GetCount()>0 then
......
......@@ -51,11 +51,11 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)>0) or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(m)
return c:IsSetCard(0x1406) and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)==0 then return end
if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 then return end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -70,9 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,e,tp)
local tc=g:GetFirst()
if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<2 then
if c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<2 then
return
elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil,0)<1 then
elseif ((c:IsLocation(LOCATION_EXTRA) and tc:IsLocation(LOCATION_HAND)) or (c:IsLocation(LOCATION_HAND) and tc:IsLocation(LOCATION_EXTRA))) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<1 then
return
end
if g:GetCount()>0 then
......
......@@ -5,7 +5,7 @@ function c26800011.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,26800011+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,26800011+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c26800011.cost)
e1:SetTarget(c26800011.target)
e1:SetOperation(c26800011.activate)
......
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