Commit c4bec83c authored by mercury233's avatar mercury233

update

parent e03d37ba
#created by ...
#main
101011075
101011061
100200172
100309042
100258037
101011066
100200171
100254005
100309035
101011051
100256012
100256013
100256014
101011064
100309041
100254007
100254010
101011000
100254001
100254004
100254006
100254008
100254009
100309001
100200166
100200167
......@@ -28,27 +18,8 @@
100251001
#extra
100204008
100258044
101011046
101011048
100200170
101011045
101011044
100254002
100254003
!side
100255001
100255002
100255003
100255004
100255005
100255011
100255012
100255013
100255014
100255015
100255017
100255018
100255019
100255020
100255021
#The first line is used for comment
!counter 0x56 炎星指示物
!setname 0x11e 未界域
!setname 0x126 时间潜行者
!setname 0x235 @火灵天星
--塊斬機ダランベルシアン
--Scripted by nekrozar
function c100200170.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2,nil,nil,99)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200170,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,100200170)
e1:SetCondition(c100200170.thcon)
e1:SetCost(c100200170.thcost)
e1:SetTarget(c100200170.thtg)
e1:SetOperation(c100200170.thop)
e1:SetLabel(2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(100200170,1))
e2:SetLabel(3)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(100200170,2))
e3:SetLabel(4)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100200170,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100200270)
e4:SetCost(c100200170.spcost)
e4:SetTarget(c100200170.sptg)
e4:SetOperation(c100200170.spop)
c:RegisterEffect(e4)
end
function c100200170.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c100200170.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST)
end
function c100200170.thfilter(c,ct)
if not c:IsAbleToHand() then return false end
if ct==2 then return c:IsSetCard(0x132)
elseif ct==3 then return c:IsType(TYPE_MONSTER) and c:IsLevel(4)
else return c:IsType(TYPE_SPELL+TYPE_TRAP) end
end
function c100200170.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200170.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100200170.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200170.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100200170.costfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0
end
function c100200170.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100200170.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100200170.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100200170.spfilter(c,e,tp)
return c:IsSetCard(0x132) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100200170.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200170.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 c100200170.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,aux.NecroValleyFilter(c100200170.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
......@@ -22,7 +22,7 @@ function c100200172.initial_effect(c)
e3:SetDescription(aux.Stringid(100200172,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,100200172+100)
e3:SetCondition(c100200172.condition)
e3:SetTarget(c100200172.target)
......@@ -54,7 +54,7 @@ function c100200172.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100200172.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
return Duel.GetTurnPlayer()==tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end
function c100200172.filter(c)
return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
......
......@@ -58,7 +58,7 @@ function c100204008.cfilter(c,tp)
end
function c100204008.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100204008.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100204008.costfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,c100204008.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100204008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--コード・エクスポーター
--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)
local sel=1
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(100254002,1))
if Duel.IsExistingMatchingCard(c100254002.cfilter,tp,0,LOCATION_HAND,1,nil,typ) then
sel=Duel.SelectOption(1-tp,1213,1214)
else
sel=Duel.SelectOption(1-tp,1214)+1
end
if sel==0 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 e:GetHandler():GetOverlayCount()==0 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c100254003.spfilter(c,e,tp,mc)
return c:IsSetCard(0x119) and c:IsType(TYPE_XYZ) 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:SetCountLimit(1,100254004+EFFECT_COUNT_CODE_OATH)
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.GetMatchingGroup(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)
res=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)
res=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)
res=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,3,nil,LOCATION_GRAVE)
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
--トリックスター・フェス
--Scripted by nekrozar
function c100254005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100254005+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100254005.cost)
e1:SetTarget(c100254005.target)
e1:SetOperation(c100254005.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c100254005.reptg)
e2:SetValue(c100254005.repval)
e2:SetOperation(c100254005.repop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(100254005,ACTIVITY_SUMMON,c100254005.counterfilter)
Duel.AddCustomActivityCounter(100254005,ACTIVITY_SPSUMMON,c100254005.counterfilter)
end
function c100254005.counterfilter(c)
return c:IsSetCard(0xfb)
end
function c100254005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100254005,tp,ACTIVITY_SUMMON)==0
and Duel.GetCustomActivityCount(100254005,tp,ACTIVITY_SPSUMMON)==0 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(c100254005.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function c100254005.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xfb)
end
function c100254005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,100254105,0xfb,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c100254005.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,100254105,0xfb,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then
for i=1,2 do
local token=Duel.CreateToken(tp,100254105)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
function c100254005.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSummonLocation()==LOCATION_EXTRA and c:IsSetCard(0xfb)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c100254005.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100254005.repfilter,1,nil,tp) and e:GetHandler():IsAbleToRemove() end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c100254005.repval(e,c)
return c100254005.repfilter(c,e:GetHandlerPlayer())
end
function c100254005.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
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+100)
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 c100254007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100254007+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100254007.target)
e1:SetOperation(c100254007.activate)
c:RegisterEffect(e1)
end
function c100254007.filter(c)
return c:IsFaceup() and c:IsSetCard(0xfc) and c:IsType(TYPE_LINK)
end
function c100254007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100254007.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100254007.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100254007.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100254007.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetLink()*1000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c100254007.atktg)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c100254007.atktg(e,c)
return not c:IsSetCard(0xfc)
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 c100254010.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100254010,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100254010)
e1:SetCost(c100254010.spcost)
e1:SetTarget(c100254010.sptg)
e1:SetOperation(c100254010.spop)
c:RegisterEffect(e1)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100254010,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100254110)
e1:SetTarget(c100254010.target)
e1:SetOperation(c100254010.operation)
c:RegisterEffect(e1)
end
function c100254010.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end
function c100254010.tgfilter(c)
return c:IsSetCard(0x10b) and not c:IsCode(100254010) and c:IsAbleToGrave()
end
function c100254010.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_DEFENSE)
and Duel.IsExistingMatchingCard(c100254010.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100254010.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100254010.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,c)
end
end
function c100254010.filter(c)
return c:IsType(TYPE_FLIP) and not c:IsCode(100254010) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c100254010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100254010.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100254010.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100254010.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
--Boot-Up Corporal - Command Dynamo
--Scripted by nekrozar
function c100255001.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100255001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100255001)
e1:SetTarget(c100255001.sptg)
e1:SetOperation(c100255001.spop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c100255001.atkval)
c:RegisterEffect(e2)
end
function c100255001.eqfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x51) and c:IsRace(RACE_MACHINE) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp)
end
function c100255001.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c100255001.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_SZONE)),2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:CheckSubGroup(aux.dncheck,1,ft)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
Duel.SetTargetCard(sg)
local tg=sg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if tg:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg,tg:GetCount(),0,0)
end
end
function c100255001.tgfilter(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRelateToEffect(e)
end
function c100255001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c100255001.tgfilter,nil,e)
if ft<g:GetCount() then return end
Duel.BreakEffect()
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,false,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(c100255001.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(100255001,RESET_EVENT+RESETS_STANDARD,0,1)
tc=g:GetNext()
end
Duel.EquipComplete()
end
end
function c100255001.eqlimit(e,c)
return e:GetOwner()==c
end
function c100255001.atkfilter(c)
return c:GetFlagEffect(100255001)~=0
end
function c100255001.atkval(e,c)
return c:GetEquipGroup():FilterCount(c100255001.atkfilter,nil)*1000
end
--Boot-Up Admiral - Destroyer Dynamo
--Scripted by nekrozar
function c100255002.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c100255002.sprcon)
e2:SetTarget(c100255002.sprtg)
e2:SetOperation(c100255002.sprop)
c:RegisterEffect(e2)
--indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100255002.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100255002,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c100255002.destg)
e5:SetOperation(c100255002.desop)
c:RegisterEffect(e5)
end
function c100255002.sprfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x51) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToGraveAsCost()
end
function c100255002.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0
end
function c100255002.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c100255002.sprfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
return g:CheckSubGroup(c100255002.fselect,2,2,tp)
end
function c100255002.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c100255002.sprfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,c100255002.fselect,true,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c100255002.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
g:DeleteGroup()
end
function c100255002.indfilter(c)
return c:IsFaceup() and c:IsSetCard(0x51) and (c:IsLocation(LOCATION_MZONE) or (bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:GetEquipTarget()))
end
function c100255002.indcon(e)
return Duel.IsExistingMatchingCard(c100255002.indfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c100255002.destg(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 return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100255002.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--Boot-Up Order - Gear Charge
--Scripted by nekrozar
function c100255003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100255003+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100255003.target)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255003,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100255103)
e2:SetCost(c100255003.thcost)
e2:SetTarget(c100255003.thtg)
e2:SetOperation(c100255003.thop)
c:RegisterEffect(e2)
end
function c100255003.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x51) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100255003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c100255003.spfilter(chkc,e,tp) end
if chk==0 then return true end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsExistingTarget(c100255003.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
and ft>0 and Duel.SelectYesNo(tp,aux.Stringid(100255003,1)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c100255003.activate)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100255003.spfilter,tp,LOCATION_SZONE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c100255003.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_RULE)
end
end
function c100255003.thcost(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 c100255003.thfilter(c)
return c:IsCode(100255002) and c:IsAbleToHand()
end
function c100255003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100255003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100255003.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
--Boot-Up Order - Gear Force
--Scripted by nekrozar
function c100255004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c100255004.condition)
e1:SetTarget(c100255004.target)
e1:SetOperation(c100255004.activate)
c:RegisterEffect(e1)
end
function c100255004.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_MACHINE)
end
function c100255004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0
and not Duel.IsExistingMatchingCard(c100255004.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100255004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_ATTACK) end
local g=Duel.GetMatchingGroupCount(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100255004.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c100255004.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c100255004.filter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,ct,nil,POS_ATTACK)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--Powerhold the Moving Battery
--Scripted by nekrozar
function c100255005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100255005.target)
e1:SetOperation(c100255005.activate)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100255005.atkcon)
e2:SetValue(c100255005.atkval)
c:RegisterEffect(e2)
end
function c100255005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100255005,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100255005.eqfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsLevel(4) and c:IsSetCard(0x51) and c:CheckUniqueOnField(tp)
end
function c100255005.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,100255005,0,0x21,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)==0 then return end
local g=Duel.GetMatchingGroup(c100255005.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(100255005,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.Equip(tp,tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100255005.eqlimit)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(100255005,RESET_EVENT+RESETS_STANDARD,0,0)
end
end
function c100255005.eqlimit(e,c)
return e:GetOwner()==c
end
function c100255005.atkcon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c100255005.atkval(e,c)
local atk=0
local g=c:GetEquipGroup()
local tc=g:GetFirst()
while tc do
if tc:GetFlagEffect(100255005)~=0 and tc:GetAttack()>=0 then
atk=atk+tc:GetAttack()*2
end
tc=g:GetNext()
end
return atk
end
--Brotherhood of the Fire Fist - Ram
--Scripted by nekrozar
function c100255011.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100255011,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100255011)
e1:SetCost(c100255011.setcost1)
e1:SetTarget(c100255011.settg1)
e1:SetOperation(c100255011.setop1)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255011,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,100255111)
e2:SetCondition(c100255011.setcon2)
e2:SetTarget(c100255011.settg2)
e2:SetOperation(c100255011.setop2)
c:RegisterEffect(e2)
end
function c100255011.setcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100255011.setfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
and Duel.IsExistingMatchingCard(c100255011.setfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c100255011.setfilter2(c,code)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(code) and c:IsSSetable()
end
function c100255011.settg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c100255011.setfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100255011.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100255011.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
end
function c100255011.setop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100255011.setfilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
end
function c100255011.setcon2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x79) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c100255011.setfilter3(c,tp)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function c100255011.settg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255011.setfilter3,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c100255011.setop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100255011.setfilter3,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
--Brotherhood of the Fire Fist - Elephant
--Scripted by nekrozar
function c100255012.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100255012,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,100255012)
e1:SetCost(c100255012.spcost)
e1:SetTarget(c100255012.sptg)
e1:SetOperation(c100255012.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100255012,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100255012+100)
e3:SetTarget(c100255012.tdtg)
e3:SetOperation(c100255012.tdop)
c:RegisterEffect(e3)
end
function c100255012.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c100255012.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255012.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c100255012.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100255012.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c100255012.spfilter(c,e,tp)
return c:IsSetCard(0x79) and not c:IsCode(100255012) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100255012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100255012.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100255012.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,c100255012.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 c100255012.tdfilter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c100255012.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100255012.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100255012.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100255012.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c100255012.thfilter(c)
return c:IsSetCard(0x79) and c:IsLevelAbove(5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100255012.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then
local g=Duel.GetMatchingGroup(c100255012.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100255012,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--Brotherhood of the Fire Fist - Panda
--Scripted by nekrozar
function c100255013.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100255013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100255013)
e1:SetCondition(c100255013.spcon)
e1:SetTarget(c100255013.sptg)
e1:SetOperation(c100255013.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100255113)
e2:SetTarget(c100255013.desreptg)
e2:SetValue(c100255013.desrepval)
c:RegisterEffect(e2)
end
function c100255013.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x7c)
end
function c100255013.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 c100255013.spfilter(c,e,tp)
return c:IsSetCard(0x79) and not c:IsCode(100255013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100255013.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 g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100255013.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100255013,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
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:SetTarget(c100255013.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100255013.splimit(e,c)
return not c:IsSetCard(0x79)
end
function c100255013.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x79) and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c100255013.tgfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and not c:IsImmuneToEffect(e)
end
function c100255013.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rp==1-tp and eg:IsExists(c100255013.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c100255013.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,e) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100255013.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
function c100255013.desrepval(e,c)
return c100255013.repfilter(c,e:GetHandlerPlayer())
end
--Brotherhood of the Fire Fist - Eland
--Scripted by nekrozar
function c100255014.initial_effect(c)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100255014,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100255014)
e1:SetCost(c100255014.setcost)
e1:SetTarget(c100255014.settg)
e1:SetOperation(c100255014.setop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255014,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100255114)
e2:SetCondition(c100255014.discon)
e2:SetCost(c100255014.discost)
e2:SetTarget(c100255014.distg)
e2:SetOperation(c100255014.disop)
c:RegisterEffect(e2)
end
function c100255014.costfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c100255014.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255014.costfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c100255014.costfilter1,1,1,REASON_COST+REASON_DISCARD)
end
function c100255014.setfilter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c100255014.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255014.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c100255014.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100255014.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c100255014.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c100255014.costfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x79,0x7c) and not c:IsCode(100255014) and c:IsAbleToGraveAsCost()
end
function c100255014.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255014.costfilter2,tp,LOCATION_ONFIELD,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c100255014.costfilter2,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100255014.costfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c100255014.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c100255014.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--Brotherhood of the Fire Fist - Swan
--Scripted by nekrozar
function c100255015.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEASTWARRIOR),2,false)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100255015,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100255015)
e1:SetTarget(c100255015.damtg)
e1:SetOperation(c100255015.damop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255015,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100255115)
e2:SetCondition(c100255015.descon)
e2:SetCost(c100255015.descost)
e2:SetTarget(c100255015.destg)
e2:SetOperation(c100255015.desop)
c:RegisterEffect(e2)
end
function c100255015.damfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100255015.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255015.damfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetTargetPlayer(1-tp)
local ct=Duel.GetMatchingGroupCount(c100255015.damfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end
function c100255015.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(c100255015.damfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Damage(p,ct*200,REASON_EFFECT)
end
function c100255015.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c100255015.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c100255015.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255015.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c100255015.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100255015.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c100255015.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100255015.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--Brotherhood of the Fire Fist - Peacock
--Scripted by nekrozar
function c100255017.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x79),2,2)
--cannot battle target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100255017.btcon)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255017,0))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1,100255017)
e2:SetCost(c100255017.ctcost)
e2:SetTarget(c100255017.cttg)
e2:SetOperation(c100255017.ctop)
c:RegisterEffect(e2)
end
function c100255017.btfilter(c)
return c:IsFaceup() and c:IsSetCard(0x79)
end
function c100255017.btcon(e)
return e:GetHandler():GetLinkedGroup():IsExists(c100255017.btfilter,1,nil)
end
function c100255017.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c100255017.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100255017.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c100255017.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100255017.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c100255017.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(),0x1f)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged(false,zone) end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil,false,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil,false,zone)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c100255017.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local zone=bit.band(c:GetLinkedZone(),0x1f)
if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1,zone)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--Fire Fortress atop Liang Peak
--Scripted by nekrozar
function c100255018.initial_effect(c)
c:EnableCounterPermit(0x56)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c100255018.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--actlimit
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100255018,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCost(c100255018.actcost)
e4:SetOperation(c100255018.actop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100255018,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e5:SetCost(c100255018.thcost)
e5:SetTarget(c100255018.thtg)
e5:SetOperation(c100255018.thop)
c:RegisterEffect(e5)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(100255018,2))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e6:SetCost(c100255018.spcost)
e6:SetTarget(c100255018.sptg)
e6:SetOperation(c100255018.spop)
c:RegisterEffect(e6)
end
function c100255018.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x79)
end
function c100255018.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c100255018.ctfilter,1,nil) then
e:GetHandler():AddCounter(0x56,1)
end
end
function c100255018.actcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x56,2,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x56,2,REASON_COST)
end
function c100255018.actop(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(0,1)
e1:SetCondition(c100255018.actcon)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100255018.actcon(e)
local tc=Duel.GetAttacker()
local tp=e:GetHandlerPlayer()
return tc and tc:IsControler(tp) and tc:IsRace(RACE_BEASTWARRIOR)
end
function c100255018.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x56,6,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x56,6,REASON_COST)
end
function c100255018.thfilter(c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100255018.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c100255018.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100255018.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100255018.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
function c100255018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x56,10,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x56,10,REASON_COST)
end
function c100255018.spfilter(c,e,tp)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c100255018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(c100255018.spfilter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function c100255018.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100255018.spfilter,tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
--Fire Formation - Domei
--Scripted by nekrozar
function c100255019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100255019+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c100255019.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255019,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100255119)
e2:SetCondition(c100255019.spcon)
e2:SetTarget(c100255019.sptg)
e2:SetOperation(c100255019.spop)
c:RegisterEffect(e2)
end
function c100255019.filter(c,e,tp)
return c:IsRace(RACE_BEASTWARRIOR)
end
function c100255019.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
local g=Duel.GetMatchingGroup(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,nil,c100255019.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100255019,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c100255019.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c100255019.spfilter(c,e,tp)
return c:IsSetCard(0x79) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100255019.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100255019.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100255019.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100255019.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100255019.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)
end
end
--Fire Formation - Ingen
--Scripted by nekrozar
function c100255020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100255020+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c100255020.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100255020,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100255120)
e2:SetCondition(c100255020.thcon)
e2:SetTarget(c100255020.thtg)
e2:SetOperation(c100255020.thop)
c:RegisterEffect(e2)
end
function c100255020.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c100255020.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_BEASTWARRIOR) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c100255020.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100255020.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c100255020.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(c100255020.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if (sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0)) and Duel.SelectYesNo(tp,aux.Stringid(100255020,1)) then
Duel.BreakEffect()
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()
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)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c100255020.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c100255020.thfilter(c)
return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100255020.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100255020.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100255020.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100255020.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100255020.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
--Ultimate Fire Formation - Sinto
--Scripted by nekrozar
function c100255021.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,100255021+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100255021.condition)
e1:SetTarget(c100255021.target)
e1:SetOperation(c100255021.activate)
c:RegisterEffect(e1)
end
function c100255021.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x79)
end
function c100255021.cfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100255021.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c100255021.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100255021.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100255021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0)
end
end
function c100255021.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
--ディメンション・アトラクター
--Scripted by nekrozar
function c100256012.initial_effect(c)
--redirect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100256012,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c100256012.redcon)
e1:SetCost(c100256012.redcost)
e1:SetOperation(c100256012.redop)
c:RegisterEffect(e1)
end
function c100256012.redcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0
end
function c100256012.redcost(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 c100256012.redop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTargetRange(0xff, 0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
--Nibiru, the Primal Being
--Scripted by nekrozar
function c100256013.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100256013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100256013)
e1:SetCondition(c100256013.spcon)
e1:SetTarget(c100256013.sptg)
e1:SetOperation(c100256013.spop)
c:RegisterEffect(e1)
if not c100256013.global_check then
c100256013.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c100256013.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
function c100256013.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),100256013,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c100256013.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,100256013)>=5 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c100256013.relfilter(c)
return c:IsFaceup() and c:IsReleasableByEffect()
end
function c100256013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100256013.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 and Duel.GetMZoneCount(tp,g)>0 and Duel.GetMZoneCount(1-tp,g,tp)>0
and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsPlayerCanSpecialSummonMonster(tp,100256113,0,0x4011,g:GetSum(Card.GetBaseAttack),g:GetSum(Card.GetBaseDefense),11,RACE_ROCK,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),2,0,0)
end
function c100256013.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100256013.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if og:GetCount()==0 then return end
local atk=og:GetSum(Card.GetBaseAttack)
local def=og:GetSum(Card.GetBaseDefense)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100256113,0,0x4011,atk,def,11,RACE_ROCK,ATTRIBUTE_LIGHT) then
Duel.BreakEffect()
local token=Duel.CreateToken(tp,100256113)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP)
end
end
end
end
--Dark Ruler No More
--Scripted by nekrozar
function c100256014.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100256014.target)
e1:SetOperation(c100256014.activate)
c:RegisterEffect(e1)
end
function c100256014.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c100256014.chainlm)
end
end
function c100256014.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end
function c100256014.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,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_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(0,1)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
--激動の未界域
--
--Script by mercury233
function c100258037.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100258037,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c100258037.bdcon)
e2:SetTarget(c100258037.bdtg)
e2:SetOperation(c100258037.bdop)
c:RegisterEffect(e2)
--destroy all
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100258037,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,100258037)
e3:SetCost(c100258037.descost)
e3:SetTarget(c100258037.destg)
e3:SetOperation(c100258037.desop)
c:RegisterEffect(e3)
end
function c100258037.cfilter(c,tp)
local rc=c:GetReasonCard()
return c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp and c:IsSetCard(0x11e)
and rc and rc:IsControler(1-tp) and rc:IsRelateToBattle()
end
function c100258037.bdcon(e,tp,eg,ep,ev,re,r,rp)
local dc=eg:Filter(c100258037.cfilter,nil,tp):GetFirst()
if dc then
e:SetLabelObject(dc:GetReasonCard())
return true
else return false end
end
function c100258037.bdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
end
function c100258037.bdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c100258037.costfilter(c)
return c:IsSetCard(0x11e) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function c100258037.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100258037.costfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function c100258037.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c100258037.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
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(c100258037.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100258037.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x11e)
end
--クロノダイバー・パーペチュア
--Scripted by nekrozar
function c100258044.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100258044,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100258044)
e1:SetCost(c100258044.spcost)
e1:SetTarget(c100258044.sptg)
e1:SetOperation(c100258044.spop)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100258044,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100258144)
e2:SetTarget(c100258044.mattg)
e2:SetOperation(c100258044.matop)
c:RegisterEffect(e2)
end
function c100258044.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 c100258044.spfilter(c,e,tp)
return c:IsSetCard(0x126) and not c:IsCode(100258044) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100258044.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100258044.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100258044.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100258044.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100258044.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)
end
end
function c100258044.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c100258044.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100258044.tgfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c100258044.tgfilter,tp,LOCATION_MZONE,0,1,c)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x126) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100258044.tgfilter,tp,LOCATION_MZONE,0,1,1,c)
end
function c100258044.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x126)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
--クロノダイバー・スタートアップ
--Scripted by nekrozar
function c101011061.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101011061)
e1:SetTarget(c101011061.target)
e1:SetOperation(c101011061.activate)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101011061,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101011061)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101011061.mattg)
e2:SetOperation(c101011061.matop)
c:RegisterEffect(e2)
end
function c101011061.filter(c,e,tp)
return c:IsSetCard(0x126) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101011061.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101011061.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101011061.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101011061.filter,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 c101011061.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126)
end
function c101011061.ccfilter(c)
return bit.band(c:GetType(),0x7)
end
function c101011061.fselect(g)
return g:GetClassCount(c101011061.ccfilter)==g:GetCount()
end
function c101011061.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x126)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101011061.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101011061.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and g:CheckSubGroup(c101011061.fselect,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101011061.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101011061.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsSetCard),tp,LOCATION_GRAVE,0,nil,0x126)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:SelectSubGroup(tp,c101011061.fselect,false,3,3)
if sg and sg:GetCount()==3 then
Duel.Overlay(tc,sg)
end
end
end
--クロノダイバー・レトログラード
--
--Scripted by mallu11
function c101011075.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101011075+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101011075.condition)
e1:SetTarget(c101011075.target)
e1:SetOperation(c101011075.activate)
c:RegisterEffect(e1)
end
function c101011075.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x126) and c:IsType(TYPE_XYZ)
end
function c101011075.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101011075.cfilter,tp,LOCATION_MZONE,0,1,nil)
and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsChainNegatable(ev)
end
function c101011075.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)
end
function c101011075.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re)
and Duel.IsExistingMatchingCard(c101011075.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c101011075.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if not tc:GetFirst():IsImmuneToEffect(e) then
ec:CancelToGrave()
Duel.Overlay(tc:GetFirst(),Group.FromCards(ec))
end
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