Commit ba3cd2df authored by mercury233's avatar mercury233

update new cards

parent 00334a83
#created by ...
#main
101011000
100254001
100254004
100254006
100254008
100254009
100309001
100413027
100413028
100413029
100413030
100413031
100413032
100413034
100413035
100413036
100413037
100413038
100413039
100200166
100200167
100200168
......@@ -15,8 +34,25 @@
100413013
100251001
#extra
101011044
100253001
100254002
100254003
100413033
100200169
100413007
100413008
100413009
!side
101009000
101009081
101009082
101009083
101009084
101009085
101009086
101009087
101009088
101009089
101009090
101009091
......@@ -6,3 +6,7 @@
!setname 0x130 破械
!setname 0x1130 破械神
!setname 0x231 斩机
!setname 0x232 王战
!setname 0x233 龙人女仆
!setname 0x234 梦镜
!setname 0x235 @火灵天星
--バイナル・ブレーダー
--Scripted by nekrozar
function c100253001.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_NORMAL),2,2)
c:EnableReviveLimit()
--battle
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100253001,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c100253001.atkcon)
e1:SetOperation(c100253001.atkop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100253001,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED)
e2:SetCondition(c100253001.rmcon)
e2:SetTarget(c100253001.rmtg)
e2:SetOperation(c100253001.rmop)
c:RegisterEffect(e2)
end
function c100253001.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()~=nil and e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c100253001.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c100253001.indtg)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c100253001.indtg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c100253001.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return c:GetMutualLinkedGroupCount()>0 and bc and bc:IsStatus(STATUS_OPPO_BATTLE) and bc:IsRelateToBattle()
end
function c100253001.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function c100253001.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
--コード・エクスポーター
--Scripted by nekrozar
function c100254001.initial_effect(c)
--hand link
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100254001)
e1:SetValue(c100254001.matval)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100254001,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,100254101)
e2:SetCondition(c100254001.thcon)
e2:SetTarget(c100254001.thtg)
e2:SetOperation(c100254001.thop)
c:RegisterEffect(e2)
end
function c100254001.mfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_CYBERSE)
end
function c100254001.exmfilter(c)
return c:IsLocation(LOCATION_HAND) and c:IsCode(100254001)
end
function c100254001.matval(e,c,mg)
return c:IsSetCard(0x101) and mg:IsExists(c100254001.mfilter,1,nil) and not mg:IsExists(c100254001.exmfilter,1,nil)
end
function c100254001.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end
return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101)
end
function c100254001.thfilter(c,e,tp,chk)
return c:IsRace(RACE_CYBERSE) and c:IsLevelBelow(4)
and (c:IsAbleToHand() or (chk==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c100254001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=e:GetLabel()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100254001.thfilter(chkc,e,tp,check) end
if chk==0 then return Duel.IsExistingTarget(c100254001.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100254001.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,check)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100254001.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if tc:IsAbleToHand()
and (e:GetLabel()==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
--ブルートエンフォーサー
--Scripted by nekrozar
function c100254002.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100254002,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100254002)
e1:SetCost(c100254002.descost)
e1:SetTarget(c100254002.destg)
e1:SetOperation(c100254002.desop)
c:RegisterEffect(e1)
end
function c100254002.descost(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 c100254002.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100254002.cfilter(c,typ)
return c:IsType(typ) and c:IsDiscardable(REASON_EFFECT)
end
function c100254002.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() then return end
if Duel.IsChainDisablable(0) then
local typ=bit.band(tc:GetOriginalType(),0x7)
if Duel.IsExistingMatchingCard(c100254002.cfilter,tp,0,LOCATION_HAND,1,nil,typ) and Duel.SelectYesNo(1-tp,aux.Stringid(100254002,1)) then
Duel.DiscardHand(1-tp,c100254002.cfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil,typ)
Duel.NegateEffect(0)
return
end
end
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--転生炎獣ブレイズ・ドラゴン
--Scripted by nekrozar
function c100254003.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c100254003.reptg)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100254003,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100254003)
e2:SetCondition(c100254003.spcon)
e2:SetTarget(c100254003.sptg)
e2:SetOperation(c100254003.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100254003,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c100254003.descon)
e3:SetTarget(c100254003.destg)
e3:SetOperation(c100254003.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c100254003.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c100254003.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
end
function c100254003.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c100254003.spfilter(c,e,tp,mc)
return c:IsSetCard(0x119) and mc:IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c100254003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c100254003.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100254003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100254003.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
function c100254003.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c100254003.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100254003.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c100254003.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsCode,1,nil,100254003) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--ベイオネット・パニッシャー
--Scripted by nekrozar
function c100254004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100254004.target)
e1:SetOperation(c100254004.activate)
c:RegisterEffect(e1)
end
function c100254004.cfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x10f)
end
function c100254004.rmfilter1(c)
return c:IsFacedown() and c:IsLocation(LOCATION_EXTRA)
end
function c100254004.rmfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_ONFIELD)
end
function c100254004.lmfilter(c)
return c:IsFaceup() and c:IsAttackAbove(3000)
end
function c100254004.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(c100254004.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE,nil)
if chk==0 then return (g1:IsExists(Card.IsType,1,nil,TYPE_FUSION) and g2:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE))
or (g1:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and g2:IsExists(c100254004.rmfilter1,3,nil))
or (g1:IsExists(Card.IsType,1,nil,TYPE_XYZ) and g2:IsExists(c100254004.rmfilter2,1,nil))
or (g1:IsExists(Card.IsType,1,nil,TYPE_LINK) and g2:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)) end
if Duel.IsExistingMatchingCard(c100254004.lmfilter,tp,LOCATION_MZONE,0,1,nil) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c100254004.chainlm)
end
end
function c100254004.chainlm(e,rp,tp)
return tp==rp
end
function c100254004.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.IsExistingMatchingCard(c100254004.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE,nil)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
local res=0
if g1:IsExists(Card.IsType,1,nil,TYPE_FUSION) and g2:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g2:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE)
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
if g1:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and g2:IsExists(c100254004.rmfilter1,3,nil) then
if res~=0 then Duel.BreakEffect() end
local rg=g2:Filter(c100254004.rmfilter1,nil):RandomSelect(tp,3)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
if g1:IsExists(Card.IsType,1,nil,TYPE_XYZ) and g2:IsExists(c100254004.rmfilter2,1,nil) then
if res~=0 then Duel.BreakEffect() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g2:FilterSelect(tp,c100254004.rmfilter2,1,1,nil)
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
if g1:IsExists(Card.IsType,1,nil,TYPE_LINK) and g2:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
if res~=0 then Duel.BreakEffect() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g2:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_GRAVE)
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
--海晶乙女パスカルス
--Scripted by nekrozar
function c100254006.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100254006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100254006)
e1:SetTarget(c100254006.sptg)
e1:SetOperation(c100254006.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100254006,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100254006)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100254006.thtg)
e3:SetOperation(c100254006.thop)
c:RegisterEffect(e3)
end
function c100254006.spfilter(c,e,tp)
return c:IsSetCard(0x12b) and not c:IsCode(100254006) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100254006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100254006.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100254006.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,c100254006.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_DEFENSE)
end
end
function c100254006.thfilter(c)
return c:IsSetCard(0x12b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100254006.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100254006.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100254006.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100254006.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100254006.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--ダイナレスラー・イグアノドラッカ
--Scripted by nekrozar
function c100254008.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100254008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100254008)
e1:SetCost(c100254008.spcost1)
e1:SetTarget(c100254008.sptg1)
e1:SetOperation(c100254008.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100254008,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100254108)
e2:SetCost(c100254008.spcost2)
e2:SetTarget(c100254008.sptg2)
e2:SetOperation(c100254008.spop2)
c:RegisterEffect(e2)
end
function c100254008.costfilter1(c)
return c:IsRace(RACE_DINOSAUR) and c:IsDiscardable()
end
function c100254008.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100254008.costfilter1,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c100254008.costfilter1,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c100254008.sptg1(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 c100254008.spop1(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 c100254008.costfilter2(c,e,tp)
return c:IsRace(RACE_DINOSAUR) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingTarget(c100254008.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function c100254008.spfilter(c,e,tp,mc)
return c:IsSetCard(0x11a) and not c:IsOriginalCodeRule(mc:GetOriginalCodeRule()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100254008.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100254008.costfilter2,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,c100254008.costfilter2,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
end
function c100254008.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mc=e:GetLabelObject()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100254008.spfilter(chkc,e,tp,mc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100254008.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100254008.spop2(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_DEFENSE)
end
end
--オルターガイスト・フェイルオーバー
--Scripted by nekrozar
function c100254009.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(100254009,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100254009)
e2:SetCondition(c100254009.spcon)
e2:SetTarget(c100254009.sptg)
e2:SetOperation(c100254009.spop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100254009,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100254109)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100254009.thtg)
e3:SetOperation(c100254009.thop)
c:RegisterEffect(e3)
end
function c100254009.cfilter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
function c100254009.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(c100254009.cfilter,1,nil,tp)
end
function c100254009.spfilter(c,e,tp)
return c:IsSetCard(0x103) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100254009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100254009.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100254009.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100254009.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 c100254009.thfilter(c)
return c:IsSetCard(0x103) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100254009.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100254009.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100254009.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100254009.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100254009.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--ゴッドフェニックス・ギア・フリード
--Scripted by nekrozar
function c100309001.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100309001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100309001)
e1:SetCost(c100309001.spcost)
e1:SetTarget(c100309001.sptg)
e1:SetOperation(c100309001.spop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100309001,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCountLimit(1,100309101)
e2:SetCondition(c100309001.eqcon)
e2:SetTarget(c100309001.eqtg)
e2:SetOperation(c100309001.eqop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100309001,2))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100309201)
e3:SetCondition(c100309001.negcon)
e3:SetCost(c100309001.negcost)
e3:SetTarget(c100309001.negtg)
e3:SetOperation(c100309001.negop)
c:RegisterEffect(e3)
end
function c100309001.costfilter2(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:GetType()==TYPE_EQUIP+TYPE_SPELL and c:IsAbleToRemoveAsCost()
end
function c100309001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100309001.costfilter2,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100309001.costfilter2,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100309001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100309001.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 c100309001.eqcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
return Duel.GetAttacker()==e:GetHandler() and (ec==nil or ec:GetFlagEffect(100309001)==0)
end
function c100309001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end
function c100309001.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e))
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
tc:RegisterFlagEffect(100309001,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(c100309001.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c100309001.eqlimit(e,c)
return e:GetOwner()==c
end
function c100309001.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c100309001.costfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c100309001.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100309001.costfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100309001.costfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c100309001.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c100309001.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
......@@ -40,7 +40,7 @@ function c100413006.fselect(g)
end
function c100413006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413006.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_GRAVE)
end
function c100413006.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
......
--光の王 マルデル
--Scripted by nekrozar
function c100413027.initial_effect(c)
c:SetUniqueOnField(1,0,100413027)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413027,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100413027)
e1:SetTarget(c100413027.thtg)
e1:SetOperation(c100413027.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c100413027.thfilter(c)
return (c:IsSetCard(0x232) or c:IsRace(RACE_PLANT)) and not c:IsCode(100413027) and c:IsAbleToHand()
end
function c100413027.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413027.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100413027.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100413027.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 c100413028.initial_effect(c)
c:SetUniqueOnField(1,0,100413028)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413028,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413028)
e1:SetCost(c100413028.descost)
e1:SetTarget(c100413028.destg)
e1:SetOperation(c100413028.desop)
c:RegisterEffect(e1)
end
function c100413028.costfilter(c,tp)
return (c:IsSetCard(0x232) or c:IsRace(RACE_WARRIOR))
and Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c100413028.fselect(g,tp)
if Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,g:GetCount(),g) then
Duel.SetSelectedCard(g)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function c100413028.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100413028.costfilter,1,nil,tp) end
local rg=Duel.GetReleaseGroup(tp):Filter(c100413028.costfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,c100413028.fselect,false,1,99,tp)
local ct=Duel.Release(sg,REASON_COST)
e:SetLabel(ct)
end
function c100413028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return true end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c100413028.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(tg,REASON_EFFECT)==0 then return end
local ct=Duel.GetOperatedGroup():FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,1-tp),nil)
if ct>0 and Duel.IsPlayerCanDraw(1-tp,ct) and Duel.SelectYesNo(1-tp,aux.Stringid(100413028,1)) then
Duel.BreakEffect()
Duel.Draw(1-tp,ct,REASON_EFFECT)
end
end
--鉄の王 ドヴェルグス
--Scripted by nekrozar
function c100413029.initial_effect(c)
c:SetUniqueOnField(1,0,100413029)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413029)
e1:SetCost(c100413029.spcost)
e1:SetTarget(c100413029.sptg)
e1:SetOperation(c100413029.spop)
c:RegisterEffect(e1)
end
function c100413029.spfilter(c,e,tp,g)
return (c:IsSetCard(0x232) or c:IsRace(RACE_MACHINE)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and not g:IsExists(Card.IsCode,1,nil,c:GetCode())
end
function c100413029.costfilter1(c,e,tp)
return (c:IsSetCard(0x232) or c:IsRace(RACE_MACHINE)) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100413029.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c))
end
function c100413029.costfilter2(c,e,tp)
return (c:IsSetCard(0x232) or c:IsRace(RACE_MACHINE))
and Duel.IsExistingMatchingCard(c100413029.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c))
end
function c100413029.fselect(g,e,tp)
local sg=Duel.GetMatchingGroup(c100413029.spfilter,tp,LOCATION_HAND,0,nil,e,tp,g)
if sg:CheckSubGroup(aux.dncheck,g:GetCount(),g:GetCount()) and Duel.GetMZoneCount(tp,g)>=g:GetCount() then
Duel.SetSelectedCard(g)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function c100413029.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100413029.costfilter1,1,nil,e,tp) end
local rg=Duel.GetReleaseGroup(tp):Filter(c100413029.costfilter2,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,c100413029.fselect,false,1,99,e,tp)
sg:KeepAlive()
e:SetLabelObject(sg)
Duel.Release(sg,REASON_COST)
end
function c100413029.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=e:GetLabelObject()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,g:GetCount(),tp,LOCATION_HAND)
end
function c100413029.spop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<g:GetCount() then return end
local sg=Duel.GetMatchingGroup(c100413029.spfilter,tp,LOCATION_HAND,0,nil,e,tp,g)
if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectSubGroup(tp,aux.dncheck,false,g:GetCount(),g:GetCount())
if tg and tg:GetCount()>0 then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--炎の王 ナグルファー
--Scripted by nekrozar
function c100413030.initial_effect(c)
c:SetUniqueOnField(1,0,100413030)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413030)
e1:SetTarget(c100413030.desreptg)
e1:SetValue(c100413030.desrepval)
e1:SetOperation(c100413030.desrepop)
c:RegisterEffect(e1)
end
function c100413030.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c100413030.desfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(0x232) or c:IsRace(RACE_BEASTWARRIOR))
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function c100413030.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100413030.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c100413030.desfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c100413030.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
end
return false
end
function c100413030.desrepval(e,c)
return c100413030.repfilter(c,e:GetHandlerPlayer())
end
function c100413030.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,100413030)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
--氷の王 ニードヘッグ
--Scripted by nekrozar
function c100413031.initial_effect(c)
c:SetUniqueOnField(1,0,100413031)
--disable special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413031,0))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_SPSUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413031)
e1:SetCondition(c100413031.discon)
e1:SetCost(c100413031.discost)
e1:SetTarget(c100413031.distg)
e1:SetOperation(c100413031.disop)
c:RegisterEffect(e1)
end
function c100413031.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c100413031.costfilter(c)
return c:IsSetCard(0x232) or c:IsRace(RACE_WYRM)
end
function c100413031.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100413031.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c100413031.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c100413031.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c100413031.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
--死の王 ヘル
--Scripted by nekrozar
function c100413032.initial_effect(c)
c:SetUniqueOnField(1,0,100413032)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413032,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413032)
e1:SetCost(c100413032.spcost)
e1:SetTarget(c100413032.sptg)
e1:SetOperation(c100413032.spop)
c:RegisterEffect(e1)
end
function c100413032.costfilter(c,e,tp)
return (c:IsSetCard(0x232) or c:IsRace(RACE_ZOMBIE)) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingTarget(c100413032.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end
function c100413032.spfilter(c,e,tp,code)
return (c:IsSetCard(0x232) or c:IsRace(RACE_ZOMBIE)) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100413032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100413032.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,c100413032.costfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
end
function c100413032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local code=e:GetLabel()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100413032.spfilter(chkc,e,tp,code) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100413032.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,code)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100413032.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_DEFENSE)
end
end
--永の王 オルムガンド
--Scripted by nekrozar
function c100413033.initial_effect(c)
c:SetUniqueOnField(1,0,100413033)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,nil,nil,99)
c:EnableReviveLimit()
--base atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100413033.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100413033,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100413033)
e3:SetCost(c100413033.drcost)
e3:SetTarget(c100413033.drtg)
e3:SetOperation(c100413033.drop)
c:RegisterEffect(e3)
end
function c100413033.atkval(e,c)
return c:GetOverlayCount()*1000
end
function c100413033.drcost(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 c100413033.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c100413033.ofilter(c,tp)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsStatus(STATUS_LEAVE_CONFIRMED)
end
function c100413033.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local td=Duel.Draw(tp,1,REASON_EFFECT)
local ed=Duel.Draw(1-tp,1,REASON_EFFECT)
local cp=c:GetControler()
if td+ed>0 and c:IsRelateToEffect(e) then
local sg=Group.CreateGroup()
local tg1=Duel.GetMatchingGroup(c100413033.ofilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),cp)
if td>0 and tg1:GetCount()>0 then
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tc1=tg1:Select(tp,1,1,nil):GetFirst()
sg:AddCard(tc1)
end
local tg2=Duel.GetMatchingGroup(c100413033.ofilter,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),cp)
if ed>0 and tg2:GetCount()>0 then
Duel.ShuffleHand(1-tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_XMATERIAL)
local tc2=tg2:Select(1-tp,1,1,nil):GetFirst()
sg:AddCard(tc2)
end
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.Overlay(c,sg)
end
end
end
--王の舞台
--Scripted by nekrozar
function c100413034.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(100413034,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100413034.spcon)
e2:SetTarget(c100413034.sptg)
e2:SetOperation(c100413034.spop)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100413034,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,100413034)
e3:SetCondition(c100413034.tkcon)
e3:SetTarget(c100413034.tktg)
e3:SetOperation(c100413034.tkop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c100413034.cfilter1(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c100413034.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100413034.cfilter1,1,nil,1-tp)
end
function c100413034.spfilter(c,e,tp)
return c:IsSetCard(0x232) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100413034.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100413034.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100413034.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,c100413034.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_DEFENSE)
end
end
function c100413034.cfilter2(c,tp)
return c:GetSummonPlayer()==tp and c:IsSetCard(0x232)
end
function c100413034.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and eg:IsExists(c100413034.cfilter2,1,nil,tp)
end
function c100413034.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100413134,0x232,0x4011,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c100413034.tkop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,100413134,0x232,0x4011,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local fid=e:GetHandler():GetFieldID()
local g=Group.CreateGroup()
for i=1,ft do
local token=Duel.CreateToken(tp,100413134)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
token:RegisterFlagEffect(100413034,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
g:AddCard(token)
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c100413034.descon)
e1:SetOperation(c100413034.desop)
Duel.RegisterEffect(e1,tp)
end
function c100413034.desfilter(c,fid)
return c:GetFlagEffectLabel(100413034)==fid
end
function c100413034.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c100413034.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c100413034.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c100413034.desfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Destroy(tg,REASON_EFFECT)
end
--王の試練
--Scripted by nekrozar
function c100413035.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100413035+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100413035.target)
e1:SetOperation(c100413035.activate)
c:RegisterEffect(e1)
end
function c100413035.filter1(c,tp)
return c:IsSetCard(0x232) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and not c:IsPublic()
and Duel.IsExistingMatchingCard(c100413035.filter2,tp,LOCATION_DECK,0,1,nil)
end
function c100413035.filter2(c)
return c:IsSetCard(0x232) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100413035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413035.filter1,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100413035.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,c100413035.filter1,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g1)
if g1:GetCount()==0 then return end
local g2=Duel.GetMatchingGroup(c100413035.filter2,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g2:SelectSubGroup(tp,aux.dncheck,false,1,2)
if sg and Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
Duel.SendtoDeck(g1,nil,1,REASON_EFFECT)
end
end
--王の報酬
--Scripted by nekrozar
function c100413036.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atklimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c100413036.atkcon)
e2:SetValue(c100413036.atkval)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100413036,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100413036)
e3:SetCondition(c100413036.drcon)
e3:SetTarget(c100413036.drtg)
e3:SetOperation(c100413036.drop)
c:RegisterEffect(e3)
end
function c100413036.atkcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c100413036.atkval(e,c)
return c:IsSetCard(0x232) and c:IsType(TYPE_EFFECT)
end
function c100413036.cfilter(c)
return bit.band(c:GetPreviousTypeOnField(),TYPE_EFFECT)~=0 and c:IsPreviousSetCard(0x232)
end
function c100413036.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100413036.cfilter,1,nil)
end
function c100413036.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c100413036.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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