Commit 279d7f16 authored by Amiya's avatar Amiya

新卡

parent 3edf6072
No preview for this file type
--マテリアクトル・エクサレプト
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(aux.dscon)
e2:SetCost(s.atkcost)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic()
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
local g=Duel.GetOperatedGroup()
Duel.SetTargetCard(g)
end
function s.thfilter(c)
return c:IsLevel(3) and c:IsType(TYPE_NORMAL) 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+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then tc=nil end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,tc)
local hc=g:GetFirst()
if hc and Duel.SendtoHand(hc,nil,REASON_EFFECT)~=0 and hc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsRelateToEffect(e)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsRank(3)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc)
and chkc:GetControler()~=tp end
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--マテリアクトル・ゼプトウィング
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return c:IsSetCard(0x160) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sptg(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) 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:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.thfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x160) 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.thorspfilter(c,e,tp)
if not c:IsType(TYPE_NORMAL) or not c:IsLevel(3) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
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)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thorspfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thorspfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local hc=g:GetFirst()
if hc then
if hc:IsAbleToHand() and (not hc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(hc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hc)
else
Duel.SpecialSummon(hc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
\ No newline at end of file
--マテリアクトル・エクサガルド
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,nil,nil,99)
c:EnableReviveLimit()
--search or special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.thorspcost)
e1:SetTarget(s.thorsptg)
e1:SetOperation(s.thorspop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.thorspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thorspfilter(c,e,tp)
if not c:IsSetCard(0x160) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if c:IsType(TYPE_MONSTER) then
return ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsAbleToHand()
end
return false
end
function s.thorsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thorspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function s.thorspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thorspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function s.cfilter(c,sp)
return c:IsSummonPlayer(sp)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,1-tp)
end
function s.thfilter(c)
return c:IsAbleToHand()
end
function s.cthfilter(c)
return c:IsSetCard(0x160)
end
function s.thcheck(g)
return g:IsExists(s.cthfilter,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if chk==0 then return g:CheckSubGroup(s.thcheck,1,2) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:SelectSubGroup(tp,s.thcheck,false,1,2)
if tg and Duel.SendtoHand(tg,nil,REASON_EFFECT)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tg)
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_NORMAL)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #sg>0 then
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
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:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--add overlay
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(s.ovcon)
e3:SetTarget(s.ovtg)
e3:SetOperation(s.ovop)
c:RegisterEffect(e3)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 end
end
function s.thfilter(c)
return c:IsSetCard(0x160) and c:IsAbleToHand()
end
function s.xyzfilter(c)
return c:IsFaceup() and c:IsRank(3)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<6 then return end
local g=Duel.GetDecktopGroup(tp,6)
Duel.ConfirmCards(tp,g)
if g:IsExists(s.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,s.thfilter,1,1,nil)
Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
Duel.SortDecktop(tp,tp,5)
else Duel.SortDecktop(tp,tp,6) end
local rg=Group.CreateGroup()
local xg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
if xg:GetCount()<1 then return end
for tc in aux.Next(xg) do
local hg=tc:GetOverlayGroup()
if hg:GetCount()>0 then
rg:Merge(hg)
end
end
if rg and rg:Filter(Card.IsAbleToHand,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
local thg=rg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.SendtoHand(thg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,thg)
end
end
function s.ovcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==tp and re:IsActiveType(TYPE_MONSTER) and rc:IsType(TYPE_XYZ)
end
function s.matfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x160)
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,1)
if g:GetCount()==1 then
local tc=g:GetFirst()
Duel.DisableShuffleCheck()
if Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and tc:IsCanOverlay() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Overlay(sg:GetFirst(),Group.FromCards(tc))
else
Duel.SendtoGrave(g,REASON_RULE)
end
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_NEGATE+CATEGORY_TOHAND+CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function s.xyzfilter(c)
return c:IsFaceup() and c:IsRank(3)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Group.CreateGroup()
local xg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
if xg:GetCount()<1 then return false end
for tc in aux.Next(xg) do
local hg=tc:GetOverlayGroup()
if hg:GetCount()>0 then
rg:Merge(hg)
end
end
if chk==0 then return rg and rg:Filter(Card.IsAbleToHand,1,nil)
and aux.nbtg(e,tp,eg,ep,ev,re,r,rp,chk) end
aux.nbtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.atkfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x160)
and not c:IsImmuneToEffect(e)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=Group.CreateGroup()
local xg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
if xg:GetCount()<1 then return end
for tc in aux.Next(xg) do
local hg=tc:GetOverlayGroup()
if hg:GetCount()>0 then
rg:Merge(hg)
end
end
if rg and rg:Filter(Card.IsAbleToHand,1,nil) then
Duel.BreakEffect()
local tc=rg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if Duel.NegateActivation(ev) then
Duel.BreakEffect()
local res=0
if tc:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
res=1
end
if tc:IsType(TYPE_SPELL) and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil,e) then
local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil,e)
if g:GetCount()>0 then
if res==1 then
Duel.BreakEffect()
else
res=1
end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
if tc:IsType(TYPE_TRAP)
and (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and tc:IsSSetable(true)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if res==1 then
Duel.BreakEffect()
end
Duel.SSet(tp,tc)
end
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