Commit f28ef9cb authored by mercury233's avatar mercury233

rm

parent 573239a7
......@@ -26,7 +26,6 @@
100200166
100200167
100200168
100252001
100413001
100413002
100413003
......@@ -72,7 +71,6 @@
101010044
101010045
101010039
100200165
101010036
101010035
101010050
......
--ストライカー・ドラゴン
--Scripted by nekrozar
function c100200165.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100200165.mfilter,1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200165,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100200165)
e1:SetCondition(c100200165.thcon1)
e1:SetTarget(c100200165.thtg1)
e1:SetOperation(c100200165.thop1)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200165,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100200465)
e2:SetTarget(c100200165.thtg2)
e2:SetOperation(c100200165.thop2)
c:RegisterEffect(e2)
end
function c100200165.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_DRAGON)
end
function c100200165.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100200165.thfilter1(c)
return c:IsCode(36668118) and c:IsAbleToHand()
end
function c100200165.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200165.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100200165.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200165.thfilter1,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 c100200165.thfilter2(c)
return c:IsSetCard(0x102) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100200165.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c100200165.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectTarget(tp,c100200165.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end
function c100200165.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc1,tc2=Duel.GetFirstTarget()
if tc1~=e:GetLabelObject() then tc1,tc2=tc2,tc1 end
if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)>0 and tc2:IsRelateToEffect(e) then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
end
end
--GO-DDD神零王ゼロゴッド・レイジ
--
--Script by DJ
function c100252001.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--avoid damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0)
e1:SetCondition(c100252001.damcon)
e1:SetValue(c100252001.damval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100252001,3))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c100252001.effcost)
e3:SetCondition(c100252001.effcon)
e3:SetOperation(c100252001.effop)
c:RegisterEffect(e3)
--attack
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetCondition(c100252001.atkcon)
e4:SetOperation(c100252001.atkop)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e6:SetValue(1)
c:RegisterEffect(e6)
--reduce tribute
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(100252001,4))
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetTargetRange(LOCATION_HAND,0)
e7:SetCode(EFFECT_SUMMON_PROC)
e7:SetRange(LOCATION_PZONE)
e7:SetCountLimit(1,100252001)
e7:SetCondition(c100252001.ntcon)
e7:SetTarget(c100252001.nttg)
c:RegisterEffect(e7)
end
function c100252001.damcon(e)
return Duel.GetFlagEffect(tp,100252001)==0
end
function c100252001.damval(e,re,val,r,rp,rc)
local c=e:GetHandler()
if bit.band(r,REASON_EFFECT)~=0 and c:GetFlagEffect(100252001)==0 then
Duel.RegisterFlagEffect(tp,100252001,RESET_PHASE+PHASE_END,0,1)
return 0
end
return val
end
function c100252001.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c100252001.nttg(e,c)
return c:IsLevelAbove(5) and c:IsSetCard(0xaf)
end
function c100252001.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c100252001.effcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not (c:IsHasEffect(EFFECT_DIRECT_ATTACK) and Duel.GetFlagEffect(tp,100252001+100)>0 and Duel.GetFlagEffect(tp,100252001+200)>0)
end
function c100252001.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local off=1
local ops={}
local opval={}
if not c:IsHasEffect(EFFECT_DIRECT_ATTACK) and Duel.IsAbleToEnterBP() then
ops[off]=aux.Stringid(100252001,0)
opval[off-1]=1
off=off+1
end
if Duel.GetFlagEffect(tp,100252001+100)==0 then
ops[off]=aux.Stringid(100252001,1)
opval[off-1]=2
off=off+1
end
if Duel.GetFlagEffect(tp,100252001+200)==0 then
ops[off]=aux.Stringid(100252001,2)
opval[off-1]=3
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
elseif opval[op]==2 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(c100252001.aclimit1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,100252001+100,RESET_PHASE+PHASE_END,0,1)
elseif opval[op]==3 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(0,1)
e3:SetValue(c100252001.aclimit2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,100252001+200,RESET_PHASE+PHASE_END,0,1)
end
end
function c100252001.aclimit1(e,re,tp)
return re:GetActivateLocation()==LOCATION_SZONE
end
function c100252001.aclimit2(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE or re:GetActivateLocation()==LOCATION_HAND
end
function c100252001.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(1-tp)<=4000
end
function c100252001.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lp=Duel.GetLP(1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(lp)
c:RegisterEffect(e1)
end
--シルバーヴァレット・ドラゴン
--
--Scripted by 龙骑
function c100336001.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100336001)
e1:SetCondition(c100336001.descon)
e1:SetTarget(c100336001.destg)
e1:SetOperation(c100336001.desop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(c100336001.regop)
c:RegisterEffect(e2)
end
function c100336001.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(c) then return false end
return re:IsActiveType(TYPE_LINK)
end
function c100336001.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil)
if chk==0 then return c:IsDestructable() and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c100336001.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if e:GetHandler():IsRelateToEffect(e) and Duel.Destroy(e:GetHandler(),REASON_EFFECT)>0 and g:GetCount()>0 then
Duel.BreakEffect()
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c100336001.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336001,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1,100336001+100)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c100336001.sptg)
e1:SetOperation(c100336001.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c100336001.spfilter(c,e,tp)
return c:IsSetCard(0x102) and not c:IsCode(100336001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100336001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100336001.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,c100336001.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ヴァレット・トレーサー
--
--Script by mercury233
function c100336002.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100336002)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c100336002.sptg)
e1:SetOperation(c100336002.spop)
c:RegisterEffect(e1)
end
function c100336002.tgfilter(c,tp)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
end
function c100336002.spfilter(c,e,tp)
return not c:IsCode(100336002) and c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336002.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c100336002.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100336002.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c100336002.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100336002.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100336002.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100336002.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100336002.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100336002.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK) and c:IsLocation(LOCATION_EXTRA)
end
--ヴァレット・リチャージャー
--
--Script by mercury233
function c100336003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100336003)
e1:SetCondition(c100336003.spcon)
e1:SetCost(c100336003.spcost)
e1:SetTarget(c100336003.sptg)
e1:SetOperation(c100336003.spop)
c:RegisterEffect(e1)
--cannot be attacked
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100336003.atcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
end
function c100336003.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsAttribute(ATTRIBUTE_DARK)
and c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c100336003.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100336003.spcfilter,1,nil,tp)
end
function c100336003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c100336003.tgfilter(c,e,tp)
return c100336003.spcfilter(c,tp) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c100336003.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c)
end
function c100336003.spfilter(c,e,tp,tc)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c100336003.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c100336003.tgfilter,nil,e,tp)
if chkc then return g:IsContains(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 end
local c=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
c=g:Select(tp,1,1,nil):GetFirst()
else
c=g:GetFirst()
end
Duel.SetTargetCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100336003.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100336003.spfilter,tp,LOCATION_GRAVE,0,1,1,tc,e,tp,tc)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100336003.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:GetSummonLocation()==LOCATION_EXTRA
end
function c100336003.atcon(e)
return Duel.IsExistingMatchingCard(c100336003.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--エクスプロードヴァレット・ドラゴン
--Scripted by nekrozar
function c100336004.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336004,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100336004)
e1:SetCondition(c100336004.descon)
e1:SetTarget(c100336004.destg)
e1:SetOperation(c100336004.desop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(c100336004.regop)
c:RegisterEffect(e2)
end
function c100336004.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(c) then return false end
return re:IsActiveType(TYPE_LINK)
end
function c100336004.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,2000)
end
function c100336004.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.Damage(tp,2000,REASON_EFFECT,true)
Duel.Damage(1-tp,2000,REASON_EFFECT,true)
Duel.RDComplete()
end
end
function c100336004.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336004,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1,100336104)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c100336004.sptg)
e1:SetOperation(c100336004.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c100336004.spfilter(c,e,tp)
return c:IsSetCard(0x102) and not c:IsCode(100336004) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100336004.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100336004.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,c100336004.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--アブソルーター・ドラゴン
--Scripted by nekrozar
function c100336005.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100336005)
e1:SetCondition(c100336005.sprcon)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100336005,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100336105)
e2:SetTarget(c100336005.thtg)
e2:SetOperation(c100336005.thop)
c:RegisterEffect(e2)
end
function c100336005.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0x102)
end
function c100336005.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100336005.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100336005.thfilter(c)
return c:IsSetCard(0x102) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100336005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100336005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100336005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100336005.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--チェックサム・ドラゴン
--Scripted by nekrozar
function c100336006.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c100336006.spcon)
e1:SetTarget(c100336006.sptg)
e1:SetOperation(c100336006.spop)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetCondition(c100336006.indcon)
c:RegisterEffect(e2)
end
function c100336006.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c100336006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
local rec=math.ceil(e:GetHandler():GetDefense()/2)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c100336006.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local rec=math.ceil(c:GetDefense()/2)
Duel.BreakEffect()
Duel.Recover(p,rec,REASON_EFFECT)
end
end
function c100336006.indcon(e)
return e:GetHandler():IsAttackPos()
end
--ヴァレル・サプライヤー
--Scripted by nekrozar
function c100336023.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100336023,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100336023)
e2:SetCondition(c100336023.spcon)
e2:SetTarget(c100336023.sptg)
e2:SetOperation(c100336023.spop)
c:RegisterEffect(e2)
end
function c100336023.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10f) and c:IsType(TYPE_LINK)
end
function c100336023.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100336023.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100336023.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100336023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100336023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100336023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100336023.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(100336023,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c100336023.descon)
e1:SetOperation(c100336023.desop)
Duel.RegisterEffect(e1,tp)
end
Duel.SpecialSummonComplete()
end
function c100336023.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(100336023)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c100336023.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
--ラピッド・トリガー
--
--Scripted by 龙骑
function c100336024.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100336024+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100336024.target)
e1:SetOperation(c100336024.activate)
c:RegisterEffect(e1)
end
function c100336024.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) and c:IsDestructable(e)
end
function c100336024.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c100336024.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local res=Duel.IsExistingMatchingCard(c100336024.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c100336024.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function c100336024.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100336024.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c100336024.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c100336024.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local res=false
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
if Duel.Destroy(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)==#mat1 then
tc:SetMaterial(mat1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
res=true
end
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
res=true
end
if res then
tc:CompleteProcedure()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetValue(c100336024.bttg)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c100336024.immval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
end
function c100336024.bttg(e,c)
return not c:GetSummonLocation()==LOCATION_EXTRA
end
function c100336024.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated()
and te:GetOwner():GetSummonLocation()==LOCATION_EXTRA
end
--ゼロ・デイ・ブラスター
--Scripted by nekrozar
function c100336033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100336033.cost)
e1:SetTarget(c100336033.target)
e1:SetOperation(c100336033.activate)
c:RegisterEffect(e1)
end
function c100336033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c100336033.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c100336033.costfilter(c,ec,tp)
local lk=c:GetLink()
if not c:IsType(TYPE_LINK) or not c:IsAttribute(ATTRIBUTE_DARK) or lk<=0 then return false end
return Duel.IsExistingTarget(c100336033.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,lk,c,c,ec)
end
function c100336033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c100336033.costfilter,1,c,c,tp)
else return false end
end
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c100336033.costfilter,1,1,c,c,tp)
local lk=sg:GetFirst():GetLink()
Duel.Release(sg,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,lk,lk,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c100336033.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
--ガンスリンガー・エクスキューション
--Scripted by nekrozar
function c100336034.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100336034,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,100336034)
e2:SetCondition(c100336034.atkcon)
e2:SetCost(c100336034.atkcost)
e2:SetTarget(c100336034.atktg)
e2:SetOperation(c100336034.atkop)
c:RegisterEffect(e2)
end
function c100336034.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c100336034.costfilter(c)
return c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(1) and c:IsAbleToRemoveAsCost()
end
function c100336034.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100336034.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100336034.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local atk=g:GetFirst():GetAttack()
e:SetLabel(atk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100336034.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10f)
end
function c100336034.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100336034.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100336034.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100336034.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100336034.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--トポロジック・ゼロヴォロス
--
--Scripted by 龙骑
--not fully implemented
function c100336041.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--zone limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(c100336041.zonelimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c100336041.value)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100336041,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100336041.rmcon)
e3:SetTarget(c100336041.rmtg)
e3:SetOperation(c100336041.rmop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_REMOVE)
e4:SetOperation(c100336041.spreg)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100336041,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_STANDBY)
e5:SetRange(LOCATION_REMOVED)
e5:SetCondition(c100336041.spcon)
e5:SetTarget(c100336041.sptg)
e5:SetOperation(c100336041.spop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c100336041.zonelimit(e)
return 0x1f001f | (0x600060 & ~e:GetHandler():GetLinkedZone())
end
function c100336041.value(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED)*200
end
function c100336041.cfilter(c,zone)
local seq=c:GetSequence()
if c:IsLocation(LOCATION_MZONE) then
if c:IsControler(1) then seq=seq+16 end
else
seq=c:GetPreviousSequence()
if c:GetPreviousControler()==1 then seq=seq+16 end
end
return bit.extract(zone,seq)~=0
end
function c100336041.rmcon(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.GetLinkedZone(0)+(Duel.GetLinkedZone(1)<<0x10)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c100336041.cfilter,1,nil,zone)
end
function c100336041.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c100336041.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c100336041.spreg(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsReason(REASON_EFFECT) and rc==c then
e:SetLabel(Duel.GetTurnCount()+1)
c:RegisterFlagEffect(100336041,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
end
function c100336041.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(100336041)>0
end
function c100336041.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)
e:GetHandler():ResetFlagEffect(100336041)
end
function c100336041.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
--ヴァレルロード・F・ドラゴン
--
--Scripted by FW空鸽
function c100336051.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c100336051.ffilter,2,false)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336051,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100336051)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c100336051.destg)
e1:SetOperation(c100336051.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100336051,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100336051+100)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100336051.sptg)
e2:SetOperation(c100336051.spop)
c:RegisterEffect(e2)
end
function c100336051.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON)
end
function c100336051.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c100336051.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function c100336051.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336051.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100336051.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100336051.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100336051.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100336051.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
--ソーンヴァレル・ドラゴン
--
--Scripted by 龙骑
function c100336052.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),2,2,c100336052.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetCost(c100336052.cost)
e1:SetTarget(c100336052.target)
e1:SetOperation(c100336052.operation)
c:RegisterEffect(e1)
end
function c100336052.lcheck(g,lc)
return g:IsExists(Card.IsSetCard,1,nil,0x102)
end
function c100336052.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100336052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100336052.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336052.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_LINK) then
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),tc:GetLink())
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100336052.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(100336052,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c100336052.splimit)
Duel.RegisterEffect(e1,tp)
end
function c100336052.splimit(e,c,tp,sumtp,sumpos)
return c:IsType(TYPE_LINK) and c:IsLinkBelow(2) and c:IsLocation(LOCATION_EXTRA)
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