Commit f948040a authored by tsubaki's avatar tsubaki

1.999zz23 fix2

parent 75e496cc
Pipeline #21212 passed with stage
in 56 seconds
--巨臀突击
function c10931.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:SetCondition(c10931.condition)
e1:SetTarget(c10931.target)
e1:SetOperation(c10931.activate)
c:RegisterEffect(e1)
end
function c10931.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=0x08 and Duel.GetCurrentPhase()<=0x80
end
function c10931.filter(c,e,tp)
return c:IsSetCard(0x200) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10931.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10931.filter, 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 c10931.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10931.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1)
e2:SetOperation(c10931.op)
tc:RegisterEffect(e2)
end
end
function c10931.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(0)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetValue(0)
c:RegisterEffect(e4)
end
--先不着急
local s,id=GetID()
function s.initial_effect(c)
--Activation requirement
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsPosition(POS_FACEDOWN_DEFENSE)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil)==1 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST,e:GetHandler())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)--+RESET_PHASE+PHASE_END
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
Duel.Draw(tp,2,REASON_EFFECT)
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_MAIN1,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_MAIN2,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--落樱矢量✿魂魄妖梦
--Lyrilusc - Soul Shell Falco
local s,id=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.matfilter,1)
c:EnableReviveLimit()
--banish a monster from top of GY
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.condition)
e1:SetTarget(s.bantg)
e1:SetOperation(s.banop)
c:RegisterEffect(e1)
end
function s.matfilter(c)
return c:IsLinkRace(RACE_WARRIOR) and c:IsLinkSetCard(0x208)
end
--banish a monster from top of GY
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function s.banop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)-1)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
--隐藏历史的半兽✿上白泽慧音
function c21096.initial_effect(c)
--Dual
aux.EnableDualAttribute(c)
--再度召唤效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-4)
e1:SetCondition(aux.IsDualState)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-1400)
e2:SetCondition(aux.IsDualState)
c:RegisterEffect(e2)
--效果②
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1)
e3:SetTarget(aux.TRUE)
e3:SetCondition(aux.IsDualState)
c:RegisterEffect(e3)
end
--地灵术『仲』
function c21180.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21180,0))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c21180.condition)
e1:SetTarget(c21180.dmtg1)
e1:SetOperation(c21180.dmop1)
c:RegisterEffect(e1)
local e2b=e1:Clone()
e2b:SetCategory(CATEGORY_NEGATE)
e2b:SetCode(EVENT_BE_BATTLE_TARGET)
e2b:SetCondition(c21180.bdcon)
e2b:SetTarget(c21180.bdtg)
e2b:SetOperation(c21180.bdop)
c:RegisterEffect(e2b)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c21180.handcon)
c:RegisterEffect(e2)
end
function c21180.cfilter(c)
return c:IsType(TYPE_DUAL)
end
function c21180.handcon(e)
return Duel.IsExistingMatchingCard(c21180.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c21180.dfilter(c)
return c:IsLocation(LOCATION_MZONE)
end
function c21180.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c21180.dfilter,1,nil) and Duel.IsChainDisablable(ev)
end
function c21180.dmtg1(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 c21180.dmop1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c21180.bdcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ec:IsFaceup() and ec:IsControler(tp)
end
function c21180.bdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c21180.bdop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
--社东天纪✿射命丸文
function c23246.initial_effect(c)
--Xyz Summon
aux.AddXyzProcedureLevelFree(c,c23246.spfilter,nil,2,2)
c:EnableReviveLimit()
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23246,0))
e1:SetCategory(CATEGORY_TO_DECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetCost(c23246.thcost)
e1:SetTarget(c23246.thtg)
e1:SetOperation(c23246.thop)
c:RegisterEffect(e1)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23246,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c23246.cost2)
e2:SetTarget(c23246.target2)
e2:SetOperation(c23246.operation2)
c:RegisterEffect(e2)
end
function c23246.spfilter(c,xyzc)
return (c:IsSetCard(0x224) and (c:IsXyzType(TYPE_XYZ) or c:IsXyzType(TYPE_LINK))) or c:IsXyzLevel(xyzc,8)
end
function c23246.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if chk==0 then return g:IsExists(Card.IsAbleToDeckAsCost,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg = g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,1,REASON_COST)
end
function c23246.tfilter2(c)
return c:IsAbleToHand()
end
function c23246.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c23246.tfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23246.tfilter2,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c23246.tfilter2,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TO_DECK,g,1,0,LOCATION_ONFIELD)
end
function c23246.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c23246.cfilter(c)
return c:IsSetCard(0x224) and c:IsType(TYPE_XYZ+TYPE_LINK) and c:IsAbleToGraveAsCost()
end
function c23246.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetHandler():GetOverlayGroup()
if chk==0 then return cg:IsExists(c23246.cfilter, 1, nil) end
local g=cg:Select(tp,1,1,nil)
Duel.SendtoGrave(g, REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c23246.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c23246.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsCode(23126) then
c23126.thop(e,tp,eg,ep,ev,re,r,rp)
elseif tc:IsCode(23510) then
c23510.atkop(e,tp,eg,ep,ev,re,r,rp)
elseif tc:IsCode(23504) then
c23504.atkop(e,tp,eg,ep,ev,re,r,rp)
else return
end
end
--望月的注视者✿今泉影狼
function c29059.initial_effect(c)
--Synchro Summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttackBelow,800),aux.NonTuner(c29059.sfilter),1)
c:EnableReviveLimit()
--Add "Gensokyo" to Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29059,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c29059.cost1)
e1:SetTarget(c29059.target1)
e1:SetOperation(c29059.operation1)
c:RegisterEffect(e1)
--Effect Negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DRAW)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCondition(c29059.condition2)
e2:SetOperation(c29059.operation2)
c:RegisterEffect(e2)
end
function c29059.sfilter(c)
return c:GetAttack()<=1000 and c:IsSetCard(0x208)
end
--Effect 1
--花费:将这张卡的攻击力下降500
function c29059.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttack()>499 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-500)
e:GetHandler():RegisterEffect(e1)
end
--效果对象:卡组中的一张「幻想乡」
function c29059.filter1(c)
return c:IsCode(10000) and c:IsAbleToHand()
end
function c29059.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29059.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--发动操作:将一张「幻想乡」加入手卡
function c29059.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29059.filter1,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
--Effect 2
--效果条件:这张卡在怪兽区域或墓地存在
function c29059.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW
end
--发动操作:对方不能从手卡发动效果
function c29059.operation2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0, 1)
e1:SetValue(c29059.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1, tp)
end
function c29059.aclimit(e, re, tp)
return re:GetActivateLocation() == LOCATION_HAND
end
--蓬莱之流连✿清兰
function c31081.initial_effect(c)
--Monster Effect
--Return to Hand and Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31081,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,31081)
e1:SetCost(c31081.cost)
e1:SetTarget(c31081.target1)
e1:SetOperation(c31081.operation1)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(31081,ACTIVITY_SPSUMMON,c31081.counterfilter)
--Return to Deck and Place "qinglan"
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCost(c31081.cost2)
e2:SetOperation(c31081.operation2)
c:RegisterEffect(e2)
end
function c31081.counterfilter(c)
return c:IsRace(RACE_BEAST)
end
--Monster Effect 1
function c31081.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(31081,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(), nil, REASON_COST)
end
function c31081.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsRace(RACE_BEAST)
end
--效果条件:自己墓地的兽族怪兽或者「0x258」怪兽
function c31081.filter1b(c,e,tp)
return (c:IsRace(RACE_BEAST) or c:IsSetCard(0x258)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c31081.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31081.filter1b(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c31081.filter1b,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c31081.filter1b,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c31081.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c31081.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--Monster Effect 2
function c31081.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,0,REASON_COST)
end
function c31081.operation2(e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,200112)
Duel.MoveToField(token,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
--此间的因幡✿铃瑚
function c31084.initial_effect(c)
--Monster Effect
--Return to Hand and Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31084,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,31084)
e1:SetCost(c31084.cost)
e1:SetTarget(c31084.target1)
e1:SetOperation(c31084.operation1)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(31084,ACTIVITY_SPSUMMON,c31084.counterfilter)
--Return to Deck and Gain LP
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCost(c31084.cost2)
e2:SetOperation(c31084.operation2)
c:RegisterEffect(e2)
end
function c31084.counterfilter(c)
return c:GetAttribute()==ATTRIBUTE_EARTH
end
--Monster Effect 1
function c31084.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(31084,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(), nil, REASON_COST)
end
function c31084.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetAttribute()==ATTRIBUTE_EARTH
end
--效果条件:自己墓地的地属性怪兽或者「0x258」怪兽
function c31084.filter1b(c,e,tp)
return (c:IsAttribute(ATTRIBUTE_EARTH) or c:IsSetCard(0x258)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c31084.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31084.filter1b(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c31084.filter1b,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c31084.filter1b,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c31084.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c31084.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--Monster Effect 2
--效果条件:游戏中除外的这张卡
function c31084.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,0,REASON_COST)
end
--发动操作:自己回复1000基本分。
function c31084.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT)
end
--星条旗妖精☆克劳恩皮丝✿
--31093
local s,id=GetID()
function s.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x275))
e1:SetValue(200)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(100)
c:RegisterEffect(e2)
--②
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
local e5=e3:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--③
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsCode(0x275) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsLocation(LOCATION_HAND) and bc and bc:IsType(TYPE_MONSTER)
end
function s.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 s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--冬之终结-妮娅
function c4114220.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2)
c:EnableReviveLimit()
--atk def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c4114220.value)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114220,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c4114220.cost1)
e2:SetTarget(c4114220.tg1)
e2:SetOperation(c4114220.op1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(4114220,1))
e3:SetCost(c4114220.cost2)
c:RegisterEffect(e3)
--disable_field_check
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(4114220)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
c:RegisterEffect(e4)
end
function c4114220.filter4(c)
return c:IsSetCard(0x6141) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c4114220.value(e,c)
local g=Duel.GetMatchingGroup(c4114220.filter4,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct*150
end
function c4114220.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c4114220.costfilter(c)
return c:IsSetCard(0x6141) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c4114220.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114220.costfilter,tp,LOCATION_ONFIELD,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4114220.costfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c4114220.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c4114220.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(4114220,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c4114220.endcon)
e3:SetOperation(c4114220.endop)
Duel.RegisterEffect(e3,tp)
end
end
function c4114220.endcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(4114220)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c4114220.endop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local ec=e:GetOwner()
local val=aux.SequenceToGlobal(tc:GetControler(),LOCATION_MZONE,tc:GetSequence())
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(ec)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(val)
e1:SetCondition(c4114220.endcon2)
Duel.RegisterEffect(e1,tp)
end
end
function c4114220.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6141)
end
function c4114220.endcon2(e)
local tp=e:GetHandlerPlayer()
if Duel.IsExistingMatchingCard(c4114220.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and (Duel.IsPlayerAffectedByEffect(tp,4114220) or Duel.IsPlayerAffectedByEffect(1-tp,4114220)) then
return true
end
--e:Reset()
return false
end
--莴苣姑娘-保登摩卡
function c431407.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),aux.NonTuner(Card.IsRace,RACE_FAIRY),1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(431407,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c431407.discon)
e1:SetCost(c431407.discost)
e1:SetTarget(c431407.distg)
e1:SetOperation(c431407.disop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(431407,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,431407)
e2:SetCondition(c431407.thcon)
e2:SetCost(c431407.thcost)
e2:SetTarget(c431407.thtg)
e2:SetOperation(c431407.thop)
c:RegisterEffect(e2)
end
function c431407.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c431407.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c431407.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c431407.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c431407.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c431407.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)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)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
end
function c431407.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.DiscardDeck(tp,1,REASON_EFFECT)==1 then
local g=Duel.GetOperatedGroup()
if g:GetFirst():IsRace(RACE_FAIRY) then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
end
function c431407.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c431407.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c431407.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c431407.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c431407.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c431407.thfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x404) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c431407.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c431407.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c431407.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c431407.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--雷云雾中杀意之眼✿
require "expansions/script/nef/darksyn"
local Cardno=74561066
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--dark synchro summon
c:EnableReviveLimit()
DS.AddDarkSynchroProcedure(c,nil,aux.FilterBoolFunction(cCardno.synfilter),nil)
DS.DarkSynLimit(c)
--SPSUMMON_SUCCESS
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cCardno.sptg)
e1:SetOperation(cCardno.spop)
c:RegisterEffect(e1)
--battled
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetCondition(cCardno.bacon)
e2:SetTarget(cCardno.batg)
e2:SetOperation(cCardno.baop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Cardno,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,Cardno)
e3:SetTarget(cCardno.setg)
e3:SetOperation(cCardno.seop)
c:RegisterEffect(e3)
end
--search
function cCardno.sefilter(c)
return c:IsSetCard(0x713,0x201) and c:IsAbleToHand()
end
function cCardno.drfilter2(c)
return c:IsSetCard(0x138) and c:IsAbleToDeck()
end
function cCardno.setg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.sefilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function cCardno.seop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cCardno.sefilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--battled
function cCardno.bacon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function cCardno.batg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function cCardno.baop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=c:GetEquipCount()
if num>0 then
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if g:GetCount()>0 then
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,num,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
--SPSUMMON_SUCCESS
function cCardno.spfilter(c)
return c:IsSetCard(0x201)
end
function cCardno.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil) end
end
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil) then
local num=0
local equip_count=Duel.GetMatchingGroupCount(cCardno.spfilter,tp,LOCATION_GRAVE,0,nil)
local szong_count=Duel.GetLocationCount(tp,LOCATION_SZONE)
local hand_count=Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT)
if hand_count>0 then
local dis=Duel.DiscardHand(tp,Card.IsDiscardable,0,hand_count,REASON_EFFECT,nil,REASON_EFFECT)
if dis>0 then num=num+dis end
end
num=num+1
local can_equip=math.min(szong_count,num)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eg=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,can_equip,nil)
local tc=eg:GetFirst()
while tc do
Duel.Equip(tp,tc,c)
tc=eg:GetNext()
end
end
end
--synfilter
function cCardno.synfilter(c)
return c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)
end
--鬼牌✿克劳恩皮丝
local Cardno=74562032
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cCardno.con)
e2:SetTarget(cCardno.tg)
e2:SetOperation(cCardno.op)
c:RegisterEffect(e2)
--cannot trow
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_USE_AS_COST)
e3:SetRange(LOCATION_HAND)
e3:SetValue(1)
c:RegisterEffect(e3)
local e6=e3:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_EFFECT)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e7)
local e8=e3:Clone()
e8:SetCode(EFFECT_UNRELEASABLE_SUM)
c:RegisterEffect(e8)
end
--draw
function cCardno.con(e,tp,eg,ep,ev,re,r,rp)
return true
end
function cCardno.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,LOCATION_HAND,0,nil,1-tp)>0 and c:GetFlagEffect(Cardno)==0 end
c:RegisterFlagEffect(Cardno,RESET_PHASE+PHASE_STANDBY,0,1)
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_HAND,0,nil,1-tp)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
local sg=g:Select(1-tp,1,1,nil)
local sc=sg:GetFirst()
local tg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if Duel.SendtoHand(sg,1-tp,REASON_EFFECT) then
if sc:IsCode(74562032) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
else
local st=TYPE_MONSTER
if sc:IsType(TYPE_SPELL) then st=TYPE_SPELL end
if sc:IsType(TYPE_TRAP) then st=TYPE_TRAP end
if tg:FilterCount(Card.IsType,nil,st)>0 then
local gg=tg:FilterSelect(1-tp,Card.IsType,1,1,nil,st)
Duel.SendtoGrave(gg,REASON_RULE)
Duel.SendtoGrave(sc,REASON_RULE)
end
end
end
end
end
\ No newline at end of file
--以100迈驰骋天际!
local Cardno=74562037
local cCardno=_G["c"..Cardno]
function cCardno.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,74562037+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cCardno.cost)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
end
function cCardno.cfilter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsAbleToExtraAsCost()
and Duel.IsExistingMatchingCard(cCardno.cfilter2,tp,LOCATION_MZONE,0,1,nil,e,tp,c)
end
function cCardno.cfilter2(c,e,tp,tc)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and c:IsAbleToExtraAsCost()
and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel()+tc:GetLevel(),Group.FromCards(c,tc))
end
function cCardno.spfilter(c,e,tp,lv,mg)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function cCardno.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.cfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,cCardno.cfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,cCardno.cfilter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g1:GetFirst())
e:SetLabel(g1:GetFirst():GetLevel()+g2:GetFirst():GetLevel())
g1:Merge(g2)
Duel.SendtoDeck(g1,nil,SEQ_DECKTOP,REASON_COST)
end
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return true
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
local tc=g:GetFirst()
if tc:IsSetCard(0x252a) then
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(cCardno.thop)
c:RegisterEffect(e1)
end
end
end
--tohand
function cCardno.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,Cardno)
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
--地符『不让土壤之剑』
function c86379062.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379062.tg)
e1:SetOperation(c86379062.op)
c:RegisterEffect(e1)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
end
function c86379062.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
--[[local dt=Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,0,LOCATION_ONFIELD,nil,e)
local ct=math.floor(Duel.GetCounter(tp,1,0,0x245)/2)+1
if dt>ct then dt=ct end
local cost=1
if dt>1 then
local t={}
for i=1,dt do
t[i]=i
end
cost=Duel.AnnounceNumber(tp,table.unpack(t))
if cost>1 then
Duel.RemoveCounter(tp,1,0,0x245,(cost-1)*2,REASON_EFFECT)
end
end]]--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c86379062.descon)
e1:SetOperation(c86379062.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e:GetHandler():RegisterEffect(e1)
end
function c86379062.thfilter(c)
return c:IsAbleToHand() and c:GetCounter(0x245)>0
end
function c86379062.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local val=0
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local tg=Duel.GetOperatedGroup()
if tg:GetCount()<=0 then return end
local tc=tg:GetFirst()
while tc do
local seq=tc:GetPreviousSequence()
local loc=0
if tc:IsPreviousLocation(LOCATION_MZONE) then
loc=LOCATION_MZONE
end
if tc:GetPreviousSequence()~=5 and tc:IsPreviousLocation(LOCATION_SZONE) then
loc=LOCATION_SZONE
end
if loc~=0 then
local dis=aux.SequenceToGlobal(1-tp,loc,seq)
val=val|dis
end
tc=tg:GetNext()
end
if val~=0 then
--disable field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_DISABLE_FIELD)
e2:SetLabel(val)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c86379062.zone)
c:RegisterEffect(e2)
end
if Duel.IsExistingMatchingCard(c86379062.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(86379062,0)) then
Duel.BreakEffect()
local thg=Duel.SelectMatchingCard(tp,c86379062.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoHand(thg,nil,REASON_EFFECT)
end
end
end
function c86379062.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c86379062.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_RULE)
end
--
function c86379062.zone(e,c)
return e:GetLabel()
end
--彩符『极彩台风』
function c86379698.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--[[--to field
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379698,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,86379698)
e1:SetCost(c86379698.tscost)
e1:SetTarget(c86379698.tstg)
e1:SetOperation(c86379698.tsop)
c:RegisterEffect(e1)]]--
--extomain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_TOMAIN_KOISHI)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c86379698.tmtg)
e2:SetTargetRange(LOCATION_EXTRA,0)
c:RegisterEffect(e2)
--[[local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c86379698.imcon)
e3:SetTarget(c86379698.imtg)
e3:SetValue(c86379698.imval)
c:RegisterEffect(e3)]]--
--synchro level
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_ALLOW_SYNCHRO_KOISHI)
e4:SetValue(c86379698.slval)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c86379698.sltg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
--
function c86379698.tmtg(e,c)
return c:IsSetCard(0x810) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
--
function c86379698.tsfilter(c)
return c:IsAbleToHandAsCost() and c:IsFaceup() and c:IsCode(86379688)
end
function c86379698.tscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379698.tsfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c86379698.tsfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c86379698.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c86379698.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--
function c86379698.imcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c86379698.imtg(e,c)
return c:IsFaceup() and c:IsSetCard(0x810) and c:GetSummonLocation()==LOCATION_EXTRA
end
function c86379698.imval(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--
function c86379698.slval(e,c)
return e:GetHandler():GetRank()
end
function c86379698.slfilter(c)
return c:IsSetCard(0x810)
end
function c86379698.sltg(e,c)
return c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(c86379698.slfilter,1,nil)
end
--秘封部长✿宇佐见堇子
function c86379848.initial_effect(c)
aux.AddCodeList(c,22271101)
c:EnableReviveLimit()
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379848,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCost(c86379848.spcost)
e2:SetTarget(c86379848.sptg)
e2:SetOperation(c86379848.spop)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379848,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c86379848.target)
e3:SetOperation(c86379848.operation)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379848,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROY)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c86379848.scon)
e4:SetCost(c86379848.cost)
e4:SetTarget(c86379848.stg)
e4:SetOperation(c86379848.sop)
c:RegisterEffect(e4)
--spcon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(function(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end)
c:RegisterEffect(e0)
end
--
function c86379848.rfilter(c)
return c:IsSetCard(0x351) and c:IsAbleToGraveAsCost()
end
function c86379848.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379848.rfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c86379848.rfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86379848.rfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c86379848.rfilter,tp,LOCATION_DECK,0,1,1,nil)
g:Merge(g2)
Duel.SendtoGrave(g,REASON_COST)
end
function c86379848.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c86379848.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.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0 then
c:CompleteProcedure()
end
end
--
function c86379848.cfilter(c)
return c:IsCode(22271101) and not c:IsPublic()
end
function c86379848.cfilter2(c)
return not c:IsCode(22271101) and not c:IsPublic()
end
function c86379848.filter1(c)
return c:IsSetCard(0x351) and c:IsAbleToHand()
end
function c86379848.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(c86379848.cfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c86379848.filter1,tp,LOCATION_DECK,0,1,nil)) or Duel.IsExistingMatchingCard(c86379848.cfilter2,tp,LOCATION_HAND,0,1,nil) end
end
function c86379848.operation(e,tp,eg,ep,ev,re,r,rp)
local pg=Group.CreateGroup()
if Duel.IsExistingMatchingCard(c86379848.cfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c86379848.filter1,tp,LOCATION_DECK,0,1,nil) then
local g1=Duel.GetMatchingGroup(c86379848.cfilter,tp,LOCATION_HAND,0,nil)
pg:Merge(g1)
end
if Duel.IsExistingMatchingCard(c86379848.cfilter2,tp,LOCATION_HAND,0,1,nil) then
local g2=Duel.GetMatchingGroup(c86379848.cfilter2,tp,LOCATION_HAND,0,nil)
pg:Merge(g2)
end
if pg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=pg:Select(tp,1,1,nil)
if g:GetFirst():IsCode(22271101) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c86379848.filter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
local tc=Duel.CreateToken(tp,22271101)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
end
end
end
--
function c86379848.filter(c,tp)
return c:IsSetCard(0x211) and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp
end
function c86379848.scon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379848.filter,1,nil,tp)
end
function c86379848.costfilter(c)
return c:IsCode(22271101) and c:IsAbleToRemoveAsCost()
end
function c86379848.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379848.costfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c86379848.costfilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.Remove(g,REASON_COST)
end
function c86379848.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c86379848.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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