Commit 234d362b authored by Amiya's avatar Amiya

新卡

parent 60da0d8f
No preview for this file type
--ブレインコントローラー
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,87910978)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--lv
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PAY_LPCOST)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.lvcon)
e3:SetTarget(s.lvtg)
e3:SetOperation(s.lvop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,id+o*2)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsCode(87910978) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return tp==ep
end
function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
local lv=g:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
e:SetLabel(Duel.AnnounceLevel(tp,1,8,lv))
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain()
and Duel.SpecialSummonStep(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--ボンバー・ブレイズ
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(s.descon1)
e1:SetCost(s.descost)
e1:SetTarget(s.destg1)
e1:SetOperation(s.desop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(id,0))
e2:SetCondition(aux.TRUE)
e2:SetTarget(s.destg2)
e2:SetOperation(s.desop2)
c:RegisterEffect(e2)
end
function s.descon1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.AND(Card.IsFaceup,Card.IsLevelAbove),tp,LOCATION_MZONE,0,nil,1)
local res=true
for i=1,6 do
if not g:IsExists(Card.IsLevel,1,nil,i) then
res=false
end
end
return res
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function s.cfilter1(c,tp)
return c:IsFaceup() and c:IsLevelAbove(1)
and Duel.IsExistingMatchingCard(s.desfilter1,tp,0,LOCATION_MZONE,c,c:GetLevel())
end
function s.desfilter1(c,lv)
return c:IsFaceup() and (c:IsLevel(lv) or c:IsRank(lv) or c:IsLink(lv))
end
function s.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_MZONE)
end
function s.desop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter1,tp,0,LOCATION_MZONE,1,1,nil,tp)
if g:GetCount()>0 then
local sg=Duel.GetMatchingGroup(s.desfilter1,tp,0,LOCATION_MZONE,g,g:GetFirst():GetLevel())
Duel.HintSelection(g)
Duel.Destroy(sg,POS_FACEUP,REASON_EFFECT)
end
end
function s.cfilter2(c,tp)
local g=c:GetColumnGroup()
return c:IsFaceup() and c:IsLevelAbove(1)
and Duel.IsExistingMatchingCard(s.desfilter2,tp,0,LOCATION_MZONE,c,tp,c:GetLevel(),g)
end
function s.desfilter2(c,tp,lv,g)
return c:IsFaceup() and c:IsControler(1-tp) and (c:IsLevel(lv) or c:IsRank(lv) or c:IsLink(lv)) and g:IsContains(c)
end
function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_MZONE)
end
function s.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local sg=Duel.GetMatchingGroup(s.desfilter2,tp,0,LOCATION_MZONE,tc,tp,tc:GetLevel(),tc:GetColumnGroup())
Duel.HintSelection(g)
Duel.Destroy(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--夙めてはしろ 二人ではしろ
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceupEx,Card.IsCode),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,id)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,7)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function s.gcheck(g,tp)
local ct=7-g:GetCount()
if ct>0 then
local g=Duel.GetDecktopGroup(1-tp,tc)
if g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)~=tc then
return false
end
end
return true
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,7)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,0,LOCATION_MZONE,nil,POS_FACEDOWN)
if chk==0 then return g:CheckSubGroup(s.gcheck,1,7,tp) or rg:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,0,LOCATION_EXTRA+LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,7)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,0,LOCATION_MZONE,nil,POS_FACEDOWN)
if not (g:CheckSubGroup(s.gcheck,1,7,tp) or rg:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
local sg=g:SelectSubGroup(1-tp,s.gcheck,true,1,7,tp)
local ct=sg:GetCount()
if ct>0 then
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
if ct<7 then
local rsg=Duel.GetDecktopGroup(1-tp,7-ct)
Duel.Remove(rsg,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--アブダクション
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c,tp)
return c:IsControlerCanBeChanged() and c:IsFaceup()
and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c)
end
function s.rmfilter(c,ec)
return c:IsAbleToRemove()
and c:GetOriginalRace()&ec:GetOriginalRace()~=0
and c:GetOriginalAttribute()&ec:GetOriginalAttribute()~=0
and (c:GetOriginalLevel()&ec:GetOriginalLevel()~=0
or c:GetOriginalRank()&ec:GetOriginalRank()~=0
or c:GetLink()&ec:GetLink()~=0)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,s.cfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_DECK+LOCATION_EXTRA,1,1,nil,tc)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tc=g:GetFirst()
if Duel.GetControl(tc,tp)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
end
\ No newline at end of file
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