Commit 12de48d4 authored by Tachibana's avatar Tachibana

eme

parent 84930ed0
......@@ -14,7 +14,7 @@ function c4210011.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetValue(SUMMON_TYPE_SPECIAL)
e2:SetCondition(c4210011.spcon)
e2:SetOperation(c4210011.spop)
......@@ -24,7 +24,7 @@ function c4210011.initial_effect(c)
e3:SetDescription(aux.Stringid(4210011,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c4210011.ottg)
e3:SetOperation(c4210011.otop)
......@@ -60,7 +60,7 @@ function c4210011.otop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
end
function c4210011.atktg(e,c)
return c:IsSetCard(0xa2f)
......@@ -73,7 +73,7 @@ function c4210011.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c4210011.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4210011.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
--猫耳天堂-Maple
function c4210012.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c4210012.splimit)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4210012,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetValue(SUMMON_TYPE_SPECIAL)
e2:SetCondition(c4210012.spcon)
e2:SetOperation(c4210012.spop)
c:RegisterEffect(e2)
--release
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4210012,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c4210012.ottg)
e3:SetOperation(c4210012.otop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4210012,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(function(e,c)return e:GetHandler():GetFlagEffect(4210012)~=0 end)
e4:SetCost(c4210012.descost)
e4:SetTarget(c4210012.destg)
e4:SetOperation(c4210012.desop)
c:RegisterEffect(e4)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c4210012.splimit)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4210012,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetValue(SUMMON_TYPE_SPECIAL)
e2:SetCondition(c4210012.spcon)
e2:SetOperation(c4210012.spop)
c:RegisterEffect(e2)
--release
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4210012,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c4210012.ottg)
e3:SetOperation(c4210012.otop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4210012,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(function(e,c)return e:GetHandler():GetFlagEffect(4210012)~=0 end)
e4:SetCost(c4210012.descost)
e4:SetTarget(c4210012.destg)
e4:SetOperation(c4210012.desop)
c:RegisterEffect(e4)
end
function c4210012.spcfilter(c,e,tp)
return c:IsSetCard(0xa2f) and c:IsType(TYPE_MONSTER) and c:GetSummonPlayer()==tp
return c:IsSetCard(0xa2f) and c:IsType(TYPE_MONSTER) and c:GetSummonPlayer()==tp
end
function c4210012.ottg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c4210012.spcfilter,1,nil,e,tp) end
local g=eg:Filter(c4210012.spcfilter,nil,e,tp)
Duel.SetTargetCard(eg)
if chk==0 then return eg:IsExists(c4210012.spcfilter,1,nil,e,tp) end
local g=eg:Filter(c4210012.spcfilter,nil,e,tp)
Duel.SetTargetCard(eg)
end
function c4210012.otop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c4210012.spcfilter,nil,e,tp)
local dg=Group.CreateGroup()
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4210012,3))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
e1:SetTarget(c4210012.tgtg)
e1:SetOperation(c4210012.tgop)
e1:SetReset(RESET_EVENT+0xd7b0000)
tc:RegisterFlagEffect(0,RESET_EVENT+0xd7b0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210012,3))
tc:RegisterEffect(e1)
tc=g:GetNext()
end
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
local g=eg:Filter(c4210012.spcfilter,nil,e,tp)
local dg=Group.CreateGroup()
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4210012,3))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
e1:SetTarget(c4210012.tgtg)
e1:SetOperation(c4210012.tgop)
e1:SetReset(RESET_EVENT+0xd7b0000)
tc:RegisterFlagEffect(0,RESET_EVENT+0xd7b0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210012,3))
tc:RegisterEffect(e1)
tc=g:GetNext()
end
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
function c4210012.tgfilter(c,e,tp)
return c:IsSetCard(0xa2f) and c:IsAbleToHand()
return c:IsSetCard(0xa2f) and c:IsAbleToHand()
end
function c4210012.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4210012.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(c4210012.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c4210012.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4210012.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4210012.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c4210012.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0xa2f)
return se:GetHandler():IsSetCard(0xa2f)
end
function c4210012.spfilter(c,tp)
return c:IsFaceup() and c:GetFlagEffect(4210010)~=0 and c:IsControler(tp) and c:IsReleasable()
return c:IsFaceup() and c:GetFlagEffect(4210010)~=0 and c:IsControler(tp) and c:IsReleasable()
end
function c4210012.mzfilter(c,tp)
return c:IsControler(tp) and c:GetSequence()<5
return c:IsControler(tp) and c:GetSequence()<5
end
function c4210012.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local rg=Duel.GetReleaseGroup(tp):Filter(c4210012.spfilter,nil,ft,tp)
local rgc=rg:GetCount()
local c=e:GetHandler()
return (rgc>0 and Duel.CheckReleaseGroup(tp,c4210012.spfilter,1,nil,rgc,tp) and c:IsLocation(LOCATION_HAND))
or (rgc>1 and Duel.CheckReleaseGroup(tp,c4210012.spfilter,2,nil,rgc,tp) and c:IsLocation(LOCATION_DECK))
function c4210012.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local rg=Duel.GetReleaseGroup(tp):Filter(c4210012.spfilter,nil,ft,tp)
local rgc=rg:GetCount()
local c=e:GetHandler()
return (rgc>0 and Duel.CheckReleaseGroup(tp,c4210012.spfilter,1,nil,rgc,tp) and c:IsLocation(LOCATION_HAND))
or (rgc>1 and Duel.CheckReleaseGroup(tp,c4210012.spfilter,2,nil,rgc,tp) and c:IsLocation(LOCATION_DECK))
end
function c4210012.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local rg=Duel.GetReleaseGroup(tp):Filter(c4210012.spfilter,nil,ft,tp)
local g=nil
local rec = (c:IsLocation(LOCATION_DECK) and {2} or {1})[1]
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,rec,rec,nil)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c4210012.mzfilter,1,1,nil,tp)
if c:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c4210012.mzfilter,rec,rec,nil,tp)
end
Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210010,1))
c:RegisterFlagEffect(4210010,RESET_EVENT+0xcff0000,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210012,1))
c:RegisterFlagEffect(4210012,RESET_EVENT+0xcff0000,0,0)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local rg=Duel.GetReleaseGroup(tp):Filter(c4210012.spfilter,nil,ft,tp)
local g=nil
local rec = (c:IsLocation(LOCATION_DECK) and {2} or {1})[1]
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,rec,rec,nil)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c4210012.mzfilter,1,1,nil,tp)
if c:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c4210012.mzfilter,rec,rec,nil,tp)
end
Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210010,1))
c:RegisterFlagEffect(4210010,RESET_EVENT+0xcff0000,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210012,1))
c:RegisterFlagEffect(4210012,RESET_EVENT+0xcff0000,0,0)
end
function c4210012.cfilter(c)
return c:IsSetCard(0xa2f) and c:IsDiscardable()
return c:IsSetCard(0xa2f) and c:IsDiscardable()
end
function c4210012.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4210012.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c4210012.cfilter,1,1,REASON_COST+REASON_DISCARD)
if chk==0 then return Duel.IsExistingMatchingCard(c4210012.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c4210012.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c4210012.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c4210012.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -14,7 +14,7 @@ function c4210013.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetValue(SUMMON_TYPE_SPECIAL)
e2:SetCondition(c4210013.spcon)
e2:SetOperation(c4210013.spop)
......@@ -24,7 +24,7 @@ function c4210013.initial_effect(c)
e3:SetDescription(aux.Stringid(4210013,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c4210013.ottg)
e3:SetOperation(c4210013.otop)
......@@ -37,7 +37,7 @@ function c4210013.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1)
e4:SetCondition(function(e) return e:GetHandler():GetFlagEffect(4210013)~=0 end)
e4:SetCondition(function(e) return e:GetHandler():GetFlagEffect(4210013)~=0 end)
e4:SetCost(c4210013.thcost)
e4:SetTarget(c4210013.thtg)
e4:SetOperation(c4210013.thop)
......@@ -78,7 +78,7 @@ function c4210013.otop(e,tp,eg,ep,ev,re,r,rp)
end
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
end
function c4210013.tgfilter(c,e,tp)
return c:IsSetCard(0xa2f) and c:IsAbleToHand()
......@@ -88,7 +88,7 @@ function c4210013.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c4210013.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4210013.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......@@ -151,7 +151,7 @@ end
function c4210013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4210013.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
......
......@@ -14,7 +14,7 @@ function c4210014.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetValue(SUMMON_TYPE_SPECIAL)
e2:SetCondition(c4210014.spcon)
e2:SetOperation(c4210014.spop)
......@@ -24,7 +24,7 @@ function c4210014.initial_effect(c)
e3:SetDescription(aux.Stringid(4210014,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c4210014.ottg)
e3:SetOperation(c4210014.otop)
......@@ -77,10 +77,10 @@ function c4210014.otop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterFlagEffect(0,RESET_EVENT+0xd7b0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210014,3))
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
end
function c4210014.tgfilter(c,e,tp)
return c:IsSetCard(0xa2f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -143,6 +143,6 @@ function c4210014.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210010,1))
c:RegisterFlagEffect(4210010,RESET_EVENT+0xcff0000,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210014,1))
c:RegisterFlagEffect(0,RESET_EVENT+0xcff0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(4210014,1))
c:RegisterFlagEffect(4210014,RESET_EVENT+0xcff0000,0,0)
end
\ No newline at end of file
......@@ -14,7 +14,7 @@ function c4210015.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetValue(SUMMON_TYPE_SPECIAL)
e2:SetCondition(c4210015.spcon)
e2:SetOperation(c4210015.spop)
......@@ -25,7 +25,7 @@ function c4210015.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c4210015.otcon)
e3:SetTarget(c4210015.ottg)
......@@ -62,7 +62,7 @@ function c4210015.otop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
end
end
function c4210015.splimit(e,se,sp,st)
......
......@@ -35,7 +35,7 @@ function c65030041.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c65030041.filter2(c)
function c65030041.filter2(c,tp)
local at=c:GetAttribute()
local lv=c:GetLevel()
if c:IsType(TYPE_XYZ) then lv=c:GetRank() end
......@@ -47,10 +47,10 @@ function c65030041.spfilter(c,at,lv)
end
function c65030041.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and c65030041.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65030041.filter2,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and c65030041.filter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c65030041.filter2,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c65030041.filter2,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c65030041.filter2,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
......
--二向镜色 空蓝之后
function c65030099.initial_effect(c)
--xyzlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c65030099.tg)
e1:SetOperation(c65030099.op)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,65030099)
e2:SetTarget(c65030099.sptg)
e2:SetOperation(c65030099.spop)
c:RegisterEffect(e2)
end
function c65030099.tgfil(c,tp)
return c:IsSetCard(0x6da9) and c:IsAbleToHand() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
end
function c65030099.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65030099.tgfil(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65030099.tgfil,tp,LOCATION_MZONE,0,1,nil,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.SelectTarget(tp,c65030099.tgfil,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65030099.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c65030099.tdfil(c)
return c:IsSetCard(0x6da9) and c:IsAbleToGrave() and c:GetLevel()>0
end
function c65030099.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c65030099.tdfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c65030099.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.IsExistingMatchingCard(c65030099.tdfil,tp,LOCATION_HAND,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,c65030099.tdfil,tp,LOCATION_HAND,0,1,1,nil)
Duel.HintSelection(g)
local gc=g:GetFirst()
local lv=gc:GetLevel()
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(lv)
tc:RegisterEffect(e1)
end
end
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