Commit cc5efc1c authored by Nemo Ma's avatar Nemo Ma

fix

parent ef31a036
......@@ -29,24 +29,19 @@ function c64800116.tgfilter(c)
return c:IsSetCard(0x341a) and c:IsAbleToGrave()
end
function c64800116.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64800116.tgfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c64800116.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,nil,tp,LOCATION_DECK+LOCATION_HAND)
if chk==0 then return Duel.IsExistingMatchingCard(c64800116.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c64800116.fselect(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1
and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c64800116.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
if Duel.IsExistingMatchingCard(c64800116.tgfilter,tp,LOCATION_HAND,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g1=Duel.SelectMatchingCard(tp,c64800116.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
end
if Duel.IsExistingMatchingCard(c64800116.tgfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g2=Duel.SelectMatchingCard(tp,c64800116.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
end
g1:Merge(g2)
if g1:GetCount()>0 then
Duel.SendtoGrave(g1,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c64800116.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,c64800116.fselect,false,1,2)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
......@@ -55,7 +50,7 @@ function c64800116.spcfilter(c,tp)
return c:GetControler()==tp and c:IsSetCard(0x341a)
end
function c64800116.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c64800116.spcfilter,1,e:GetHandler(),tp)
return eg:IsExists(c64800116.spcfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c64800116.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -27,12 +27,12 @@ end
--e1
function c64800124.spfilter(c)
function c64800124.spfilter(c,e,tp)
return c:IsSetCard(0x341a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c64800124.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP))
and Duel.IsExistingMatchingCard(c64800124.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp))
or Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
if not Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) then
......
......@@ -32,9 +32,9 @@ function c64800128.filter(c)
end
function c64800128.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64800128.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c64800128.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
if chk==0 then return Duel.IsExistingTarget(c64800128.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c64800128.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c64800128.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,e:GetHandler():GetLocation())
end
function c64800128.adop(e,tp,eg,ep,ev,re,r,rp)
......
--幻梦迷境领主 眠眠铃
function c64830012.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,99,c64830012.lcheck)
c:EnableReviveLimit()
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c64830012.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64830012,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c64830012.target)
e3:SetOperation(c64830012.operation)
c:RegisterEffect(e3)
end
function c64830012.filter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,c:GetLink(),nil)
end
function c64830012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c64830012.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64830012.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64830012.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,g:GetFirst():GetLink(),tp,LOCATION_HAND)
end
function c64830012.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,tc:GetLink(),tc:GetLink(),nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c64830012.disable(e,c)
local seq=aux.MZoneSequence(c:GetSequence())
return Duel.IsExistingMatchingCard(c64830012.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,seq)
end
function c64830012.cfilter(c,seq2)
local seq1=aux.MZoneSequence(c:GetSequence())
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and seq1==4-seq2
end
function c64830012.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==g:GetCount()
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