Commit fbdeef5e authored by mercury233's avatar mercury233

add 23PP

parent cbb9d43b
--智の賢者-ヒンメル
function c22790910.initial_effect(c)
--SpecialSummon Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22790910,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22790910)
e1:SetCost(c22790910.spcost)
e1:SetTarget(c22790910.sptg)
e1:SetOperation(c22790910.spop)
c:RegisterEffect(e1)
--Disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22790910,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22790911)
e2:SetCondition(c22790910.discon)
e2:SetCost(c22790910.discost)
e2:SetTarget(c22790910.distg)
e2:SetOperation(c22790910.disop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22790910,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,22790912)
e3:SetCondition(c22790910.thcon)
e3:SetTarget(c22790910.thtg)
e3:SetOperation(c22790910.thop)
c:RegisterEffect(e3)
end
function c22790910.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c22790910.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22790910.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c22790910.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c22790910.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 c22790910.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c22790910.tfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c22790910.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return Duel.IsChainDisablable(ev) and rp==1-tp and tg and tg:IsExists(c22790910.tfilter,1,nil,tp)
end
function c22790910.rmfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function c22790910.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22790910.rmfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22790910.rmfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22790910.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c22790910.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c22790910.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c22790910.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c22790910.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22790910.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22790910.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c22790910.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c22790910.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--アディショナル・ミラー・レベル7
function c23812568.initial_effect(c)
aux.EnableExtraDeckSummonCountLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c23812568.condition)
e1:SetCost(c23812568.cost)
e1:SetTarget(c23812568.target)
e1:SetOperation(c23812568.activate)
c:RegisterEffect(e1)
end
function c23812568.filter1(c,tp)
return c:IsFaceup() and c:IsLevel(7) and c:IsControler(tp)
end
function c23812568.filter2(c,e,tp)
return c:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c23812568.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp,c:GetCode())
end
function c23812568.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23812568.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c23812568.filter1,1,nil,tp)
end
function c23812568.cfilter(c,tp)
return c:IsCode(23812568) and c:IsAbleToGraveAsCost()
end
function c23812568.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23812568.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c23812568.cfilter,tp,LOCATION_DECK,0,2,2,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c23812568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:Filter(c23812568.filter1,nil,tp):Filter(c23812568.filter2,nil,e,tp)
if chkc then return mg:IsContains(chkc) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and #mg>0 end
local g=mg
if #mg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=mg:Select(tp,1,1,nil)
end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c23812568.activate(e,tp,eg,ep,ev,re,r,rp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) 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:SetTargetRange(1,0)
e1:SetTarget(c23812568.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c23812568.checkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23812568.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,2,nil,e,tp,tc:GetCode())
if #g~=2 then return end
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local atk=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack)
if atk==0 then return end
Duel.BreakEffect()
Duel.Damage(tp,atk,REASON_EFFECT)
end
end
function c23812568.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0
end
function c23812568.ckfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c23812568.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c23812568.ckfilter,1,nil,tp) then
aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1
end
if eg:IsExists(c23812568.ckfilter,1,nil,1-tp) then
aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1
end
end
\ No newline at end of file
--薔薇占術師
function c2752099.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2752099,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,2752099)
e1:SetCost(c2752099.drcost)
e1:SetTarget(c2752099.drtg)
e1:SetOperation(c2752099.drop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2752099,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,2752099)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c2752099.thtg)
e2:SetOperation(c2752099.thop)
c:RegisterEffect(e2)
end
function c2752099.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c2752099.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c2752099.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c2752099.thfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function c2752099.tgfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToGrave()
end
function c2752099.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c2752099.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2752099.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c2752099.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c2752099.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsLocation(LOCATION_HAND) and tc:GetOriginalLevel()>=7
and Duel.IsExistingMatchingCard(c2752099.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(2752099,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c2752099.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
--プレイング・マンティス
function c31600513.initial_effect(c)
--token 1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31600513,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1,31600513)
e1:SetCondition(c31600513.tkcon)
e1:SetTarget(c31600513.tktg)
e1:SetOperation(c31600513.tkop)
c:RegisterEffect(e1)
--return to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(31600513,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1)
e2:SetCondition(c31600513.thcon)
e2:SetCost(c31600513.thcost)
e2:SetTarget(c31600513.thtg)
e2:SetOperation(c31600513.thop)
c:RegisterEffect(e2)
--token 2
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,31600514)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c31600513.tktg)
e3:SetOperation(c31600513.tkop)
c:RegisterEffect(e3)
end
function c31600513.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c31600513.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,31600514,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_INSECT,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c31600513.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,31600514,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_INSECT,ATTRIBUTE_WIND) then
local token=Duel.CreateToken(tp,31600514)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c31600513.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c31600513.cfilter(c)
return c:IsAbleToGraveAsCost() and c:GetSequence()<5
end
function c31600513.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c31600513.cfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c31600513.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c31600513.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c31600513.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsControler(1-tp) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--武装再生
function c32549749.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,32549749+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c32549749.target)
e1:SetOperation(c32549749.activate)
c:RegisterEffect(e1)
end
function c32549749.filter(c,tp)
if not c:IsType(TYPE_EQUIP) then return false end
return c:IsSSetable(true)
or Duel.IsExistingMatchingCard(c32549749.eqfilter,tp,LOCATION_MZONE,0,1,nil,c,tp)
end
function c32549749.eqfilter(c,ec,tp)
if c:IsFacedown() then return false end
return not ec:IsForbidden() and ec:CheckUniqueOnField(tp) and ec:CheckEquipTarget(c)
end
function c32549749.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then
return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup()
else
return chkc:IsLocation(LOCATION_GRAVE) and c32549749.filter(chkc,tp)
end
end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=ft-1 end
local b1=aux.dscon()
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
local b2=Duel.GetCurrentPhase()~=PHASE_DAMAGE and ft>0
and Duel.IsExistingTarget(c32549749.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(32549749,0),aux.Stringid(32549749,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(32549749,0))
else
op=Duel.SelectOption(tp,aux.Stringid(32549749,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_ATKCHANGE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil,tp)
else
e:SetCategory(CATEGORY_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c32549749.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
end
function c32549749.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
else
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local b1=tc:IsSSetable(true) and ft>0
local b2=Duel.IsExistingMatchingCard(c32549749.eqfilter,tp,LOCATION_MZONE,0,1,nil,tc,tp)
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(32549749,2),aux.Stringid(32549749,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(32549749,2))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(32549749,3))+1
else return end
if op==0 then
Duel.SSet(tp,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tgc=Duel.SelectMatchingCard(tp,c32549749.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tc,tp):GetFirst()
if not tgc then return end
Duel.Equip(tp,tc,tgc)
end
end
end
--分裂するマザー・スパイダー
function c34034150.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c34034150.sprcon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(34034150,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,34034150)
e2:SetCost(c34034150.spcost)
e2:SetTarget(c34034150.sptg)
e2:SetOperation(c34034150.spop)
c:RegisterEffect(e2)
end
function c34034150.sprcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c34034150.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c34034150.spfilter(c,e,tp)
return c:IsCode(60023855) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c34034150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c34034150.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c34034150.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c34034150.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ft=Duel.GetMZoneCount(tp)
local g=Duel.GetMatchingGroup(c34034150.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if ft<=0 or #g==0 then return end
if ft>3 then ft=3 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
for tc in aux.Next(sg) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(c34034150.xyzlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c34034150.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c34034150.xyzlimit(e,c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_DARK)
end
--金科玉条
function c3574681.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,3574681+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c3574681.target)
e1:SetOperation(c3574681.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c3574681.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c3574681.desop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c3574681.filter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c3574681.spfilter(c,e,tp,code1,code2)
return not c:IsCode(code1,code2) and c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3574681.gcheck(g,e,tp)
if #g~=2 then return false end
local a=g:GetFirst()
local d=g:GetNext()
return Duel.IsExistingMatchingCard(c3574681.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,a:GetCode(),d:GetCode())
end
function c3574681.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c3574681.filter,tp,LOCATION_DECK,0,nil)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=ft-1 end
if chk==0 then return ft>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:CheckSubGroup(c3574681.gcheck,2,2,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c3574681.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c3574681.filter,tp,LOCATION_DECK,0,nil)
if ft>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:SelectSubGroup(tp,c3574681.gcheck,false,2,2,e,tp)
if not sg then return end
local ac=sg:GetFirst()
local bc=sg:GetNext()
if Duel.MoveToField(ac,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
and Duel.MoveToField(bc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
ac:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
bc:RegisterEffect(e2)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c3574681.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp,ac:GetCode(),bc:GetCode())
if #rg==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=rg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c3574681.eqlimit)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
end
function c3574681.eqlimit(e,c)
return e:GetOwner()==c
end
function c3574681.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c3574681.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ファイナル・クロス
function c35756798.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,35756798+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c35756798.atkcon)
e1:SetTarget(c35756798.atktg)
e1:SetOperation(c35756798.atkop)
c:RegisterEffect(e1)
if not c35756798.global_check then
c35756798.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetCondition(c35756798.checkcon)
ge1:SetOperation(c35756798.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c35756798.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
end
function c35756798.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsType,nil,TYPE_SYNCHRO)
local tc=g:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetControler(),35756798)==0 then
Duel.RegisterFlagEffect(tc:GetControler(),35756798,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,35756798)>0 and Duel.GetFlagEffect(1,35756798)>0 then
break
end
tc=g:GetNext()
end
end
function c35756798.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,35756798)
return Duel.GetTurnPlayer()==tp and ct>0
end
function c35756798.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c35756798.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35756798.filter(chkc) end
if chk==0 then return Duel.IsAbleToEnterBP()
and Duel.IsExistingTarget(c35756798.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c35756798.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsOriginalSetCard(0x66,0x1017,0xa3) then
Duel.SetTargetParam(1)
end
end
function c35756798.atkfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:GetAttack()>0
end
function c35756798.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if num>0 and Duel.IsExistingMatchingCard(c35756798.atkfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(35756798,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local ag=Duel.SelectMatchingCard(tp,c35756798.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.HintSelection(ag)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(ag:GetFirst():GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
--表裏一体
function c39973386.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,39973386)
e1:SetTarget(c39973386.target)
e1:SetOperation(c39973386.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,39973387)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c39973386.tdtg)
e2:SetOperation(c39973386.tdop)
c:RegisterEffect(e2)
end
function c39973386.costfilter(c,e,tp)
return (c:IsControler(tp) or c:IsFaceup())
and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:GetOriginalLevel()>0
and Duel.IsExistingMatchingCard(c39973386.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,c,e,tp)
end
function c39973386.spfilter(c,tc,e,tp)
if c:GetOriginalAttribute()==tc:GetOriginalAttribute() then return end
local b1=c:IsLocation(LOCATION_HAND) and Duel.GetMZoneCount(tp,tc)>0
local b2=c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
and c:GetOriginalRace()==tc:GetOriginalRace()
and c:GetOriginalLevel()==tc:GetOriginalLevel()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2)
end
function c39973386.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.CheckReleaseGroup(tp,c39973386.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,c39973386.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
end
function c39973386.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c39973386.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c39973386.tdfilter(c,e)
return c:IsCanBeEffectTarget(e) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToDeck()
end
function c39973386.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39973386.tdfilter(chkc) end
local g=Duel.GetMatchingGroup(c39973386.tdfilter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:CheckSubGroup(aux.dabcheck,2,2) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,2,2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c39973386.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==2 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--ガード・マンティス
function c53754104.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53754104,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,53754104)
e1:SetCost(c53754104.spcost)
e1:SetTarget(c53754104.sptg)
e1:SetOperation(c53754104.spop)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53754104,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,53754105)
e2:SetCondition(c53754104.poscon)
e2:SetTarget(c53754104.postg)
e2:SetOperation(c53754104.posop)
c:RegisterEffect(e2)
end
function c53754104.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c53754104.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53754104.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c53754104.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
function c53754104.splimit(e,c)
return not c:IsRace(RACE_INSECT)
end
function c53754104.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c53754104.pfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
and c:IsCanChangePosition()
end
function c53754104.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53754104.pfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c53754104.pfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c53754104.pfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c53754104.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--BF-下弦のサルンガ
function c54594017.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,54594017+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c54594017.spcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,54594018+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c54594017.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c54594017.destg)
e2:SetOperation(c54594017.desop)
c:RegisterEffect(e2)
end
function c54594017.filter(c)
return c:IsAttackAbove(2000) and c:IsFaceup()
end
function c54594017.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c54594017.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c54594017.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_SYNCHRO)
end
function c54594017.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c54594017.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c54594017.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c54594017.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--ベビー・スパイダー
function c60023855.initial_effect(c)
--level up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60023855,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60023855)
e1:SetCost(c60023855.lvcost)
e1:SetTarget(c60023855.lvtg)
e1:SetOperation(c60023855.lvop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60023855,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60023856)
e2:SetCost(c60023855.spcost)
e2:SetTarget(c60023855.sptg)
e2:SetOperation(c60023855.spop)
c:RegisterEffect(e2)
end
function c60023855.cfilter(c,tp)
return c:IsLevelAbove(1) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsControler(tp) or c:IsFaceup())
and Duel.IsExistingMatchingCard(c60023855.lvfilter,tp,LOCATION_MZONE,0,1,c)
end
function c60023855.lvfilter(c)
return c:IsLevelAbove(1) and c:IsFaceup() and c:IsCode(60023855)
end
function c60023855.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c60023855.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c60023855.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
e:SetLabel(g:GetFirst():GetPreviousLevelOnField())
end
function c60023855.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60023855.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c60023855.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local val=e:GetLabel()
local g=Duel.GetMatchingGroup(c60023855.lvfilter,tp,LOCATION_MZONE,0,nil)
if val==0 or #g==0 then return 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_LEVEL)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c60023855.ovfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end
function c60023855.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c60023855.ovfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.Remove(c,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local tc=Duel.SelectMatchingCard(tp,c60023855.ovfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
tc:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c60023855.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60023855.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60023855.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c60023855.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60023855.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60023855.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--シンクロ・ゾーン
function c60306277.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--attack limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c60306277.tglimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60306277,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,60306277)
e2:SetCondition(c60306277.spcon)
e2:SetTarget(c60306277.sptg)
e2:SetOperation(c60306277.spop)
c:RegisterEffect(e2)
--synchro summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60306277,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1,60306278)
e3:SetCondition(c60306277.sccon)
e3:SetCost(c60306277.sccost)
e3:SetTarget(c60306277.sctg)
e3:SetOperation(c60306277.scop)
c:RegisterEffect(e3)
end
function c60306277.tglimit(e,c)
return not c:IsType(TYPE_SYNCHRO)
end
function c60306277.cfilter(c,tp)
return not c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
end
function c60306277.spfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60306277.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60306277.cfilter,1,nil,tp)
end
function c60306277.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:Filter(c60306277.cfilter,nil,tp):Filter(c60306277.spfilter,nil,e,tp)
if chkc then return mg:IsContains(chkc) end
if chk==0 then return #mg>0 end
local g=mg
if #mg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=mg:Select(tp,1,1,nil)
end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60306277.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c60306277.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c60306277.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) end
Duel.SendtoGrave(c,REASON_COST)
end
function c60306277.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60306277.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
--ネコーン
function c61245403.initial_effect(c)
--Search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,61245403)
e1:SetTarget(c61245403.thtg1)
e1:SetOperation(c61245403.thop1)
c:RegisterEffect(e1)
--deck to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,61245404)
e2:SetCondition(c61245403.thcon2)
e2:SetTarget(c61245403.thtg2)
e2:SetOperation(c61245403.thop2)
c:RegisterEffect(e2)
end
function c61245403.thfilter1(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c61245403.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_FZONE,0,nil)
if chk==0 then return #g==0 and Duel.IsExistingMatchingCard(c61245403.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c61245403.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c61245403.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function c61245403.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c61245403.thfilter2(c,tp)
return c:IsType(TYPE_FIELD) and Duel.IsExistingMatchingCard(c61245403.codefilter,tp,LOCATION_DECK,0,1,nil,c)
end
function c61245403.codefilter(c,tc)
return c:IsCode(tc:GetCode()) and c:IsAbleToHand()
end
function c61245403.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61245403.thfilter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c61245403.thfilter2,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c61245403.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c61245403.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c61245403.codefilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--陰の光
function c61322713.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61322713,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,61322713)
e1:SetCost(c61322713.cost1)
e1:SetTarget(c61322713.target)
e1:SetOperation(c61322713.activate)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(61322713,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,61322714)
e2:SetCondition(c61322713.sumcon)
e2:SetCost(c61322713.cost2)
e2:SetTarget(c61322713.sumtg)
e2:SetOperation(c61322713.sumop)
c:RegisterEffect(e2)
end
function c61322713.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c61322713.filter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
and c:GetOriginalLevel()>0
and Duel.IsExistingMatchingCard(c61322713.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c61322713.spfilter(c,e,tp,tc)
local b1=c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return c:IsAttribute(ATTRIBUTE_LIGHT)
and c:GetOriginalRace()==tc:GetOriginalRace()
and c:GetOriginalLevel()==tc:GetOriginalLevel()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2)
end
function c61322713.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c61322713.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c61322713.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c61322713.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c61322713.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_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c61322713.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c61322713.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,61322713)==0
end
function c61322713.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c61322713.cost1(e,tp,eg,ep,ev,re,r,rp,0) and c:IsAbleToRemove() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
c61322713.cost1(e,tp,eg,ep,ev,re,r,rp,1)
end
function c61322713.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
end
function c61322713.sumop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(61322713,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,61322713,RESET_PHASE+PHASE_END,0,1)
end
--エレメントの加護
function c66367984.initial_effect(c)
aux.AddSetNameMonsterList(c,0x3008)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c66367984.condition)
e1:SetCost(c66367984.cost)
e1:SetTarget(c66367984.target)
e1:SetOperation(c66367984.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,66367984)
e2:SetCondition(c66367984.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c66367984.sptg)
e2:SetOperation(c66367984.spop)
c:RegisterEffect(e2)
end
function c66367984.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c66367984.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsAbleToRemoveAsCost()
end
function c66367984.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c66367984.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c66367984.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
if Duel.Remove(g,0,REASON_COST+REASON_TEMPORARY)~=0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetOperation(c66367984.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c66367984.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c66367984.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 c66367984.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c66367984.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsCode),tp,LOCATION_ONFIELD,0,1,nil,74711057)
end
function c66367984.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0x3008) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c66367984.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c66367984.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c66367984.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c66367984.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if ft<=0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if #sg==0 then return end
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
--武の賢者-アーカス
function c96795312.initial_effect(c)
--SpecialSummon Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96795312,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,96795312)
e1:SetCost(c96795312.spcost)
e1:SetTarget(c96795312.sptg)
e1:SetOperation(c96795312.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,96795313)
e2:SetTarget(c96795312.reptg)
e2:SetValue(c96795312.repval)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96795312,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,96795314)
e3:SetCondition(c96795312.thcon)
e3:SetTarget(c96795312.thtg)
e3:SetOperation(c96795312.thop)
c:RegisterEffect(e3)
end
function c96795312.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c96795312.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96795312.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c96795312.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c96795312.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 c96795312.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c96795312.repfilter(c,tp)
return not c:IsReason(REASON_REPLACE) and c:IsType(TYPE_LINK)
and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c96795312.rmfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c96795312.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c96795312.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c96795312.rmfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c96795312.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
function c96795312.repval(e,c)
return c96795312.repfilter(c,e:GetHandlerPlayer())
end
function c96795312.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c96795312.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c96795312.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c96795312.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c96795312.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c96795312.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c96795312.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--DDDD超次元統皇ゼロ・パラドックス
function c97417863.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--pendulum taking
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,97417863)
e1:SetTarget(c97417863.pltg)
e1:SetOperation(c97417863.plop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c97417863.spcon)
e2:SetTarget(c97417863.sptg)
e2:SetOperation(c97417863.spop)
c:RegisterEffect(e2)
--atk 6000
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(97417863,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c97417863.atkcon)
e3:SetTarget(c97417863.atktg)
e3:SetOperation(c97417863.atkop)
c:RegisterEffect(e3)
end
function c97417863.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_PZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c97417863.plop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0 then
c:CompleteProcedure()
if not tc:IsRelateToEffect(e) then return end
if not Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then return end
local fid=c:GetFieldID()
tc:RegisterFlagEffect(97417863,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCountLimit(1)
e1:SetLabel(fid,Duel.GetTurnCount())
e1:SetLabelObject(tc)
e1:SetCondition(c97417863.descon)
e1:SetOperation(c97417863.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c97417863.descon(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=ct and tc:GetFlagEffectLabel(97417863)==fid
end
function c97417863.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c97417863.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsFaceup()
end
function c97417863.spcon(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if #pg==0 then return false end
local pval=pg:GetSum(Card.GetLeftScale)
local g=eg:Filter(c97417863.cfilter,nil,tp)
local lv=g:GetSum(Card.GetLevel)
return #g>0 and lv>0 and pval>lv
end
function c97417863.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c97417863.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 then return end
c:CompleteProcedure()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.SelectYesNo(tp,aux.Stringid(97417863,1)) then
Duel.BreakEffect()
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c97417863.lefilter(c,tp,re)
return re and re:IsActiveType(TYPE_SPELL) and c:IsReason(REASON_EFFECT)
and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x10af)
end
function c97417863.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c97417863.lefilter,1,nil,tp,re) and not eg:IsContains(e:GetHandler())
end
function c97417863.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c97417863.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetAttack()~=6000 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(6000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--フォトン・ジャンパー
function c97639441.initial_effect(c)
--attack announce specialsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(97639441,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,97639441)
e1:SetCondition(c97639441.spcon)
e1:SetTarget(c97639441.sptg)
e1:SetOperation(c97639441.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,97639442)
e2:SetTarget(c97639441.thtg)
e2:SetOperation(c97639441.thop)
c:RegisterEffect(e2)
end
function c97639441.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c97639441.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 c97639441.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c97639441.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1)
Duel.RegisterEffect(e1,tp)
end
function c97639441.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
function c97639441.thfilter(c)
return c:IsSetCard(0x55,0x7b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c97639441.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97639441.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c97639441.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c97639441.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
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