Commit 1f6996d9 authored by VanillaSalt's avatar VanillaSalt

new

parent d39fadd7
--苦渋の決断
function c1033312.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1033312+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1033312.target)
e1:SetOperation(c1033312.activate)
c:RegisterEffect(e1)
end
function c1033312.tgfilter(c,tp)
return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c1033312.thfilter,tp,LOCATION_DECK,0,1,c,c:GetCode())
end
function c1033312.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c1033312.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1033312.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1033312.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1033312.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1033312.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--昇天の剛角笛
function c1637760.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c1637760.condition)
e1:SetTarget(c1637760.target)
e1:SetOperation(c1637760.activate)
c:RegisterEffect(e1)
end
function c1637760.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and Duel.GetTurnPlayer()~=tp and rp~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c1637760.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c1637760.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(1-tp,1,REASON_EFFECT)
Duel.SkipPhase(1-tp,Duel.GetCurrentPhase(),RESET_PHASE+PHASE_END,1)
end
--ペンデュラム・エリア
function c2359348.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c2359348.condition)
e1:SetTarget(c2359348.target)
e1:SetOperation(c2359348.activate)
c:RegisterEffect(e1)
end
function c2359348.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c2359348.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetCount()>0 and g:FilterCount(c2359348.cfilter,nil)==g:GetCount()
end
function c2359348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
if chk==0 then return tc1 and tc2
and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e)
and tc1:IsDestructable() and tc2:IsDestructable() end
local g=Group.FromCards(tc1,tc2)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c2359348.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
local g=Group.FromCards(tc1,tc2)
if tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e)
and Duel.Destroy(g,REASON_EFFECT)==2 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,1)
e1:SetTarget(c2359348.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c2359348.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)~=SUMMON_TYPE_PENDULUM
end
--マジェスペクター・テンペスト
function c2572890.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c2572890.condition1)
e1:SetCost(c2572890.cost)
e1:SetTarget(c2572890.target1)
e1:SetOperation(c2572890.activate1)
c:RegisterEffect(e1)
--Activate(effect)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c2572890.condition2)
e2:SetCost(c2572890.cost)
e2:SetTarget(c2572890.target2)
e2:SetOperation(c2572890.activate2)
c:RegisterEffect(e2)
end
function c2572890.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND)
end
function c2572890.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c2572890.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c2572890.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c2572890.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function c2572890.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c2572890.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c2572890.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c2572890.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c2572890.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--グレイドル・インパクト
function c2759860.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,2759860)
e2:SetTarget(c2759860.destg)
e2:SetOperation(c2759860.desop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,2759860)
e3:SetCondition(c2759860.thcon)
e3:SetTarget(c2759860.thtg)
e3:SetOperation(c2759860.thop)
c:RegisterEffect(e3)
end
function c2759860.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd1) and c:IsDestructable()
end
function c2759860.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c2759860.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c2759860.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c2759860.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c2759860.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c2759860.filter(c)
return c:IsSetCard(0xd1) and c:IsAbleToHand()
end
function c2759860.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2759860.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c2759860.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c2759860.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--救護部隊
function c33622465.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33622465.target)
e1:SetOperation(c33622465.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33622465,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,33622465)
e2:SetCondition(c33622465.spcon)
e2:SetTarget(c33622465.sptg)
e2:SetOperation(c33622465.spop)
c:RegisterEffect(e2)
end
function c33622465.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function c33622465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c33622465.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33622465.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c33622465.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c33622465.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c33622465.cfilter(c)
return bit.band(c:GetPreviousTypeOnField(),TYPE_NORMAL)~=0
end
function c33622465.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33622465.cfilter,1,nil)
end
function c33622465.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,33622465,0,0x11,3,1200,400,RACE_WARRIOR,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33622465.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,33622465,0,0x11,3,1200,400,RACE_WARRIOR,ATTRIBUTE_EARTH) then
c:SetStatus(STATUS_NO_LEVEL,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1,true)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+0x47e0000)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
end
--森羅の姫芽宮
function c33909817.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,1,2)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33909817,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,33909817)
e1:SetCost(c33909817.cost)
e1:SetTarget(c33909817.target)
e1:SetOperation(c33909817.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33909817,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33909818)
e2:SetCost(c33909817.spcost)
e2:SetTarget(c33909817.sptg)
e2:SetOperation(c33909817.spop)
c:RegisterEffect(e2)
end
function c33909817.cost(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 c33909817.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c33909817.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
else
Duel.DisableShuffleCheck()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
end
end
function c33909817.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_PLANT) and c:IsAbleToGraveAsCost()
end
function c33909817.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_HAND+LOCATION_MZONE
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then loc=LOCATION_MZONE end
if chk==0 then return Duel.IsExistingMatchingCard(c33909817.cfilter,tp,loc,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33909817.cfilter,tp,loc,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c33909817.filter(c,e,tp)
return c:IsSetCard(0x90) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33909817.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33909817.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c33909817.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c33909817.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c33909817.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--マジェスペクター・トルネード
function c36183881.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c36183881.cost)
e1:SetTarget(c36183881.target)
e1:SetOperation(c36183881.activate)
c:RegisterEffect(e1)
end
function c36183881.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND)
end
function c36183881.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c36183881.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c36183881.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c36183881.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 chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c36183881.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--誤封の契約書
function c37209439.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c37209439.target)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(37209439,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetCondition(c37209439.negcon)
e2:SetCost(c37209439.negcost)
e2:SetOperation(c37209439.negop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(37209439,1))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c37209439.damcon)
e3:SetCost(c37209439.damcost)
e3:SetTarget(c37209439.damtg)
e3:SetOperation(c37209439.damop)
c:RegisterEffect(e3)
end
function c37209439.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local b1=c37209439.negcon(e,tp,eg,ep,ev,re,r,rp)
local b2=c37209439.damcon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetCurrentPhase()==PHASE_STANDBY
if (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(37209439,2)) then
local c=e:GetHandler()
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(37209439,0),aux.Stringid(37209439,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(37209439,0))
else op=Duel.SelectOption(tp,aux.Stringid(37209439,1))+1 end
if op==0 then
c:RegisterFlagEffect(37209439,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:SetCategory(0)
e:SetOperation(c37209439.negop)
else
c:RegisterFlagEffect(37209440,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
c37209439.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_DAMAGE)
e:SetOperation(c37209439.damop)
end
else
e:SetCategory(0)
e:SetOperation(nil)
end
end
function c37209439.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaf)
end
function c37209439.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c37209439.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c37209439.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(37209439)==0 end
e:GetHandler():RegisterFlagEffect(37209439,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c37209439.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c37209439.distg)
e1:SetLabel(fid)
e1:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c37209439.disop)
e2:SetLabel(fid)
e2:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c37209439.distg)
e3:SetLabel(fid)
e3:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e3,tp)
end
function c37209439.distg(e,c)
return c:GetFieldID()~=e:GetLabel() and c:IsType(TYPE_TRAP) and c:IsStatus(STATUS_ACTIVATED)
end
function c37209439.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetFieldID()~=e:GetLabel() then
Duel.NegateEffect(ev)
end
end
function c37209439.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c37209439.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(37209440)==0 end
e:GetHandler():RegisterFlagEffect(37209440,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c37209439.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function c37209439.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--緊急儀式術
function c38844957.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c38844957.condition)
e1:SetCost(c38844957.cost)
e1:SetTarget(c38844957.target)
e1:SetOperation(c38844957.operation)
c:RegisterEffect(e1)
end
function c38844957.cfilter(c)
return c:IsFaceup() and bit.band(c:GetType(),0x81)==0x81
end
function c38844957.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c38844957.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c38844957.filter(c)
return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function c38844957.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c38844957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local te=g:GetFirst():CheckActivateEffect(true,true,false)
e:SetLabelObject(te)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c38844957.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
--オッドアイズ・フュージョン
function c48144509.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,48144509+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c48144509.target)
e1:SetOperation(c48144509.activate)
c:RegisterEffect(e1)
end
function c48144509.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c48144509.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c48144509.exfilter0(c)
return c:IsSetCard(0x99) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c48144509.exfilter1(c,e)
return c:IsSetCard(0x99) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c48144509.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c48144509.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c48144509.filter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
local sg=Duel.GetMatchingGroup(c48144509.exfilter0,tp,LOCATION_EXTRA,0,nil)
mg1:Merge(sg)
end
local res=Duel.IsExistingMatchingCard(c48144509.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c48144509.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c48144509.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c48144509.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
local sg=Duel.GetMatchingGroup(c48144509.exfilter1,tp,LOCATION_EXTRA,0,nil,e)
mg1:Merge(sg)
end
local sg1=Duel.GetMatchingGroup(c48144509.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c48144509.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
else
local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0)
local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil)
and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ShuffleHand(tp)
end
end
end
--猪突猛進
function c48422921.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c48422921.condition)
e1:SetTarget(c48422921.target)
e1:SetOperation(c48422921.operation)
c:RegisterEffect(e1)
end
function c48422921.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE
end
function c48422921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
local val=0xff
local reg=g:GetFirst():GetFlagEffectLabel(48422921)
if reg then val=val-reg end
Duel.Hint(HINT_SELECTMSG,tp,562)
local att=Duel.AnnounceAttribute(tp,1,val)
Duel.SetTargetParam(att)
end
function c48422921.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_START)
e1:SetLabel(att)
e1:SetOwnerPlayer(tp)
e1:SetCondition(c48422921.descon)
e1:SetOperation(c48422921.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
local reg=tc:GetFlagEffectLabel(48422921)
if reg then
reg=bit.bor(reg,att)
tc:SetFlagEffectLabel(48422921,reg)
else
tc:RegisterFlagEffect(48422921,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,att)
end
end
end
function c48422921.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
return tp==e:GetOwnerPlayer() and tc and tc:IsControler(1-tp) and tc:IsAttribute(e:GetLabel())
end
function c48422921.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
Duel.Destroy(tc,REASON_EFFECT)
end
--グレイドル・パラサイト
function c49966595.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK)
e1:SetTarget(c49966595.acttg)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,49966595)
e2:SetCondition(c49966595.spcon1)
e2:SetCost(c49966595.spcost1)
e2:SetTarget(c49966595.sptg1)
e2:SetOperation(c49966595.spop1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,49966596)
e3:SetCondition(c49966595.spcon2)
e3:SetCost(c49966595.spcost2)
e3:SetTarget(c49966595.sptg2)
e3:SetOperation(c49966595.spop2)
c:RegisterEffect(e3)
end
function c49966595.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,0,chkc) end
if chk==0 then return true end
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) then
if c49966595.spcon1(e,tp,eg,ep,ev,re,r,rp)
and c49966595.spcost1(e,tp,eg,ep,ev,re,r,rp,0)
and c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,aux.Stringid(49966595,0)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
e:SetOperation(c49966595.spop1)
c49966595.spcost1(e,tp,eg,ep,ev,re,r,rp,1)
c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,1)
return
elseif c49966595.spcon2(e,tp,eg,ep,ev,re,r,rp)
and c49966595.spcost2(e,tp,eg,ep,ev,re,r,rp,0)
and c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,0,chkc)
and Duel.SelectYesNo(tp,aux.Stringid(49966595,0)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c49966595.spop2)
c49966595.spcost2(e,tp,eg,ep,ev,re,r,rp,1)
c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,1,chkc)
return
end
end
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
function c49966595.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c49966595.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,49966595)==0 end
Duel.RegisterFlagEffect(tp,49966595,RESET_PHASE+PHASE_END,0,1)
end
function c49966595.spfilter1(c,e,tp)
return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c49966595.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c49966595.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49966595.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
function c49966595.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttacker()
return c:IsControler(tp) and c:IsSetCard(0xd1) and Duel.GetAttackTarget()==nil
end
function c49966595.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,49966596)==0 end
Duel.RegisterFlagEffect(tp,49966596,RESET_PHASE+PHASE_END,0,1)
end
function c49966595.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c49966595.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c49966595.spfilter2,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c49966595.spfilter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c49966595.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
end
--音響戦士マイクス
function c5399521.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--scale
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LSCALE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c5399521.slcon)
e2:SetValue(4)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1)
e4:SetCondition(c5399521.thcon)
e4:SetTarget(c5399521.thtg)
e4:SetOperation(c5399521.thop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_SPSUMMON_PROC)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e5:SetRange(LOCATION_HAND)
e5:SetCondition(c5399521.spcon)
e5:SetOperation(c5399521.spop)
c:RegisterEffect(e5)
--extra summon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetOperation(c5399521.sumop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
end
function c5399521.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c5399521.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsAbleToHand()
end
function c5399521.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c5399521.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c5399521.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c5399521.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c5399521.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c5399521.slcon(e)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq)
return not tc or not tc:IsSetCard(0x1066)
end
function c5399521.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsCanRemoveCounter(tp,1,0,0x35,3,REASON_COST)
end
function c5399521.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,0,0x35,3,REASON_COST)
end
function c5399521.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,5399521)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,5399521,RESET_PHASE+PHASE_END,0,1)
end
--フレシアの蟲惑魔
function c6511113.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c6511113.imcon)
e1:SetValue(c6511113.efilter)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c6511113.imtg)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--cannot be target
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--copy trap
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(6511113,0))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0x3c0)
e5:SetCountLimit(1)
e5:SetCondition(c6511113.condition)
e5:SetCost(c6511113.cost)
e5:SetTarget(c6511113.target)
e5:SetOperation(c6511113.operation)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(6511113,1))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_CHAINING)
e6:SetCountLimit(1)
e6:SetCost(c6511113.cost)
e6:SetTarget(c6511113.target2)
e6:SetOperation(c6511113.operation)
c:RegisterEffect(e6)
end
function c6511113.imcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c6511113.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c6511113.imtg(e,c)
return c:IsSetCard(0x108a) and not c:IsCode(6511113)
end
function c6511113.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.CheckEvent(EVENT_CHAINING)
end
function c6511113.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return e:GetHandler():GetFlagEffect(6511113)==0 end
e:GetHandler():RegisterFlagEffect(6511113,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c6511113.filter1(c)
return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function c6511113.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c6511113.filter1,tp,LOCATION_DECK,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c6511113.filter1,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end
function c6511113.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function c6511113.filter2(c,e,tp,eg,ep,ev,re,r,rp)
if c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToGraveAsCost() then
if c:CheckActivateEffect(false,true,false)~=nil then return true end
local te=c:GetActivateEffect()
if te:GetCode()~=EVENT_CHAINING then return false end
local con=te:GetCondition()
if con and not con(e,tp,eg,ep,ev,re,r,rp) then return false end
local tg=te:GetTarget()
if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0) then return false end
return true
else return false end
end
function c6511113.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c6511113.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c6511113.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
local te,ceg,cep,cev,cre,cr,crp
local fchain=c6511113.filter1(tc)
if fchain then
te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
else
te=tc:GetActivateEffect()
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then
if fchain then
tg(e,tp,ceg,cep,cev,cre,cr,crp,1)
else
tg(e,tp,eg,ep,ev,re,r,rp,1)
end
end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end
--アーティファクト-ヴァジュラ
function c69304426.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_SPELL)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c69304426.spcon)
e2:SetTarget(c69304426.sptg)
e2:SetOperation(c69304426.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c69304426.descon)
e3:SetTarget(c69304426.destg)
e3:SetOperation(c69304426.desop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(69304426,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(c69304426.hspcon)
e4:SetTarget(c69304426.hsptg)
e4:SetOperation(c69304426.hspop)
c:RegisterEffect(e4)
end
function c69304426.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c69304426.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c69304426.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c69304426.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c69304426.filter(c)
return c:GetSequence()<5 and c:IsDestructable()
end
function c69304426.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c69304426.filter,tp,LOCATION_SZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c69304426.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c69304426.filter,tp,LOCATION_SZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c69304426.hspcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c69304426.hsptg(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 c69304426.hspop(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 c70026064.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCost(c70026064.spcost)
e2:SetTarget(c70026064.sptg)
e2:SetOperation(c70026064.spop)
c:RegisterEffect(e2)
end
function c70026064.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c70026064.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x88)
and Duel.IsExistingMatchingCard(c70026064.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode())
end
function c70026064.filter2(c,e,tp,mc,code)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x88) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c70026064.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c70026064.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c70026064.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c70026064.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c70026064.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c70026064.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--転生の超戦士
function c73694478.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,73694478+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c73694478.target)
e1:SetOperation(c73694478.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c73694478.thcon)
e2:SetCost(c73694478.thcost)
e2:SetTarget(c73694478.thtg)
e2:SetOperation(c73694478.thop)
c:RegisterEffect(e2)
end
function c73694478.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xcf)
and Duel.IsExistingMatchingCard(c73694478.spfilter,tp,LOCATION_HAND,0,1,nil,c:GetCode(),e,tp)
end
function c73694478.spfilter(c,code,e,tp)
return c:IsSetCard(0xcf) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c73694478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73694478.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c73694478.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c73694478.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c73694478.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local code=tc:GetCode()
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c73694478.spfilter,tp,LOCATION_HAND,0,1,1,nil,code,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c73694478.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end
function c73694478.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c73694478.thfilter(c)
return c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c73694478.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c73694478.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c73694478.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c73694478.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c73694478.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--デストーイ・マーチ
function c74416026.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c74416026.condition)
e1:SetTarget(c74416026.target)
e1:SetOperation(c74416026.activate)
c:RegisterEffect(e1)
end
function c74416026.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xad)
end
function c74416026.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c74416026.filter,1,nil,tp)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c74416026.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c74416026.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsLevelAbove(8) and c:IsSetCard(0xad)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c74416026.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c74416026.filter,nil,tp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local tg=g:Filter(Card.IsRelateToEffect,nil,re)
local sg=Duel.GetMatchingGroup(c74416026.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg:GetCount()>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(74416026,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg:Select(tp,1,1,nil)
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabelObject(sc)
e1:SetCondition(c74416026.rmcon)
e1:SetOperation(c74416026.rmop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
Duel.SpecialSummonComplete()
sc:CompleteProcedure()
sc:RegisterFlagEffect(74416026,RESET_EVENT+0x1fe0000,0,1)
end
end
end
end
function c74416026.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return Duel.GetTurnPlayer()==tp and tc:GetFlagEffect(74416026)~=0
end
function c74416026.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
--業炎のバリア -ファイヤー・フォース-
function c75249652.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c75249652.condition)
e1:SetTarget(c75249652.target)
e1:SetOperation(c75249652.activate)
c:RegisterEffect(e1)
end
function c75249652.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():IsControler(1-tp)
end
function c75249652.filter(c)
return c:IsAttackPos() and c:IsDestructable()
end
function c75249652.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75249652.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c75249652.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function c75249652.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c75249652.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local dg=Duel.GetOperatedGroup()
local tc=dg:GetFirst()
local atk=0
while tc do
local tatk=tc:GetTextAttack()
if tatk>0 then atk=atk+tatk end
tc=dg:GetNext()
end
local dam=Duel.Damage(tp,atk/2,REASON_EFFECT)
if dam>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
end
--グレイドル・スプリット
function c75361204.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c75361204.condition)
e1:SetTarget(c75361204.target)
e1:SetOperation(c75361204.operation)
c:RegisterEffect(e1)
end
function c75361204.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c75361204.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c75361204.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,75361204)
e3:SetCondition(c75361204.spcon)
e3:SetCost(c75361204.spcost)
e3:SetTarget(c75361204.sptg)
e3:SetOperation(c75361204.spop)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
end
end
function c75361204.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c75361204.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
e:SetLabelObject(e:GetHandler():GetEquipTarget())
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c75361204.spfilter1(c,e,tp)
return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c75361204.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c75361204.spfilter2(c,e,tp,code)
return c:IsSetCard(0xd1) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75361204.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsDestructable()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75361204.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
local ec=e:GetLabelObject()
ec:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c75361204.spop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
if ec:IsRelateToEffect(e) and ec:IsFaceup() and Duel.Destroy(ec,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local fid=e:GetHandler():GetFieldID()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c75361204.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc1=g1:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c75361204.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc1:GetCode())
local tc2=g2:GetFirst()
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP)
tc1:RegisterFlagEffect(75361204,RESET_EVENT+0x1fe0000,0,1,fid)
tc2:RegisterFlagEffect(75361204,RESET_EVENT+0x1fe0000,0,1,fid)
Duel.SpecialSummonComplete()
g1:Merge(g2)
g1:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g1)
e1:SetCondition(c75361204.descon)
e1:SetOperation(c75361204.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c75361204.desfilter(c,fid)
return c:GetFlagEffectLabel(75361204)==fid
end
function c75361204.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c75361204.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c75361204.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c75361204.desfilter,nil,e:GetLabel())
Duel.Destroy(tg,REASON_EFFECT)
end
--サイコ・ブレイド
function c75539614.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,75539614+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c75539614.cost)
e1:SetTarget(c75539614.target)
e1:SetOperation(c75539614.operation)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c75539614.val)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c75539614.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,100) end
local lp=Duel.GetLP(tp)
local m=math.floor(math.min(lp,2000)/100)
local t={}
for i=1,m do
t[i]=i*100
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:GetHandler():RegisterFlagEffect(75539614,RESET_EVENT+0x1fe0000,0,1,ac)
end
function c75539614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c75539614.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c75539614.val(e,c)
local ct=e:GetHandler():GetFlagEffectLabel(75539614)
if not ct then return 0 end
return ct
end
--イグナイト・リロード
function c76751255.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,76751255+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c76751255.target)
e1:SetOperation(c76751255.activate)
c:RegisterEffect(e1)
end
function c76751255.filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() and not c:IsPublic()
end
function c76751255.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(c76751255.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c76751255.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,c76751255.filter,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct+1,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e1,tp)
end
--超戦士の盾
function c799183.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c799183.condition)
e1:SetTarget(c799183.target)
e1:SetOperation(c799183.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c799183.setcost)
e2:SetTarget(c799183.settg)
e2:SetOperation(c799183.setop)
c:RegisterEffect(e2)
end
function c799183.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcf) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c799183.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c799183.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c799183.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x3001,1,REASON_COST)
end
function c799183.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c799183.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--DDDの契約変更
function c811734.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetTarget(c811734.target)
e1:SetOperation(c811734.activate)
c:RegisterEffect(e1)
end
function c811734.atkfilter(c)
return c:IsSetCard(0x10af) and c:GetAttack()>0 and c:IsAbleToRemove()
end
function c811734.thfilter(c)
return c:IsLevelBelow(4) and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c811734.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c811734.atkfilter,tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c811734.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(811734,0),aux.Stringid(811734,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(811734,0))
else op=Duel.SelectOption(tp,aux.Stringid(811734,1))+1 end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_REMOVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c811734.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c811734.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local atk=g:GetFirst():GetAttack()
local tc=Duel.GetAttacker()
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsRelateToBattle() and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c811734.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
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