Commit 3114cf40 authored by argon's avatar argon

new

parent daefab5d
--剛地帝グランマーグ
function c15545291.initial_effect(c)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15545291,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c15545291.otcon)
e1:SetOperation(c15545291.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15545291,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c15545291.descon)
e2:SetTarget(c15545291.destg)
e2:SetOperation(c15545291.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c15545291.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c15545291.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
end
function c15545291.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c15545291.otfilter,1,nil)
end
function c15545291.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c15545291.otfilter,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c15545291.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c15545291.desfilter(c)
return c:IsFacedown() and c:IsDestructable()
end
function c15545291.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c15545291.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15545291.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c15545291.dfilter(c,e)
return c:IsFacedown() and c:IsRelateToEffect(e)
end
function c15545291.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c15545291.dfilter,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
if e:GetLabel()==1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c15545291.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--ゴーストリック・シュタイン
function c16279989.initial_effect(c)
--summon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c16279989.sumcon)
c:RegisterEffect(e1)
--turn set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16279989,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c16279989.postg)
e2:SetOperation(c16279989.posop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16279989,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(c16279989.thcon)
e3:SetTarget(c16279989.thtg)
e3:SetOperation(c16279989.thop)
c:RegisterEffect(e3)
end
function c16279989.sfilter(c)
return c:IsFaceup() and c:IsSetCard(0x8d)
end
function c16279989.sumcon(e)
return not Duel.IsExistingMatchingCard(c16279989.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c16279989.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(16279989)==0 end
c:RegisterFlagEffect(16279989,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c16279989.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE)
end
end
function c16279989.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c16279989.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,16279989)==0 end
Duel.RegisterFlagEffect(tp,16279989,RESET_PHASE+PHASE_END,0,1)
end
function c16279989.filter(c)
return c:IsSetCard(0x8d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c16279989.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16279989.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16279989.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16279989.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--神竜騎士フェルグラント
function c1639384.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,8),2)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1639384,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c1639384.cost)
e1:SetTarget(c1639384.target)
e1:SetOperation(c1639384.operation)
c:RegisterEffect(e1)
end
function c1639384.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1639384.filter(c)
return c:IsFaceup()
end
function c1639384.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1639384.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1639384.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1639384.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c1639384.operation(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:IsDisabled() 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+0x1fe0000+RESET_PHASE+RESET_END)
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+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
--荒魂
function c16889337.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)
--summon,flip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c16889337.retreg)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16889337,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c16889337.thtg)
e4:SetOperation(c16889337.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_FLIP)
c:RegisterEffect(e5)
end
function c16889337.filter(c)
return c:IsType(TYPE_SPIRIT) and c:GetCode()~=16889337 and c:IsAbleToHand()
end
function c16889337.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16889337.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16889337.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16889337.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16889337.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(aux.Stringid(16889337,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(c16889337.retcon)
e1:SetTarget(c16889337.rettg)
e1:SetOperation(c16889337.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
c:RegisterEffect(e2)
end
function c16889337.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN)
else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end
end
function c16889337.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c16889337.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--武神帝-カグツチ
function c1855932.initial_effect(c)
c:SetUniqueOnField(1,0,1855932)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEASTWARRIOR),4),2)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1855932,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c1855932.discon)
e1:SetTarget(c1855932.distg)
e1:SetOperation(c1855932.disop)
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:SetTarget(c1855932.reptg)
e2:SetValue(c1855932.repval)
c:RegisterEffect(e2)
end
function c1855932.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c1855932.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,5)
end
function c1855932.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,5,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsSetCard,nil,0x88)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*100)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
function c1855932.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR)
end
function c1855932.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c1855932.repfilter,1,nil,tp) end
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(1855932,1)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
local g=eg:Filter(c1855932.repfilter,nil,tp)
if g:GetCount()==1 then
e:SetLabelObject(g:GetFirst())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local cg=g:Select(tp,1,1,nil)
e:SetLabelObject(cg:GetFirst())
end
return true
else return false end
end
function c1855932.repval(e,c)
return c==e:GetLabelObject()
end
--ギミック・パペット-ボム・エッグ
function c20032555.initial_effect(c)
--effects
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetDescription(aux.Stringid(20032555,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c20032555.efftg)
e1:SetOperation(c20032555.effop)
c:RegisterEffect(e1)
end
function c20032555.cfilter(c)
return c:IsSetCard(0x83) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c20032555.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,20032555)==0 and Duel.IsExistingMatchingCard(c20032555.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c20032555.cfilter,1,1,REASON_COST+REASON_DISCARD)
local opt=0
if e:GetHandler():GetLevel()==8 then
opt=Duel.SelectOption(tp,aux.Stringid(20032555,1))
else
opt=Duel.SelectOption(tp,aux.Stringid(20032555,1),aux.Stringid(20032555,2))
end
e:SetLabel(opt)
if opt==0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
Duel.RegisterFlagEffect(tp,20032555,RESET_PHASE+PHASE_END,0,1)
end
function c20032555.effop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Damage(1-tp,800,RASON_EFFECT)
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
end
--先史遺産カブレラの投石機
function c20154092.initial_effect(c)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20154092,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c20154092.cost)
e2:SetTarget(c20154092.target)
e2:SetOperation(c20154092.operation)
c:RegisterEffect(e2)
end
function c20154092.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x70) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x70)
Duel.Release(g,REASON_COST)
end
function c20154092.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c20154092.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--BK リベージ・ガードナー
function c24184846.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24184846,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c24184846.rmcost)
e1:SetTarget(c24184846.rmtg)
e1:SetOperation(c24184846.rmop)
c:RegisterEffect(e1)
end
function c24184846.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c24184846.filter(c)
return c:IsFaceup() and c:IsSetCard(0x84) and c:IsAbleToRemove()
end
function c24184846.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24184846.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c24184846.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c24184846.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c24184846.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabelObject(tc)
e1:SetCondition(c24184846.retcon)
e1:SetOperation(c24184846.retop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e:GetLabel(0)
else
e:GetLabel(Duel.GetTurnCount())
end
Duel.RegisterEffect(e1,tp)
end
end
function c24184846.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel()
end
function c24184846.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
e:Reset()
end
--H・C クラスプ・ナイフ
function c28194325.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28194325,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c28194325.condition)
e1:SetCost(c28194325.cost)
e1:SetTarget(c28194325.target)
e1:SetOperation(c28194325.operation)
c:RegisterEffect(e1)
end
function c28194325.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x106f)
end
function c28194325.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,28194325)==0 end
Duel.RegisterFlagEffect(tp,28194325,RESET_PHASE+PHASE_END,0,1)
end
function c28194325.filter(c)
return c:IsSetCard(0x106f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c28194325.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28194325.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c28194325.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28194325.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ギミック・パペット-シザー・アーム
function c29216957.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29216957,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c29216957.target)
e1:SetOperation(c29216957.operation)
c:RegisterEffect(e1)
end
function c29216957.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x83) and c:IsAbleToGrave()
end
function c29216957.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29216957.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c29216957.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c29216957.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--No.46 神影龍ドラッグルーオン
function c2978414.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),8),2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2978414,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c2978414.cost)
e1:SetTarget(c2978414.sptg)
e1:SetOperation(c2978414.spop)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2978414,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c2978414.cost)
e2:SetTarget(c2978414.cttg)
e2:SetOperation(c2978414.ctop)
c:RegisterEffect(e2)
--effect limit
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2978414,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c2978414.cost)
e3:SetOperation(c2978414.efop)
c:RegisterEffect(e3)
end
function c2978414.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(2978414)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
e:GetHandler():RegisterFlagEffect(2978414,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c2978414.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c2978414.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c2978414.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c2978414.spop(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,c2978414.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c2978414.ctfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged()
end
function c2978414.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2978414.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2978414.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c2978414.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c2978414.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function c2978414.efop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c2978414.actfilter)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e1,tp)
end
function c2978414.actfilter(e,c)
return c:IsRace(RACE_DRAGON)
end
--鏡鳴する武神
function c35183853.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c35183853.condition)
e1:SetOperation(c35183853.operation)
c:RegisterEffect(e1)
end
function c35183853.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR)
end
function c35183853.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(c35183853.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c35183853.operation(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_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c35183853.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c35183853.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
--マリスボラス・スプーン
function c35307484.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35307484,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c35307484.condition)
e1:SetCost(c35307484.cost)
e1:SetTarget(c35307484.target)
e1:SetOperation(c35307484.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c35307484.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x8b) and c:GetCode()~=35307484
end
function c35307484.condition(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c35307484.cfilter,1,nil)
end
function c35307484.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,35307484)==0 end
Duel.RegisterFlagEffect(tp,35307484,RESET_PHASE+PHASE_END,0,1)
end
function c35307484.spfilter(c,e,tp)
return c:GetLevel()==2 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c35307484.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c35307484.spfilter(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c35307484.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c35307484.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function c35307484.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
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_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--焔紫竜ピュラリス
function c37038993.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--synchro summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(37038993,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c37038993.atkcon)
e1:SetOperation(c37038993.atkop)
c:RegisterEffect(e1)
end
function c37038993.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c37038993.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--No.65 裁断魔人ジャッジ?バスター
function c3790062.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),2),2)
c:EnableReviveLimit()
--negate activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3790062,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c3790062.condition)
e1:SetCost(c3790062.cost)
e1:SetTarget(c3790062.target)
e1:SetOperation(c3790062.operation)
c:RegisterEffect(e1)
end
function c3790062.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c3790062.cost(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 c3790062.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)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c3790062.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
Duel.Damage(1-tp,500,REASON_EFFECT)
end
--No.64 古狸三太夫
function c39972129.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),2),2)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39972129,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c39972129.spcost)
e1:SetTarget(c39972129.sptg)
e1:SetOperation(c39972129.spop)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c39972129.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
end
function c39972129.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c39972129.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,39972130,0,0x4011,-2,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c39972129.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,39972130,0,0x4011,-2,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end
local token=Duel.CreateToken(tp,39972130)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local g,atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
function c39972129.ifilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
function c39972129.indcon(e)
return Duel.IsExistingMatchingCard(c39972129.ifilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
--羅刹
function c43378076.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)
--summon,flip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c43378076.retreg)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
--return
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(43378076,0))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCost(c43378076.sretcost)
e4:SetTarget(c43378076.srettg)
e4:SetOperation(c43378076.sretop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_FLIP)
c:RegisterEffect(e5)
end
function c43378076.cfilter(c)
return c:IsType(TYPE_SPIRIT) and c:GetCode()~=43378076 and not c:IsPublic()
end
function c43378076.sretcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp)
and Duel.IsExistingMatchingCard(c43378076.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c43378076.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c43378076.filter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c43378076.srettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c43378076.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43378076.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c43378076.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c43378076.sretop(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
function c43378076.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(aux.Stringid(43378076,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(c43378076.retcon)
e1:SetTarget(c43378076.rettg)
e1:SetOperation(c43378076.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
c:RegisterEffect(e2)
end
function c43378076.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN)
else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end
end
function c43378076.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c43378076.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--CNo.65 裁断魔王ジャッジ・デビル
function c49195710.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),3),3)
c:EnableReviveLimit()
--addown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49195710,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c49195710.cost)
e1:SetTarget(c49195710.target)
e1:SetOperation(c49195710.operation)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c49195710.accon)
c:RegisterEffect(e2)
end
function c49195710.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c49195710.filter(c)
return c:IsFaceup()
end
function c49195710.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c49195710.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49195710.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c49195710.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c49195710.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
tc:RegisterEffect(e2)
end
end
function c49195710.accon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062)
end
--ゴーストリック・アウト
function c50527144.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c50527144.cost)
e1:SetOperation(c50527144.activate)
c:RegisterEffect(e1)
end
function c50527144.cfilter(c)
return c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c50527144.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50527144.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c50527144.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c50527144.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c50527144.tgfilter)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
Duel.RegisterEffect(e2,tp)
end
function c50527144.tgfilter(e,c)
return c:IsFacedown() or c:IsSetCard(0x8d)
end
--武神-ミカヅチ
function c53678698.initial_effect(c)
c:SetUniqueOnField(1,0,53678698)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53678698,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c53678698.spcon)
e1:SetTarget(c53678698.sptg)
e1:SetOperation(c53678698.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53678698,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c53678698.thcon)
e2:SetTarget(c53678698.thtg)
e2:SetOperation(c53678698.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c53678698.regcon)
e3:SetOperation(c53678698.regop)
c:RegisterEffect(e3)
end
function c53678698.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_DESTROY)
end
function c53678698.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53678698.cfilter,1,nil,tp)
end
function c53678698.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)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53678698.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 c53678698.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(53678698)>0
end
function c53678698.filter(c)
return c:IsSetCard(0x88) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c53678698.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53678698.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:GetHandler():ResetNegateEffect(25789292,97268402)
end
function c53678698.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c53678698.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c53678698.rfilter(c,tp)
return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_HAND)
and c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER)
end
function c53678698.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53678698.rfilter,1,nil,tp)
end
function c53678698.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53678698,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
--ギミック・パペット-ナイトメア
function c55204071.initial_effect(c)
--special summon
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(c55204071.spcon)
e1:SetOperation(c55204071.spop)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55204071,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c55204071.spcon2)
e2:SetTarget(c55204071.sptg2)
e2:SetOperation(c55204071.spop2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(c55204071.spop3)
c:RegisterEffect(e2)
end
function c55204071.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c55204071.spcon(e,c)
if c==nil then return Duel.GetFlagEffect(tp,55204071)==0 end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(c:GetControler(),c55204071.cfilter,1,nil)
end
function c55204071.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c55204071.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.RegisterFlagEffect(tp,55204071,RESET_PHASE+PHASE_END,0,1)
end
function c55204071.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c55204071.spfilter(c,e,tp)
return c:IsSetCard(0x83) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c55204071.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c55204071.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c55204071.spop2(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,c55204071.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c55204071.spop3(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c55204071.splimit)
Duel.RegisterEffect(e1,tp)
end
function c55204071.splimit(e,c)
return not c:IsSetCard(0x83)
end
\ No newline at end of file
--魂食神龍ドレイン・ドラゴン
function c55735315.initial_effect(c)
c:SetStatus(STATUS_UNSUMMONABLE_CARD,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c55735315.splimit)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55735315,0))
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c55735315.atkcon)
e2:SetOperation(c55735315.atkop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e3)
end
function c55735315.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc:IsType(TYPE_XYZ) and sc:IsRace(RACE_DRAGON)
end
function c55735315.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c55735315.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and Duel.GetLP(tp)<Duel.GetLP(1-tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(Duel.GetLP(1-tp)-Duel.GetLP(tp))
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
--ギミック・パペット-ギア・チェンジャー
function c56427559.initial_effect(c)
--lvchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56427559,0))
e1:SetCategory(CATEGORY_LVCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c56427559.lvtg)
e1:SetOperation(c56427559.lvop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_DECK)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
end
function c56427559.lvfilter(c,lv)
return c:IsFaceup() and c:IsSetCard(0x83) and c:GetLevel()~=lv
end
function c56427559.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c56427559.lvfilter(chkc,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.IsExistingTarget(c56427559.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c56427559.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel())
end
function c56427559.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
--BK ラビット・パンチャー
function c61679541.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61679541,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(c61679541.targ)
e1:SetOperation(c61679541.op)
c:RegisterEffect(e1)
end
function c61679541.targ(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsDefencePos() and d:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end
function c61679541.op(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then
Duel.Destroy(d,REASON_EFFECT)
end
end
--マリスボラス・フォーク
function c61791132.initial_effect(c)
--special summon
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(c61791132.spcon)
e1:SetOperation(c61791132.spop)
c:RegisterEffect(e1)
end
function c61791132.spfilter(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost()
end
function c61791132.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c61791132.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c61791132.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c61791132.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
--鬼岩城
function c63422098.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
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(0)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c63422098.regcon)
e2:SetOperation(c63422098.regop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c63422098.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c63422098.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
e:GetLabelObject():SetValue(ct*300-300)
end
--メリアスの木霊
function c64245689.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),3),2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64245689,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c64245689.cost)
e1:SetTarget(c64245689.tgtg)
e1:SetOperation(c64245689.tgop)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64245689,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c64245689.cost)
e2:SetTarget(c64245689.sptg)
e2:SetOperation(c64245689.spop)
c:RegisterEffect(e2)
end
function c64245689.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(64245689)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
e:GetHandler():RegisterFlagEffect(64245689,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c64245689.tgfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToGrave()
end
function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c64245689.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c64245689.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c64245689.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64245689.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c64245689.ctfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64245689.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64245689.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
--先史遺産マッドゴーレム・シャコウキ
function c67559101.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c67559101.target)
c:RegisterEffect(e1)
end
function c67559101.target(e,c)
return c:IsSetCard(0x70)
end
......@@ -37,13 +37,20 @@ function c73625877.rmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabelObject(tc)
e1:SetCondition(c73625877.retcon)
e1:SetOperation(c73625877.retop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e:GetLabel(0)
else
e:GetLabel(Duel.GetTurnCount())
end
Duel.RegisterEffect(e1,tp)
end
end
function c73625877.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel()
end
function c73625877.retop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then
Duel.ReturnToField(e:GetLabelObject())
end
Duel.ReturnToField(e:GetLabelObject())
e:Reset()
end
--ゴーストリック・スペクター
function c81907872.initial_effect(c)
--summon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c81907872.sumcon)
c:RegisterEffect(e1)
--turn set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(81907872,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c81907872.postg)
e2:SetOperation(c81907872.posop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(81907872,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(c81907872.spcon)
e3:SetTarget(c81907872.sptg)
e3:SetOperation(c81907872.spop)
c:RegisterEffect(e3)
end
function c81907872.sfilter(c)
return c:IsFaceup() and c:IsSetCard(0x8d)
end
function c81907872.sumcon(e)
return not Duel.IsExistingMatchingCard(c81907872.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c81907872.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(81907872)==0 end
c:RegisterFlagEffect(81907872,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c81907872.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE)
end
end
function c81907872.cfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x8d) and c:IsReason(REASON_DESTROY)
and (not c:IsReason(REASON_BATTLE) or c==Duel.GetAttackTarget())
end
function c81907872.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c81907872.cfilter,1,nil,tp)
end
function c81907872.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,POS_FACEDOWN)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c81907872.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_FACEDOWN_DEFENCE) then
Duel.ConfirmCards(1-tp,c)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--ゴーストリック・パニック
function c86516889.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86516889.target)
e1:SetOperation(c86516889.activate)
c:RegisterEffect(e1)
end
function c86516889.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:GetLocation(LOCATION_MZONE) and chkc:IsFacedown() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c86516889.filter(c,e)
return c:IsFacedown() and c:IsRelateToEffect(e)
end
function c86516889.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c86516889.filter,nil,e)
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
local ct=g:FilterCount(Card.IsSetCard,nil,0x8d)
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENCE)
end
end
end
--H・C アンブッシュ・ソルジャー
function c92609670.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92609670,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c92609670.spcost)
e1:SetTarget(c92609670.sptg)
e1:SetOperation(c92609670.spop)
c:RegisterEffect(e1)
--lvchange
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(92609670,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(92609670)
e2:SetCost(c92609670.lvcost)
e2:SetTarget(c92609670.lvtg)
e2:SetOperation(c92609670.lvop)
c:RegisterEffect(e2)
end
function c92609670.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,92609670)==0 and e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
Duel.RegisterFlagEffect(tp,92609670,RESET_PHASE+PHASE_END,0,1)
end
function c92609670.filter(c,e,tp)
return c:GetCode()~=92609670 and c:IsSetCard(0x106f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c92609670.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c92609670.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c92609670.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<1 then return end
if ft>2 then ft=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c92609670.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RaiseSingleEvent(e:GetHandler(),92609670,e,0,tp,tp,0)
end
end
function c92609670.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c92609670.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x106f) and c:GetLevel()>1
end
function c92609670.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c92609670.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c92609670.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c92609670.lvfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--ギミック・パペット-ナイト・ジョーカー
function c92821268.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92821268,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCost(c92821268.cost)
e1:SetTarget(c92821268.target)
e1:SetOperation(c92821268.operation)
c:RegisterEffect(e1)
end
function c92821268.cfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x83)
and c:GetPreviousControler()==tp and c:IsAbleToRemoveAsCost()
end
function c92821268.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,92821268)==0 and eg:IsExists(c92821268.cfilter,1,nil,tp) end
local g=eg:Filter(c92821268.cfilter,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,92821268,RESET_PHASE+PHASE_END,0,1)
end
function c92821268.target(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 c92821268.operation(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
--ʷzb?Υꥹ
function c93543806.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(93543806,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c93543806.lvcost)
e1:SetTarget(c93543806.lvtg)
e1:SetOperation(c93543806.lvop)
c:RegisterEffect(e1)
if not c93543806.global_check then
c93543806.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c93543806.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c93543806.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c93543806.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if not tc:IsSetCard(0x70) then
c93543806[tc:GetSummonPlayer()]=false
end
tc=eg:GetNext()
end
end
function c93543806.clear(e,tp,eg,ep,ev,re,r,rp)
c93543806[0]=true
c93543806[1]=true
end
function c93543806.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c93543806[tp] 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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c93543806.splimit)
Duel.RegisterEffect(e1,tp)
end
function c93543806.splimit(e,c)
return not c:IsSetCard(0x70)
end
function c93543806.filter(c)
return c:IsFaceup() and c:IsSetCard(0x70) and c:GetLevel()~=6
end
function c93543806.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c93543806.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c93543806.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c93543806.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c93543806.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(6)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
--先史遺産アステカ・マスク・ゴーレム
function c94766498.initial_effect(c)
c:SetUniqueOnField(1,0,94766498)
--special summon
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(c94766498.hspcon)
c:RegisterEffect(e1)
if not c94766498.global_check then
c94766498.global_check=true
c94766498[0]=0
c94766498[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c94766498.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(c94766498.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge3:SetOperation(c94766498.clear)
Duel.RegisterEffect(ge3,0)
end
end
function c94766498.checkop1(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x70) then
c94766498[rp]=c94766498[rp]+1
end
end
function c94766498.checkop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x70) then
c94766498[rp]=c94766498[rp]-1
end
end
function c94766498.clear(e,tp,eg,ep,ev,re,r,rp)
c94766498[0]=0
c94766498[1]=0
end
function c94766498.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return c94766498[tp]>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
--マリスボラス・ナイフ
function c98780137.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98780137,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c98780137.target)
e1:SetOperation(c98780137.operation)
c:RegisterEffect(e1)
end
function c98780137.filter(c,e,tp)
return c:GetCode()~=98780137 and c:IsSetCard(0x8b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98780137.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98780137.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98780137.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98780137.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function c98780137.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,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