Commit 8b6a906e authored by mercury233's avatar mercury233

update scripts

parent 97889f85
#created by ... #created by ...
#main #main
101102000
101102081
101102082
101102084
101102085
101102086
101102087
101102088
101102089
101102092
101102093
101102094
101102095
101102096
100270201 100270201
100270202 100270202
100270204 100270204
...@@ -14,6 +28,9 @@ ...@@ -14,6 +28,9 @@
100340202 100340202
100340203 100340203
#extra #extra
101102083
101102090
101102091
100270203 100270203
100270205 100270205
100270210 100270210
......
--迅雷の暴君 グローザー
--Grozer the Thunderclap Tyrant
--Script by: XGlitchy30
--aux.Stringid Guide for whoever edits the cdb:
--0=Negate
--1=Protection
--2=Indestructable by battle
--3=Indestructable by the opponent's card effects
--4=Cannot be targeted by the opponent's card effects
function c100200190.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_FIEND),1)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200190,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,100200190)
e1:SetCondition(c100200190.negcon)
e1:SetTarget(c100200190.negtg)
e1:SetOperation(c100200190.negop)
c:RegisterEffect(e1)
--protection
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200190,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c100200190.econ)
e2:SetOperation(c100200190.eop)
c:RegisterEffect(e2)
end
function c100200190.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c100200190.dcfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c100200190.negcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c100200190.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100200190.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100200190.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c100200190.dcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100200190.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c100200190.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,c100200190.dcfilter,1,1,REASON_EFFECT+REASON_DISCARD)>0 then
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
function c100200190.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND) and c:IsPreviousLocation(LOCATION_HAND) and c:IsControler(tp)
end
function c100200190.econ(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c100200190.cfilter,1,nil,tp)
and (c:GetFlagEffect(100200190)==0 or bit.band(c:GetFlagEffectLabel(100200190),0x7)~=0x7 or not c:IsHasEffect(EFFECT_INDESTRUCTABLE_BATTLE) or not c:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT)
or not c:IsHasEffect(EFFECT_CANNOT_BE_EFFECT_TARGET))
end
function c100200190.eop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:GetFlagEffect(100200190)==0 or bit.band(c:GetFlagEffectLabel(100200190),0x1)==0 or not c:IsHasEffect(EFFECT_INDESTRUCTABLE_BATTLE))
local b2=(c:GetFlagEffect(100200190)==0 or bit.band(c:GetFlagEffectLabel(100200190),0x2)==0 or not c:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT))
local b3=(c:GetFlagEffect(100200190)==0 or bit.band(c:GetFlagEffectLabel(100200190),0x4)==0 or not c:IsHasEffect(EFFECT_CANNOT_BE_EFFECT_TARGET))
if not b1 and not b2 and not b3 then return end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(100200190,2)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(100200190,3)
opval[off]=1
off=off+1
end
if b3 then
ops[off]=aux.Stringid(100200190,4)
opval[off]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
if c:GetFlagEffect(100200190)==0 then
c:RegisterFlagEffect(100200190,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
c:SetFlagEffectLabel(100200190,bit.bor(c:GetFlagEffectLabel(100200190),0x1))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200190,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
c:RegisterEffect(e1)
elseif sel==1 then
if c:GetFlagEffect(100200190)==0 then
c:RegisterFlagEffect(100200190,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
c:SetFlagEffectLabel(100200190,bit.bor(c:GetFlagEffectLabel(100200190),0x2))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200190,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(aux.indoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
else
if c:GetFlagEffect(100200190)==0 then
c:RegisterFlagEffect(100200190,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
c:SetFlagEffectLabel(100200190,bit.bor(c:GetFlagEffectLabel(100200190),0x4))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200190,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--星なる影 ゲニウス
--
--Script by 龙骑
function c100270201.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270201,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100270201)
e1:SetCost(c100270201.cost)
e1:SetTarget(c100270201.target)
e1:SetOperation(c100270201.operation)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270201,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100270201)
e2:SetCost(c100270201.cost)
e2:SetCondition(c100270201.actcon)
e2:SetTarget(c100270201.acttg)
e2:SetOperation(c100270201.actop)
c:RegisterEffect(e2)
end
function c100270201.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c100270201.filter(c)
return c:IsFaceup() and c:IsSetCard(0x9d)
end
function c100270201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100270201.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270201.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100270201.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c100270201.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c100270201.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c100270201.efilter(e,re)
return e:GetHandler()~=re:GetOwner() and re:IsActiveType(TYPE_MONSTER)
end
function c100270201.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100270201.actfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)
end
function c100270201.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100270201.actfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270201.actfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100270201.actfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c100270201.actop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--影依の炎核 ヴォイド
--
--Script by 龙骑
function c100270202.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270202,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100270202)
e1:SetCost(c100270202.cost)
e1:SetTarget(c100270202.target)
e1:SetOperation(c100270202.operation)
c:RegisterEffect(e1)
--SendtoGrave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270202,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100270202)
e2:SetCost(c100270202.cost)
e2:SetTarget(c100270202.tgtg)
e2:SetOperation(c100270202.tgop)
c:RegisterEffect(e2)
end
function c100270202.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c100270202.cfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c100270202.tgfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetOriginalAttribute())
end
function c100270202.tgfilter(c,att)
return c:IsAbleToGrave() and c:GetOriginalAttribute()==att and c:IsSetCard(0x9d)
end
function c100270202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100270202.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100270202.cfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100270202.cfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c100270202.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local att=tc:GetOriginalAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100270202.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,att)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
function c100270202.ctfilter(c)
return c:IsFaceup()
end
function c100270202.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroup(c100270202.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetAttribute)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function c100270202.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,e:GetLabel(),REASON_EFFECT)
end
\ No newline at end of file
--銀河眼の極光波竜
--
--"Lua By REIKAI 2404873791"
function c100270203.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2,c100270203.ovfilter,aux.Stringid(100270203,0),2,c100270203.xyzop)
c:EnableReviveLimit()
--CANNOT be tg
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270203,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c100270203.cost)
e1:SetOperation(c100270203.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270203,2))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(c100270203.con)
e2:SetTarget(c100270203.tg)
e2:SetOperation(c100270203.op)
c:RegisterEffect(e2)
end
function c100270203.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10e5)
end
function c100270203.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100270203)==0 end
Duel.RegisterFlagEffect(tp,100270203,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c100270203.filter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c100270203.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c100270203.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e3:SetValue(aux.tgoval)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
function c100270203.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c100270203.filter(c)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(9) and c:IsRace(RACE_DRAGON) and c:IsAbleToExtra()
end
function c100270203.xyzfilter(c,mc,e,tp)
return mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c100270203.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270203.filter,tp,LOCATION_GRAVE,0,1,nli) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
end
function c100270203.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c100270203.filter,tp,LOCATION_GRAVE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100270203.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local c=e:GetHandler()
local g=Duel.GetOperatedGroup()
if not g then return end
local sc=g:GetFirst()
if sc and c:IsRelateToEffect(e) and c100270203.xyzfilter(sc,c,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(100270203,4)) 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
--ラヴァル・アーチャー
--
--Script by 尺
function c100270204.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270204,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100270204)
e1:SetTarget(c100270204.sumtg)
e1:SetOperation(c100270204.sumop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270204,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100270205)
e2:SetTarget(c100270204.sptg)
e2:SetOperation(c100270204.spop)
c:RegisterEffect(e2)
end
function c100270204.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,100270204)==0 end
end
function c100270204.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,100270204)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(100270204,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x39))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,100270204,RESET_PHASE+PHASE_END,0,1)
end
function c100270204.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c100270204.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100270204.cfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c100270204.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100270204.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100270204.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100270204.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100270204.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_FIRE)
end
--ラヴァルバル・サラマンダー
--
--"Lua By REIKAI 2404873791"
function c100270205.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1)
c:EnableReviveLimit()
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270205,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100270205)
e1:SetCondition(c100270205.drcon)
e1:SetTarget(c100270205.drtg)
e1:SetOperation(c100270205.drop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270205,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c100270205.cost)
e2:SetTarget(c100270205.settg)
e2:SetOperation(c100270205.setop)
c:RegisterEffect(e2)
end
function c100270205.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100270205.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=2
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c100270205.tgfilter(g,tp)
return g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE)
end
function c100270205.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)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tg=g:SelectSubGroup(tp,c100270205.tgfilter,false,2,2,tp)
if tg then
if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.ConfirmCards(1-p,sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
function c100270205.refilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c100270205.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270205.refilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100270205.refilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100270205.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c100270205.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x39) and Duel.IsExistingMatchingCard(c100270205.posfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c100270205.setop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x39)
if Duel.IsExistingMatchingCard(c100270205.posfilter,tp,0,LOCATION_MZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c100270205.posfilter,tp,0,LOCATION_MZONE,1,ct,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
--聖蔓の乙女
--
--Script by JustFish
function c100270207.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270207,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100270207)
e1:SetCondition(c100270207.negcon)
e1:SetTarget(c100270207.negtg)
e1:SetOperation(c100270207.negop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c100270207.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function c100270207.cfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetSummonLocation()==LOCATION_EXTRA
end
function c100270207.negcon(e,tp,eg,ep,ev,re,r,rp)
if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c100270207.cfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c100270207.negtg(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_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100270207.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.NegateActivation(ev) then
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
end
end
function c100270207.tgtg(e,c)
return (c:IsSetCard(0x255) or c:IsSetCard(0x256)) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
--聖種の影芽
--
--Script by JustFish
function c100270208.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270208,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100270208)
e1:SetCondition(c100270208.spcon)
e1:SetTarget(c100270208.sptg)
e1:SetOperation(c100270208.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270208,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100270208+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100270208.sptg1)
e2:SetOperation(c100270208.spop1)
c:RegisterEffect(e2)
end
function c100270208.spcfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_PLANT) and c:IsFaceup()
end
function c100270208.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100270208.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100270208.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 c100270208.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 c100270208.tgfilter(c,e,tp)
return c:IsType(TYPE_LINK) and (c:IsSetCard(0x255) or c:IsSetCard(0x256)) and c:IsLinkBelow(2) and c:IsLinkState() and Duel.IsExistingMatchingCard(c100270208.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
end
function c100270208.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270208.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100270208.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c100270208.tgfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100270208.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100270208.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local code=tc:GetCode()
local g=Duel.GetMatchingGroup(c100270208.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,code)
if #g>0 then
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(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100270208.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100270208.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
\ No newline at end of file
--聖種の天双芽
--
--Script by JustFish
function c100270209.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100270209)
e1:SetCondition(c100270209.spcon)
e1:SetTarget(c100270209.sptg)
e1:SetOperation(c100270209.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--SpecialSummon bfg
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270209,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100270209+100)
e3:SetCost(c100270209.spcost1)
e3:SetTarget(c100270209.sptg1)
e3:SetOperation(c100270209.spop1)
c:RegisterEffect(e3)
end
function c100270209.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x256)
end
function c100270209.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100270209.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100270209.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100270209.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100270209.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270209.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100270209.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100270209.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 c100270209.cfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c,tp)>0
end
function c100270209.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100270209.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100270209.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100270209.spfilter1(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_PLANT)
and Duel.IsExistingMatchingCard(c100270209.spnfilter,tp,LOCATION_GRAVE,0,1,c,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100270209.spnfilter(c,code)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_PLANT) and c:IsCode(code)
end
function c100270209.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270209.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100270209.spop1(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(c100270209.spfilter1),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--聖天樹の幼精
--
--Script by JustFish
function c100270210.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270210.mfilter,1,1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270210,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c100270210.thcon)
e1:SetTarget(c100270210.thtg)
e1:SetOperation(c100270210.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100270210.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--cannot be battle traget
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100270210,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DAMAGE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c100270210.spcon)
e4:SetTarget(c100270210.sptg)
e4:SetOperation(c100270210.spop)
c:RegisterEffect(e4)
end
function c100270210.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_PLANT)
end
function c100270210.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,100270201) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100270210.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSequence()>4 and e:GetLabel()==1
end
function c100270210.thfilter(c)
return c:IsSetCard(0x255) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100270210.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270210.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100270210.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100270210.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100270210.spfilter(c,e,tp)
return c:IsSetCard(0x255) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270210.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c100270210.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100270210.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100270210.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100270210.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--聖天樹の精霊
--
--Script by JustFish
function c100270211.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270211.mfilter,2,2,c100270211.lcheck)
c:EnableReviveLimit()
--cannot be battle traget
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270211,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(2)
e2:SetCondition(c100270211.spcon)
e2:SetTarget(c100270211.sptg)
e2:SetOperation(c100270211.spop)
c:RegisterEffect(e2)
end
function c100270211.mfilter(c)
return c:IsLinkRace(RACE_PLANT)
end
function c100270211.lcheck(g)
return g:IsExists(c100270211.lcfilter,1,nil)
end
function c100270211.lcfilter(c)
return c:IsLinkType(TYPE_LINK) and c:IsLinkSetCard(0x256)
end
function c100270211.spfilter(c,e,tp)
return c:IsSetCard(0x255) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270211.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c100270211.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100270211.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100270211.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100270211.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--聖天樹の大精霊
--
--Script by JustFish
function c100270212.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270212.mfilter,2,99)
c:EnableReviveLimit()
--cannot be battle traget
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270212,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(3)
e2:SetCondition(c100270212.spcon)
e2:SetTarget(c100270212.sptg)
e2:SetOperation(c100270212.spop)
c:RegisterEffect(e2)
--negate attack
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100270212,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c100270212.mvcon)
e4:SetTarget(c100270212.mvtg)
e4:SetOperation(c100270212.mvop)
c:RegisterEffect(e4)
end
function c100270212.mfilter(c)
return c:IsLinkRace(RACE_PLANT)
end
function c100270212.spfilter(c,e,tp)
return c:IsSetCard(0x255) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270212.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c100270212.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100270212.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100270212.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100270212.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100270212.mvcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d and d:IsControler(tp) and d:IsFaceup() and e:GetHandler():GetLinkedGroup():IsContains(d)
end
function c100270212.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c100270212.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget()
if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
end
\ No newline at end of file
--聖天樹の大母神
--
--Script by JustFish
function c100270213.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270213.mfilter,2,99)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270213,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c100270213.thcon)
e1:SetTarget(c100270213.thtg)
e1:SetOperation(c100270213.thop)
c:RegisterEffect(e1)
--cannot be battle traget
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270213,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c100270213.cost)
e3:SetTarget(c100270213.destg)
e3:SetOperation(c100270213.desop)
c:RegisterEffect(e3)
end
function c100270213.mfilter(c)
return c:IsLinkType(TYPE_LINK)
end
function c100270213.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
function c100270213.thfilter(c)
return c:IsSetCard(0x255) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100270213.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270213.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100270213.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100270213.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100270213.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c100270213.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c100270213.costfilter(c,ec,tp,g)
return Duel.IsExistingTarget(c100270213.desfilter,tp,0,LOCATION_ONFIELD,1,c,c,ec) and g:IsContains(c) and c:IsType(TYPE_LINK) and c:IsLinkAbove(1)
end
function c100270213.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local ct=0
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c100270213.costfilter,1,c,c,tp,lg)
else
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local g=Duel.SelectReleaseGroup(tp,c100270213.costfilter,1,1,c,c,tp,lg)
ct=g:GetFirst():GetLink()
Duel.Release(g,REASON_COST)
end
e:SetValue(ct)
local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,1,0,0)
end
function c100270213.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetValue()
local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local g=sg:Select(tp,1,ct,nil)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--聖蔓の守護者
--
--Script by JustFish
function c100270214.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270214.mfilter,1,1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270214,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100270214.descon)
e1:SetTarget(c100270214.destg)
e1:SetOperation(c100270214.desop)
c:RegisterEffect(e1)
--half damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270214,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c100270214.dmcon)
e2:SetOperation(c100270214.dmop)
c:RegisterEffect(e2)
--skip
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c100270214.con)
e3:SetOperation(c100270214.op)
c:RegisterEffect(e3)
end
function c100270214.mfilter(c)
return c:IsLinkType(TYPE_NORMAL) and c:IsLinkRace(RACE_PLANT)
end
function c100270214.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0 and c:IsPreviousSetCard(0x256) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c100270214.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100270214.cfilter,1,nil,tp)
end
function c100270214.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c100270214.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c100270214.filter(c,ec)
return c:IsFaceup() and c:IsSetCard(0x256) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(ec)
end
function c100270214.dmcon(e,tp,eg,ep,ev,re,r,rp)
local a,d,c=Duel.GetAttacker(),Duel.GetAttackTarget(),e:GetHandler()
local g=Duel.GetMatchingGroup(c100270214.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
return d and (a==c or b==c) and a:GetControler()~=d:GetControler() and #g>0
end
function c100270214.dmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(HALF_DAMAGE)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c100270214.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c100270214.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
\ No newline at end of file
--聖蔓の癒し手
--
--Script by JustFish
function c100270215.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270215.mfilter,1,1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270215,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100270215.descon)
e1:SetTarget(c100270215.destg)
e1:SetOperation(c100270215.desop)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270215,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c100270215.rectg)
e2:SetOperation(c100270215.recop)
c:RegisterEffect(e2)
--Recover by battle
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270215,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100270215.recon)
e3:SetTarget(c100270215.retg)
e3:SetOperation(c100270215.reop)
c:RegisterEffect(e3)
end
function c100270215.mfilter(c)
return c:IsLinkType(TYPE_NORMAL) and c:IsLinkRace(RACE_PLANT)
end
function c100270215.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0 and c:IsPreviousSetCard(0x256) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c100270215.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100270215.cfilter,1,nil,tp)
end
function c100270215.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c100270215.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c100270215.recfilter(c)
return c:IsSetCard(0x256) and c:IsType(TYPE_LINK) and c:IsLinkAbove(1)
end
function c100270215.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c100270215.recfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270215.recfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100270215.recfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetLink()*300)
end
function c100270215.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLink()>0 then
Duel.Recover(tp,tc:GetLink()*300,REASON_EFFECT)
end
end
function c100270215.recon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and tc:IsControler(tp) and tc:IsType(TYPE_LINK) and tc:IsRace(RACE_PLANT)
end
function c100270215.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(600)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600)
end
function c100270215.reop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--聖蔓の剣士
--
--Script by JustFish
function c100270216.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270216.mfilter,1,1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270216,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100270216.descon)
e1:SetTarget(c100270216.destg)
e1:SetOperation(c100270216.desop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270216,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c100270216.atktg)
e2:SetOperation(c100270216.atkop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270216,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCondition(aux.bdogcon)
e3:SetTarget(c100270216.sptg)
e3:SetOperation(c100270216.spop)
c:RegisterEffect(e3)
end
function c100270216.mfilter(c)
return c:IsLinkType(TYPE_NORMAL) and c:IsLinkRace(RACE_PLANT)
end
function c100270216.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0 and c:IsPreviousSetCard(0x256) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c100270216.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100270216.cfilter,1,nil,tp)
end
function c100270216.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c100270216.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c100270216.atkfilter(c)
return c:IsSetCard(0x256) and c:IsType(TYPE_LINK) and c:IsLinkAbove(1)
end
function c100270216.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c100270216.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270216.atkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100270216.atkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c100270216.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc,c=Duel.GetFirstTarget(),e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLink()>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetLink()*800)
c:RegisterEffect(e1)
end
end
function c100270216.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
local zone=Duel.GetLinkedZone(tp)&0x1f
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0)
end
function c100270216.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=Duel.GetLinkedZone(tp)&0x1f
if zone~=0 and tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone) 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
\ No newline at end of file
--聖蔓の社
--
--Script by JustFish
function c100270217.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c100270217.cost)
e1:SetCondition(c100270217.con)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c100270217.splimit)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270217,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c100270217.sptg)
e3:SetOperation(c100270217.spop)
c:RegisterEffect(e3)
--to deck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100270217,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCost(c100270217.setcost)
e4:SetCondition(c100270217.setcon)
e4:SetTarget(c100270217.settg)
e4:SetOperation(c100270217.setop)
c:RegisterEffect(e4)
end
function c100270217.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c100270217.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x256)
end
function c100270217.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100270217.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100270217.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PLANT)
end
function c100270217.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100270217.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100270217.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100270217.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(c100270217.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100270217.setcost(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 c100270217.setcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c100270217.setfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c100270217.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100270217.setfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectTarget(tp,c100270217.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,sg,1,0,0)
end
function c100270217.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
\ No newline at end of file
--聖天樹の開花
--Sunavalon Bloom
--Script by JustFish
function c100270218.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,100270218+EFFECT_COUNT_CODE_OATH)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100270218.acttg)
e1:SetOperation(c100270218.actop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270218,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100270218)
e2:SetCondition(c100270218.atkcon)
e2:SetTarget(c100270218.atktg)
e2:SetOperation(c100270218.atkop)
c:RegisterEffect(e2)
end
function c100270218.lkfilter(c)
return c:IsRace(RACE_PLANT) and c:IsType(TYPE_LINK) and c:IsLinkAbove(4)
end
function c100270218.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local lk=Duel.GetMatchingGroupCount(c100270218.lkfilter,tp,LOCATION_MZONE,0,nil)
if lk>0 then
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
end
function c100270218.actop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local lk=Duel.GetMatchingGroupCount(c100270218.lkfilter,tp,LOCATION_MZONE,0,nil)
if lk>0 then
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)
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)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
function c100270218.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetAttacker(),Duel.GetAttackTarget()
return (a:IsControler(tp) and a:IsRace(RACE_PLANT) and a:IsType(TYPE_LINK))
or (not d or (d:IsControler(tp) and d:IsRace(RACE_PLANT) and d:IsType(TYPE_LINK)))
end
function c100270218.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return #lg>0 and lg:GetSum(Card.GetAttack)>0 end
end
function c100270218.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
local lg=tc:GetLinkedGroup()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(lg:GetSum(Card.GetAttack))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
\ No newline at end of file
--氷結界の虎将 ウェイン
--
--"Lua By REIKAI 2404873791"
function c100340001.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100340001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100340001)
e1:SetCondition(c100340001.spcon)
e1:SetTarget(c100340001.sptg)
e1:SetOperation(c100340001.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100340001,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100340101)
e2:SetTarget(c100340001.thtg)
e2:SetOperation(c100340001.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c100340001.rmtarget)
e4:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e4:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e4)
end
function c100340001.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2f)
end
function c100340001.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100340001.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100340001.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 c100340001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100340001.thfilter(c,e)
return c:IsSetCard(0x2f) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100340001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100340001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100340001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100340001.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 c100340001.rmtarget(e,c)
return c:GetOriginalType()&(TYPE_SPELL+TYPE_TRAP)~=0 and c:GetOwner()~=e:GetHandlerPlayer()
end
--氷結界に至る晴嵐
--
--Script by 龙骑
function c100340026.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,100340026+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100340026.cost)
e1:SetTarget(c100340026.target)
e1:SetOperation(c100340026.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100340026,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100340126)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100340026.thtg)
e2:SetOperation(c100340026.thop)
c:RegisterEffect(e2)
end
function c100340026.rfilter(c,ft,tp)
return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c100340026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c100340026.rfilter,1,nil,ft,tp) end
local maxc=10
if Duel.IsPlayerAffectedByEffect(tp,59822133) then maxc=1 end
local g=Duel.SelectReleaseGroup(tp,c100340026.rfilter,1,maxc,nil,ft,tp)
e:SetLabel(g:GetCount())
Duel.Release(g,REASON_COST)
end
function c100340026.filter(c,e,tp)
return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100340026.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100340026.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100340026.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c100340026.filter,tp,LOCATION_DECK,0,nil,e,tp)
local ct=e:GetLabel()
if ft<ct or ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if sg and #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100340026.thfilter(c)
return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToHand()
end
function c100340026.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c100340026.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100340026.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c100340026.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c100340026.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
\ No newline at end of file
...@@ -53,4 +53,3 @@ function c100340203.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,4 +53,3 @@ function c100340203.lvop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
--Myutant Cry
--
--Script by JoyJ
function c101102000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102000)
e1:SetCondition(c101102000.condition)
e1:SetTarget(c101102000.target)
e1:SetOperation(c101102000.activate)
c:RegisterEffect(e1)
end
function c101102000.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101102000.filter0(c)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c101102000.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c101102000.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x258) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101102000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c101102000.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c101102000.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101102000.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c101102000.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102000.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c101102000.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101102000.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,2,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--Mahaama the Fairy Dragon
--
--Script by JoyJ
function c101102081.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102081,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DAMAGE)
e1:SetCondition(c101102081.sumcon)
e1:SetTarget(c101102081.sumtg)
e1:SetOperation(c101102081.sumop)
c:RegisterEffect(e1)
end
function c101102081.sumcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_BATTLE)>0 and ep==tp
end
function c101102081.sumtg(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 c101102081.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_EFFECT)
local opt=Duel.SelectOption(tp,aux.Stringid(101102081,0),aux.Stringid(101102081,1))
if opt==0 then
Duel.Recover(tp,ev,REASON_EFFECT)
else
Duel.Damage(1-tp,ev,REASON_EFFECT)
end
end
end
\ No newline at end of file
--Jabbing Panda
--
--Script by JoyJ
function c101102082.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101102082)
e1:SetCondition(c101102082.spcon)
c:RegisterEffect(e1)
--add atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c101102082.tgcon)
e2:SetTarget(c101102082.tgtg)
e2:SetOperation(c101102082.tgop)
c:RegisterEffect(e2)
end
function c101102082.spfilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR)
end
function c101102082.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c101102082.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,nil)
end
function c101102082.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c101102082.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,500)
end
function c101102082.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--Periallis, Empress of Blossoms
--
--Script by JoyJ
function c101102083.initial_effect(c)
--link summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101102083.atkval)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(101102083,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101102083)
e2:SetTarget(c101102083.target)
e2:SetOperation(c101102083.operation)
c:RegisterEffect(e2)
end
function c101102083.atkfilter(c)
return c:IsRace(RACE_PLANT) and c:IsFaceup()
end
function c101102083.atkval(e,c)
return Duel.GetMatchingGroupCount(c101102083.atkfilter,c:GetControler(),LOCATION_MZONE,0,c)*300
end
function c101102083.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and c:IsLevelAbove(5)
end
function c101102083.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101102083.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c101102083.operation(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(c101102083.filter),tp,LOCATION_GRAVE+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
--Myutant M-05
--
--Script by JoyJ
function c101102084.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102084,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101102084)
e1:SetTarget(c101102084.thtg)
e1:SetOperation(c101102084.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102084,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101102084+100)
e3:SetCost(c101102084.spcost)
e3:SetTarget(c101102084.sptg)
e3:SetOperation(c101102084.spop)
c:RegisterEffect(e3)
end
function c101102084.thfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:GetCode()~=101102084
end
function c101102084.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102084.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101102084.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101102084.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 c101102084.spcostexcheckfilter(c,e,tp,code)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(code)
end
function c101102084.spcostexcheck(c,e,tp)
local result=false
if c:IsType(TYPE_MONSTER) then
result=result or Duel.IsExistingMatchingCard(c101102084.spcostexcheckfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,101102087)
end
if c:IsType(TYPE_SPELL) then
result=result or Duel.IsExistingMatchingCard(c101102084.spcostexcheckfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,101102088)
end
if c:IsType(TYPE_TRAP) then
result=result or Duel.IsExistingMatchingCard(c101102084.spcostexcheckfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,101102089)
end
return result
end
function c101102084.spcostfilter(c,e,tp,tc)
local tg=Group.FromCards(c,tc)
return c:IsAbleToRemoveAsCost() and c101102084.spcostexcheck(c,e,tp)
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and Duel.GetMZoneCount(tp,tg)>0
end
function c101102084.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(1)
return Duel.IsExistingMatchingCard(c101102084.spcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp,e:GetHandler())
and e:GetHandler():IsReleasable()
end
Duel.Release(e:GetHandler(),REASON_COST+REASON_RELEASE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cost=Duel.SelectMatchingCard(tp,c101102084.spcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp,e:GetHandler())
e:SetLabel(cost:GetType())
Duel.Remove(cost,POS_FACEUP,REASON_COST)
end
function c101102084.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local label=e:GetLabel()
if label>0 then
e:SetLabel(0)
return true
end
return false
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101102084.spopfilter(c,e,tp,typ)
return (((typ & TYPE_MONSTER)>0 and c:IsCode(101102087))
or ((typ & TYPE_SPELL)>0 and c:IsCode(101102088))
or ((typ & TYPE_TRAP)>0 and c:IsCode(101102089)))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101102084.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local typ = e:GetLabel()
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101102084.spopfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,typ)
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Myutant ST-46
--
--Script by JoyJ
function c101102085.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102085,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101102085)
e1:SetTarget(c101102085.thtg)
e1:SetOperation(c101102085.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102085,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101102085+100)
e3:SetCost(c101102085.spcost)
e3:SetTarget(c101102085.sptg)
e3:SetOperation(c101102085.spop)
c:RegisterEffect(e3)
end
function c101102085.thfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and c:GetCode()~=101102085
end
function c101102085.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102085.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101102085.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101102085.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 c101102085.spcostexcheckfilter(c,e,tp,code)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(code)
end
function c101102085.spcostexcheck(c,e,tp)
local result=false
if c:IsType(TYPE_MONSTER) then
result=result or Duel.IsExistingMatchingCard(c101102085.spcostexcheckfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,101102087)
end
if c:IsType(TYPE_SPELL) then
result=result or Duel.IsExistingMatchingCard(c101102085.spcostexcheckfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,101102088)
end
if c:IsType(TYPE_TRAP) then
result=result or Duel.IsExistingMatchingCard(c101102085.spcostexcheckfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,101102089)
end
return result
end
function c101102085.spcostfilter(c,e,tp,tc)
local tg=Group.FromCards(c,tc)
return c:IsAbleToRemoveAsCost() and c101102085.spcostexcheck(c,e,tp)
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and Duel.GetMZoneCount(tp,tg)>0
end
function c101102085.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(1)
return Duel.IsExistingMatchingCard(c101102085.spcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp,e:GetHandler())
and e:GetHandler():IsReleasable()
end
Duel.Release(e:GetHandler(),REASON_COST+REASON_RELEASE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cost=Duel.SelectMatchingCard(tp,c101102085.spcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp,e:GetHandler())
e:SetLabel(cost:GetType())
Duel.Remove(cost,POS_FACEUP,REASON_COST)
end
function c101102085.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local label=e:GetLabel()
if label>0 then
e:SetLabel(0)
return true
end
return false
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101102085.spopfilter(c,e,tp,typ)
return (((typ & TYPE_MONSTER)>0 and c:IsCode(101102087))
or ((typ & TYPE_SPELL)>0 and c:IsCode(101102088))
or ((typ & TYPE_TRAP)>0 and c:IsCode(101102089)))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101102085.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local typ = e:GetLabel()
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101102085.spopfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,typ)
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Myutant GB-88
--
--Script by JoyJ
function c101102086.initial_effect(c)
--self spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102086,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101102086)
e1:SetCondition(c101102086.spcon)
e1:SetTarget(c101102086.sptg)
e1:SetOperation(c101102086.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102086,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101102086+100)
e2:SetTarget(c101102086.sp2cost)
e2:SetTarget(c101102086.sp2tg)
e2:SetOperation(c101102086.sp2op)
c:RegisterEffect(e2)
end
function c101102086.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101102086.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101102086.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c101102086.sp2costfilter(c)
return c:IsAbleToRemoveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function c101102086.sp2cost(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.Release(e:GetHandler(),REASON_COST+REASON_RELEASE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cost=Duel.SelectMatchingCard(tp,c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.Remove(cost,POS_FACEUP,REASON_COST)
end
function c101102086.sp2tgfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsSetCard(0x258) and c:IsLevel(8)
end
function c101102086.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102086.sp2tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c101102086.sp2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101102086.sp2costfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--Myutant Beast
--
--Script by JoyJ
function c101102087.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c101102087.splimit)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101102087.ctval)
c:RegisterEffect(e2)
--draw card
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101102087)
e3:SetCondition(c101102087.drcon)
e3:SetCost(c101102087.drcost)
e3:SetTarget(c101102087.drtg)
e3:SetOperation(c101102087.drop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,101102087+100)
e4:SetCondition(c101102087.thcon)
e4:SetTarget(c101102087.thtg)
e4:SetOperation(c101102087.thop)
c:RegisterEffect(e4)
end
function c101102087.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x258)
end
function c101102087.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_MONSTER)>0
end
function c101102087.drcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev)
end
function c101102087.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101102087.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,REASON_COST)
end
function c101102087.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c101102087.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
function c101102087.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp
end
function c101102087.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101102087.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102087.thtgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102087.thtgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101102087.thtgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101102087.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--Myutant Mist
--
--Script by JoyJ
function c101102088.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c101102088.splimit)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101102088.ctval)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,101102088)
e3:SetCondition(c101102088.negcon)
e3:SetCost(c101102088.negcost)
e3:SetTarget(c101102088.negtg)
e3:SetOperation(c101102088.negop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,101102088+100)
e4:SetCondition(c101102088.thcon)
e4:SetTarget(c101102088.thtg)
e4:SetOperation(c101102088.thop)
c:RegisterEffect(e4)
end
function c101102088.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x258)
end
function c101102088.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_SPELL)>0
end
function c101102088.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c101102088.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101102088.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,REASON_COST)
end
function c101102088.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c101102088.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c101102088.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp
end
function c101102088.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c101102088.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102088.thtgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102088.thtgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101102088.thtgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101102088.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--Myutant Arsenal
--
--Script by JoyJ
function c101102089.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c101102089.splimit)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101102089.ctval)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101102089)
e3:SetCondition(c101102089.rmcon)
e3:SetCost(c101102089.rmcost)
e3:SetTarget(c101102089.rmtg)
e3:SetOperation(c101102089.rmop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,101102089+100)
e4:SetCondition(c101102089.thcon)
e4:SetTarget(c101102089.thtg)
e4:SetOperation(c101102089.thop)
c:RegisterEffect(e4)
end
function c101102089.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x258)
end
function c101102089.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_MONSTER)>0
end
function c101102089.rmcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c101102089.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101102089.rmcostfilter2(c,e)
return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e)
end
function c101102089.rmcostfilter(c,e)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101102089.rmcostfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c101102089.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e) end
local g=Duel.SelectMatchingCard(tp,c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e)
Duel.Remove(g,REASON_COST)
end
function c101102089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
function c101102089.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(re) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c101102089.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp
end
function c101102089.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c101102089.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102089.thtgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102089.thtgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101102089.thtgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101102089.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--Myutant Synthesis
--
--Script by JoyJ
function c101102090.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c101102090.ffilter,2,true)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102090,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101102090)
e1:SetCondition(c101102090.descon)
e1:SetTarget(c101102090.destg)
e1:SetOperation(c101102090.desop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102090,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101102090+100)
e2:SetCondition(c101102090.immcon)
e2:SetOperation(c101102090.immop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102090,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,101102090+200)
e3:SetCondition(c101102090.thcon)
e3:SetTarget(c101102090.thtg)
e3:SetOperation(c101102090.thop)
c:RegisterEffect(e3)
end
function c101102090.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x258) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c101102090.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c101102090.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTORY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101102090.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c101102090.immcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c101102090.immop(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_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(c101102090.efilter)
e1:SetLabel(re:GetActiveType())
c:RegisterEffect(e1)
end
end
function c101102090.efilter(e,te)
return te:IsActiveType(e:GetLabel()) and te:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function c101102090.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c101102090.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x258)
end
function c101102090.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102090.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c101102090.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102090.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--Myutant Ultimus
--
--Script by JoyJ
function c101102091.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c101102091.ffilter,3,true)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102091,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetCode(EVENT_CHAINING)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCountLimit(1,101102091)
e1:SetCondition(c101102091.negcon)
e1:SetCost(c101102091.negcost)
e1:SetTarget(c101102091.negtg)
e1:SetOperation(c101102091.negop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102090,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,101102091+100)
e2:SetCondition(c101102091.thcon)
e2:SetTarget(c101102091.thtg)
e2:SetOperation(c101102091.thop)
c:RegisterEffect(e2)
end
function c101102091.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x258) and c:IsLevelAbove(8)
end
function c101102091.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsChainNegatable(ev)
end
function c101102091.cfilter(c,re)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsAbleToRemoveAsCost()
and c:IsType(re:GetActiveType())
end
function c101102091.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102091.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,re) end
local g=Duel.SelectMatchingCard(tp,c101102091.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,re)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101102091.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c101102091.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c101102091.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c101102091.thfilter(c,typ)
return c:IsAbleToHand() and c:IsSetCard(0x258)
end
function c101102091.gcheck(g)
return g:GetClassCount(Card.GetType)==#g
end
function c101102091.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102091.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_REMOVED)
end
function c101102091.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101102091.thfilter,tp,LOCATION_REMOVED,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,c101102091.gcheck,false,1,3)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--Myutant Evolution Lab
--
--Script by JoyJ
function c101102092.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,101102092+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101102092.activate)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19))
e2:SetValue(c101102092.atkval)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102092,0))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c101102092.drtg)
e3:SetOperation(c101102092.drop)
c:RegisterEffect(e3)
end
function c101102092.atkvalfilter(c)
return c:IsFaceup() and c:IsSetCard(0x258)
end
function c101102092.atkval(e,c)
local tp=e:GetHandler():GetControler()
return Duel.GetMatchingGroupCount(c101102092.atkvalfilter,tp,LOCATION_REMOVED,0,nil)*100
end
function c101102092.thfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function c101102092.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if not Duel.GetMZoneCount(tp)>0 then return end
local g=Duel.SelectMatchingCard(tp,c101102092.thfilter,tp,LOCATION_HAND+LOCATION_REMOVED,1,1,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102092,0)) then
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
function c101102092.drtgfilter(c)
return c:IsAbleToDeck() and c:IsSetCard(0x258)
end
function c101102092.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c101102092.drtgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101102092.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101102092.drtgfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
end
end
--Myutant Fusion
--
--Script by JoyJ
function c101102093.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102093+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101102093.target)
e1:SetOperation(c101102093.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c101102093.regop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c101102093.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c101102093.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c101102093.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x258) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101102093.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c101102093.fcheck(tp,sg,fc)
return (sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and fc:IsLocation(LOCATION_DECK)) and (sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 and fc:IsLocation(LOCATION_GRAVE))
end
function c101102093.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
end
function c101102093.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if e:GetLabel()==Duel.GetTurnCount() then
local mg2=Duel.GetMatchingGroup(c101102093.filter0,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=c87931906.fcheck
Auxiliary.GCheckAdditional=c87931906.gcheck
end
end
local res=Duel.IsExistingMatchingCard(c101102093.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101102093.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101102093.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101102093.filter1,nil,e)
local exmat=false
if Duel.IsExistingMatchingCard(c101102093.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c101102093.filter0,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
exmat=true
end
end
if exmat then
Auxiliary.FCheckAdditional=c101102093.fcheck
Auxiliary.GCheckAdditional=c101102093.gcheck
end
local sg1=Duel.GetMatchingGroup(c101102093.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101102093.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
Auxiliary.FCheckAdditional=c101102093.fcheck
Auxiliary.GCheckAdditional=c101102093.gcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c101102093.regop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
e:GetLabelObject():SetLabel(Duel.GetTurnCount())
end
\ No newline at end of file
--Myutant Blast
--
--Script by JoyJ
function c101102094.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c101102094.target)
e1:SetOperation(c101102094.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c101102094.eqlimit)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102094,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c101102094.rmcon)
e3:SetTarget(c101102094.rmtg)
e3:SetOperation(c101102094.rmop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101102094,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,101102094)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c101102094.sptg)
e4:SetOperation(c101102094.spop)
c:RegisterEffect(e4)
end
function c101102094.eqlimit(e,c)
return c:IsSetCard(0x258) and e:GetHandler():IsControler(c:GetControler()) and c:IsLevelAbove(8)
end
function c101102094.filter(c)
return c:IsFaceup() and c:IsSetCard(0x258) and c:IsLevelAbove(8)
end
function c101102094.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101102094.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102094.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101102094.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101102094.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c101102094.rmcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
return ec and tc and Duel.GetAttacker()==ec and tc:IsSummonType(SUMMON_TYPE_SPECIAL)
and tc:IsControler(1-tp)
end
function c101102094.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=ec:GetBattleTarget()
if chk==0 then return tc and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c101102094.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c101102094.sptgfilter(c,e,tp,attr)
return c:GetOriginalAttribute()~=attr and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101102094.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget()
if chk==0 then
e:SetLabelObject(tc)
return tc and tc:IsAbleToGrave() and Duel.IsExistingMatchingCard(c101102094.sptgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,tc:GetOriginalAttribute())
end
tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c101102094.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102094.spopfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,tc:GetOriginalAttribute())
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--Myutant Clash
--
--Script by JoyJ
function c101102095.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102095,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102095+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101102095.target)
e1:SetOperation(c101102095.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102095,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101102095+EFFECT_COUNT_CODE_OATH)
e2:SetOperation(c101102095.activate)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102095,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101102095+100)
e3:SetCondition(c101102095.drcon)
e3:SetTarget(c101102095.drtg)
e3:SetOperation(c101102095.drop)
c:RegisterEffect(e3)
end
function c101102095.tgfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsDisabled()
end
function c101102095.tgfilter2(c)
return c:IsSetCard(0x258) and c:IsAbleToRemove()
end
function c101102095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c101102095.tgfilter(chkc) and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingMatchingCard(c101102095.tgfilter2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(c101102095.tgfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101102095.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c101102095.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101102095.tgfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
function c101102095.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=Duel.GetAttacker()
local bc=ec:GetBattleTarget()
return ec:IsSetCard(0x258) and ec:IsControler(tp) and bc:IsControler(1-tp)
end
function c101102095.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101102095.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--Myutant Expansion
--
--Script by JoyJ
function c101102096.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102096+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101102096.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c101102096.reptg)
e2:SetValue(c101102096.repval)
e2:SetOperation(c101102096.repop)
c:RegisterEffect(e2)
end
function c101102096.filter(c,e,tp,zone)
return c:IsSetCard(0x258) and c:IsLevelBelow(4)
and ((zone and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or c:IsAbleToHand())
and (c:IsFaceup() or c:IsLocation(LOCATION_DECK))
end
function c101102096.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101102096.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil,Duel.GetMZoneCount(tp)>0)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102096,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=g:Select(tp,1,1,nil)
local opt=0
if not tc:IsAbleToHand() then
opt=0
elseif not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
opt=1
else
opt=Duel.SelectOption(tp,1190,1152)
end
if opt==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c101102096.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x258) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c101102096.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c101102096.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101102096.repval(e,c)
return c101102096.repfilter(c,e:GetHandlerPlayer())
end
function c101102096.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--スプリガンズ・ロッキー
--Scripted by mallu11
function c101103006.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103006,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101103006)
e1:SetTarget(c101103006.thtg)
e1:SetOperation(c101103006.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--overlay
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103006,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,101103106)
e3:SetTarget(c101103006.ovtg)
e3:SetOperation(c101103006.ovop)
c:RegisterEffect(e3)
end
function c101103006.thfilter(c)
return (c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) or c:IsCode(101103055)) and not c:IsCode(101103006) and c:IsAbleToHand()
end
function c101103006.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103006.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103006.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101103006.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101103006.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
function c101103006.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103006.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103006.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103006.ovfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103006.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c101103006.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--スプリガンズ・ピード
--Scripted by mallu11
function c101103007.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103007)
e1:SetCost(c101103007.spcost)
e1:SetTarget(c101103007.sptg)
e1:SetOperation(c101103007.spop)
c:RegisterEffect(e1)
--overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103007,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,101103107)
e2:SetTarget(c101103007.ovtg)
e2:SetOperation(c101103007.ovop)
c:RegisterEffect(e2)
end
function c101103007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101103007.spfilter(c,e,tp)
return c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) and not c:IsCode(101103007) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103007.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingTarget(c101103007.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103007.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103007.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 c101103007.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103007.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103007.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103007.ovfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103007.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c101103007.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--スプリガンズ・バンガー
--Scripted by mallu11
function c101103008.initial_effect(c)
--overlay
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103008,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCountLimit(1,101103008)
e1:SetTarget(c101103008.ovtg)
e1:SetOperation(c101103008.ovop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103008,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101103108)
e2:SetCost(c101103008.thcost)
e2:SetTarget(c101103008.thtg)
e2:SetOperation(c101103008.thop)
c:RegisterEffect(e2)
end
function c101103008.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103008.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103008.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103008.ovfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103008.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c101103008.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c101103008.costfilter(c)
return c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) and not c:IsCode(101103008) and c:IsAbleToRemoveAsCost()
end
function c101103008.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101103008.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101103008.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101103008.thfilter(c)
return c:IsSetCard(0x257) and c:IsAbleToHand()
end
function c101103008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101103008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103008.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 mallu11
function c101103009.initial_effect(c)
--overlay
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103009,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCountLimit(1,101103009)
e1:SetTarget(c101103009.ovtg)
e1:SetOperation(c101103009.ovop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103009,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103109)
e2:SetCondition(c101103009.descon)
e2:SetCost(c101103009.descost)
e2:SetTarget(c101103009.destg)
e2:SetOperation(c101103009.desop)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103009,2))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(500)
e3:SetCondition(c101103009.gfcon)
c:RegisterEffect(e3)
end
function c101103009.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103009.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103009.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103009.ovfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103009.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c101103009.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c101103009.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c101103009.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c101103009.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103009.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
function c101103009.gfcon(e)
return e:GetHandler():IsSetCard(0x257)
end
--鉄獣戦線 キット
function c101103010.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103010)
e1:SetCost(c101103010.spcost)
e1:SetTarget(c101103010.sptg)
e1:SetOperation(c101103010.spop)
c:RegisterEffect(e1)
--send to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103010,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103110)
e2:SetTarget(c101103010.tgtg)
e2:SetOperation(c101103010.tgop)
c:RegisterEffect(e2)
end
function c101103010.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c101103010.cfilter(c)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAbleToRemoveAsCost()
end
function c101103010.fselect(g,tg)
return tg:IsExists(Card.IsLink,1,nil,#g)
end
function c101103010.spfilter(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c101103010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(c101103010.cfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(c101103010.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local _,maxlink=tg:GetMaxGroup(Card.GetLink)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
if #tg==0 then return false end
return cg:CheckSubGroup(c101103010.fselect,1,maxlink,tg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=cg:SelectSubGroup(tp,c101103010.fselect,false,1,maxlink,tg)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
e:SetLabel(rg:GetCount())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101103010.spfilter1(c,e,tp,lk)
return c101103010.spfilter(c,e,tp) and c:IsLink(lk)
end
function c101103010.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)))
e1:SetValue(c101103010.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local lk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103010.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103010.sumlimit(e,c)
if not c then return false end
return c:IsControler(e:GetHandlerPlayer())
end
function c101103010.tgfilter(c)
return c:IsSetCard(0x14d) and not c:IsCode(101103010) and c:IsAbleToGrave()
end
function c101103010.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103010.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101103010.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103010.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--S-Force 乱破小夜丸
--Scripted by mallu11
function c101103011.initial_effect(c)
--attack limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c101103011.attg)
e1:SetValue(c101103011.atlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c101103011.attg)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103011,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,101103011)
e3:SetCost(c101103011.spcost)
e3:SetTarget(c101103011.sptg)
e3:SetOperation(c101103011.spop)
c:RegisterEffect(e3)
end
function c101103011.atfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x259) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c101103011.attg(e,c)
local cg=c:GetColumnGroup()
e:SetLabelObject(c)
return cg:IsExists(c101103011.atfilter,1,nil,e:GetHandlerPlayer())
end
function c101103011.atlimit(e,c)
local lc=e:GetLabelObject()
return not lc:GetColumnGroup():IsContains(c)
end
function c101103011.costfilter(c)
return c:IsSetCard(0x259) and c:IsAbleToRemoveAsCost()
end
function c101103011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103011.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101103011.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101103011.spfilter(c,e,tp)
return c:IsSetCard(0x259) and not c:IsCode(101103011) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101103011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c101103011.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101103011.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetMZoneCount(tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
--S-Force プロフェッサー・Ϝ
--Scripted by mallu11
function c101103012.initial_effect(c)
--position change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103012,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101103012)
e1:SetTarget(c101103012.postg)
e1:SetOperation(c101103012.posop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--position change limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c101103012.chtg)
c:RegisterEffect(e3)
end
function c101103012.posfilter(c)
return c:IsFaceup() and c:IsCanChangePosition()
end
function c101103012.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101103012.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103012.posfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c101103012.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c101103012.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c101103012.chfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x259) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c101103012.chtg(e,c)
local cg=c:GetColumnGroup()
return cg:IsExists(c101103012.chfilter,1,nil,e:GetHandlerPlayer())
end
--S-Force オリフィス
--Scripted by mallu11
function c101103013.initial_effect(c)
--can not be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c101103013.ettg)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103013,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101103013)
e2:SetCondition(c101103013.descon)
e2:SetCost(c101103013.descost)
e2:SetTarget(c101103013.destg)
e2:SetOperation(c101103013.desop)
c:RegisterEffect(e2)
end
function c101103013.etfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x259) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c101103013.ettg(e,c)
local cg=c:GetColumnGroup()
return cg:IsExists(c101103013.etfilter,1,nil,e:GetHandlerPlayer())
end
function c101103013.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
function c101103013.costfilter(c)
return c:IsSetCard(0x259) and c:IsAbleToRemoveAsCost()
end
function c101103013.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103013.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101103013.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101103013.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c101103013.desop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--S-Force グラビティーノ
--Scripted by mallu11
function c101103014.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103014,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101103014)
e1:SetTarget(c101103014.thtg)
e1:SetOperation(c101103014.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--redirect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c101103014.rmtg)
e3:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e3)
end
function c101103014.thfilter(c)
return c:IsSetCard(0x259) and not c:IsCode(101103014) and c:IsAbleToHand()
end
function c101103014.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103014.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101103014.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103014.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101103014.rmfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x259) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c101103014.rmtg(e,c)
local cg=c:GetColumnGroup()
return cg:IsExists(c101103014.rmfilter,1,nil,e:GetHandlerPlayer())
end
--S-Force プラ=ティナ
--Scripted by mallu11
function c101103015.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101103015)
e1:SetTarget(c101103015.sptg)
e1:SetOperation(c101103015.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--attack down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c101103015.atktg)
e3:SetValue(-600)
c:RegisterEffect(e3)
end
function c101103015.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x259) and not c:IsCode(101103015) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103015.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101103015.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101103015.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103015.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103015.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 c101103015.atkfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x259) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c101103015.atktg(e,c)
local cg=c:GetColumnGroup()
return cg:IsExists(c101103015.atkfilter,1,nil,e:GetHandlerPlayer())
end
--パラメタルフォーゼ・メルキャスター
--Parametalfoes Melcaster
--Script by TheOnePharaoh
function c101103020.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destroy and set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103020,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c101103020.target)
e1:SetOperation(c101103020.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103020,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,101103020)
e2:SetCondition(c101103020.thcon)
e2:SetTarget(c101103020.thtg)
e2:SetOperation(c101103020.thop)
c:RegisterEffect(e2)
end
function c101103020.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c101103020.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c101103020.filter,tp,LOCATION_DECK,0,1,nil,false)
end
end
function c101103020.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end
function c101103020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101103020.desfilter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c101103020.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101103020.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103020.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c101103020.filter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
end
function c101103020.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c101103020.thfilter(c)
return c:IsSetCard(0xe1) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsCode(101103020) and c:IsAbleToHand()
end
function c101103020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103020.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c101103020.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103020.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local code=g:GetFirst():GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101103020.aclimit)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c101103020.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel())
end
--メタルフォーゼ・バニッシャー
--
--Script by 龙骑
function c101103021.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destroy and set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103021,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101103021)
e1:SetCondition(c101103021.condition)
e1:SetTarget(c101103021.target)
e1:SetOperation(c101103021.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103021,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101103121)
e2:SetTarget(c101103021.sptg)
e2:SetOperation(c101103021.spop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101103221)
e3:SetCondition(c101103021.rmcon)
e3:SetTarget(c101103021.rmtg)
e3:SetOperation(c101103021.rmop)
c:RegisterEffect(e3)
end
function c101103021.desfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
end
function c101103021.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103021.desfilter,1,nil,tp)
end
function c101103021.thfilter(c)
return c:IsSetCard(0xe1) and not c:IsCode(101103021) and c:IsAbleToHand()
end
function c101103021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103021.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c101103021.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101103021.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101103021.filter(c,e)
return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end
function c101103021.fselect(g,tp)
return g:IsExists(Card.IsSetCard,1,nil,0xe1) and Duel.GetMZoneCount(tp,g)>0
end
function c101103021.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c101103021.filter,tp,LOCATION_ONFIELD,0,nil,e)
if chk==0 then return g:CheckSubGroup(c101103021.fselect,2,2,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:SelectSubGroup(tp,c101103021.fselect,false,2,2,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101103021.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103021.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xe1)
end
function c101103021.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function c101103021.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c101103021.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103021.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c101103021.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101103021.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--セイクリッド・カドケウス
--Constellar Caduceus
--Scripted by Gecko-chan
function c101103022.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101103022)
e1:SetCondition(c101103022.spcon)
e1:SetTarget(c101103022.sptg)
e1:SetOperation(c101103022.spop)
c:RegisterEffect(e1)
--Search Spell/Trap
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103022,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101103022+100)
e2:SetTarget(c101103022.srtg)
e2:SetOperation(c101103022.srop)
c:RegisterEffect(e2)
--Unclassified Effect as material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103022,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetCondition(c101103022.mcon)
e3:SetTarget(c101103022.mtg)
e3:SetOperation(c101103022.mop)
c:RegisterEffect(e3)
end
--Modified from Bluebeard, the Plunder Patroll Shipwright
function c101103022.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x53) and not c:IsCode(101103022)
end
function c101103022.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101103022.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101103022.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 c101103022.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--Modified from Nemeses Flag
function c101103022.srfilter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101103022.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103022.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101103022.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103022.srfilter,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
--Modified from Gagaga Magician and Supreme King Dragon Clear Wing
function c101103022.mcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) and c:IsRelateToBattle() and bc and bc:IsFaceup()
and bc:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and bc:IsRelateToBattle()
end
function c101103022.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc and bc:IsRelateToBattle() and bc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function c101103022.mop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc and bc:IsRelateToBattle() then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
--電子光虫-レジストライダー
--
--小花ソノガミ
function c101103023.initial_effect(c)
--Xyz の制限
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c101103023.xyzlimit)
c:RegisterEffect(e0)
--スペシャル召喚と両方のモンスターは、そのレベルを増加させます
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103023,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c101103023.spcon)
e1:SetTarget(c101103023.sptg)
e1:SetOperation(c101103023.spop)
c:RegisterEffect(e1)
--それ自体の後にSP変更1戦闘位置
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103023,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c101103023.postg)
e2:SetOperation(c101103023.posop)
c:RegisterEffect(e2)
--ゲインズ 1000 ATK/DEF
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c101103023.efcon)
e3:SetOperation(c101103023.efop)
c:RegisterEffect(e3)
end
--サモンリミット
function c101103023.xyzlimit(e,c)
if not c then return false end
return not c:IsRace(RACE_INSECT)
end
--スペシャル召喚
function c101103023.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ep==tp and ec:GetLevel()==3 and ec:IsRace(RACE_INSECT)
end
function c101103023.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101103023.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(101103023,2)) then
local g=Group.FromCards(c,tc):Filter(Card.IsFaceup,nil,nil)
local lv=Duel.AnnounceLevel(tp,5,7,6)
for oc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
oc:RegisterEffect(e1)
end
end
end
--戦闘位置の変更
function c101103023.posfilter(c)
return c:IsRace(RACE_INSECT) and c:IsFaceup()
end
function c101103023.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103023.spfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function c101103023.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c101103023.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
end
end
--ゲイン効果
function c101103023.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c101103023.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
rc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
rc:RegisterEffect(e2)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
end
--光天のマハー・ヴァイロ
--Lightsky Maha Vailo
--Script by: XGlitchy30
function c101103024.initial_effect(c)
--atk boost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(1)
e1:SetCondition(c101103024.eqcon)
e1:SetValue(c101103024.atkval)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetLabel(2)
e2:SetCondition(c101103024.eqcon)
e2:SetValue(c101103024.actlimit)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(3)
e3:SetCondition(c101103024.eqcon)
e3:SetCost(c101103024.negcost)
e3:SetTarget(c101103024.negtg)
e3:SetOperation(c101103024.negop)
c:RegisterEffect(e3)
--actlimit2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetTargetRange(0,1)
e4:SetLabel(4)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c101103024.eqcon)
e4:SetValue(1)
c:RegisterEffect(e4)
--double damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e5:SetLabel(5)
e5:SetCondition(c101103024.eqcon)
e5:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e5)
end
function c101103024.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lab=e:GetLabel()
if c:GetEquipCount()<lab then return false end
if (lab==2 or lab==4) then
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
elseif lab==3 then
if rp==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
return false
end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsContains(c) and Duel.IsChainDisablable(ev)
else
return true
end
end
function c101103024.atkval(e,c)
return c:GetEquipCount()*1000
end
function c101103024.actlimit(e,re,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c101103024.negfilter(c)
return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c101103024.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103024.negfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103024.negfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101103024.negtg(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 c101103024.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--戦華の叛-呂奉
--
--Script by JustFish
function c101103025.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,101103025+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c101103025.spcon)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103025,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c101103025.descost)
e3:SetCondition(c101103025.descon)
e3:SetTarget(c101103025.destg)
e3:SetOperation(c101103025.desop)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103025,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_CONTROL)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c101103025.ctlcon)
e4:SetTarget(c101103025.ctltg)
e4:SetOperation(c101103025.ctlop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(101103025,ACTIVITY_CHAIN,c101103025.chainfilter)
end
function c101103025.chainfilter(re,tp,cid)
local rc=re:GetHandler()
return rc:IsSetCard(0x137) or not re:IsActiveType(TYPE_MONSTER)
end
function c101103025.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x137)
end
function c101103025.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c101103025.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return false end
local tg=g:GetMaxGroup(Card.GetAttack)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tg:IsExists(Card.IsControler,1,nil,tp)
end
function c101103025.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101103025,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101103025.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101103025.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x137) and re:IsActiveType(TYPE_MONSTER)
end
function c101103025.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c101103025.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tg=g:GetMaxGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function c101103025.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #g>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
else Duel.Destroy(tg,REASON_EFFECT) end
end
end
function c101103025.ctlcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return false end
local tg=g:GetMaxGroup(Card.GetAttack)
return tg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c101103025.ctltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end
function c101103025.ctlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.GetControl(c,1-tp)
end
end
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
-- --
--Script by JustFish --Script by JustFish
function c101103026.initial_effect(c) function c101103026.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103026,0)) e1:SetDescription(aux.Stringid(101103026,0))
......
--マシンナーズ・アンクラスペア
--
--脚本:小花園神
function c101103027.initial_effect(c)
--スペシャル召喚
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103027,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,101103027)
e1:SetCondition(c101103027.spcon)
e1:SetTarget(c101103027.sptg)
e1:SetOperation(c101103027.spop)
c:RegisterEffect(e1)
--埋葬
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103027,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,101103027+100)
e2:SetTarget(c101103027.tgtg)
e2:SetOperation(c101103027.tgop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
--スペシャル召喚
function c101103027.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function c101103027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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 c101103027.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
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101103027.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101103027.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
--埋葬
function c101103027.tgfilter(c)
return c:IsSetCard(0x36) and c:IsType(TYPE_MONSTER) and not c:IsCode(101103027) and c:IsAbleToGrave()
end
function c101103027.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103027.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101103027.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103027.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--Live☆Twin リィラ・トリート
--
--Script by JustFish
function c101103028.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101103028+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101103028.spcon)
c:RegisterEffect(e1)
--attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103028,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101103128)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c101103028.atkcon)
e2:SetTarget(c101103028.atktg)
e2:SetOperation(c101103028.atkop)
c:RegisterEffect(e2)
end
function c101103028.filter(c)
return c:IsFaceup() and c:IsSetCard(0x152)
end
function c101103028.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c101103028.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c101103028.cfilter(c)
local bc=c:GetBattleTarget()
return c:IsSetCard(0x2151) or (bc and bc:IsSetCard(0x2151))
end
function c101103028.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103028.cfilter,1,nil)
end
function c101103028.atkfilter(c)
return c:IsFaceup() and c:GetAttack()~=0
end
function c101103028.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101103028.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103028.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101103028.atkfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c101103028.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-ev)
tc:RegisterEffect(e1)
end
end
--風の天翼ミラドーラ
--
--Script by 龙骑
function c101103029.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103029,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101103129)
e1:SetCondition(c101103029.spcon)
e1:SetTarget(c101103029.sptg)
e1:SetOperation(c101103029.spop)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103029,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101103029)
e2:SetCondition(c101103029.actcon)
e2:SetTarget(c101103029.acttg)
e2:SetOperation(c101103029.actop)
c:RegisterEffect(e2)
end
function c101103029.cfilter(c,tp)
return bit.band(c:GetSummonLocation(),LOCATION_EXTRA)==LOCATION_EXTRA and c:GetSummonPlayer()==1-tp and c:GetAttack()>2000
end
function c101103029.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103029.cfilter,1,nil,tp)
end
function c101103029.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 c101103029.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c101103029.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c101103029.filter(c)
return c:IsFaceup() and c:GetSummonLocation()==LOCATION_EXTRA
end
function c101103029.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101103029.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103029.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101103029.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c101103029.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c101103029.ctcon)
tc:RegisterEffect(e1)
end
end
function c101103029.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
\ No newline at end of file
--妖精弓士イングナル
--Fairy Archer Ingunar
--Script by: XGlitchy30
--aux.Stringid Guide for whoever edits the cdb:
--0=Special Summon
--1=Affected by the effect of "Fairy Archer Ingunar"
function c101103030.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103030,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101103030)
e1:SetCondition(c101103030.spcon)
e1:SetTarget(c101103030.sptg)
e1:SetOperation(c101103030.spop)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c101103030.atklimit)
c:RegisterEffect(e2)
end
function c101103030.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_PLANT)
end
function c101103030.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsLevelAbove(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101103030.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103030.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101103030.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103030.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103030.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(101103030,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101103030.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c101103030.splimit(e,c,tp,sumtp,sumpos)
return not c:IsRace(RACE_PLANT)
end
function c101103030.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
--契珖のヴルーレセンス
--
--Script by 龙骑
function c101103031.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103031,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c101103031.tgcon)
e1:SetCost(c101103031.tgcost)
e1:SetTarget(c101103031.tgtg)
e1:SetOperation(c101103031.tgop)
c:RegisterEffect(e1)
--att dark
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103031,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetTarget(c101103031.atttg)
e2:SetOperation(c101103031.attop)
c:RegisterEffect(e2)
end
function c101103031.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c101103031.tgcost(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 c101103031.filter(c)
return c:IsCode(101103031) and c:IsAbleToGrave()
end
function c101103031.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c101103031.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101103031.tgop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103031.filter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c101103031.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c101103031.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_DARK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
\ No newline at end of file
--ダイカミナリ・ジャイクロプス
--
--Script by 署名傻逼龙骑吧
function c101103032.initial_effect(c)
aux.EnablePendulumAttribute(c)
--Banish
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(LOCATION_REMOVED)
e1:SetCondition(c101103032.rmcon)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103032,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_POSITION)
e2:SetTarget(c101103032.postg)
e2:SetOperation(c101103032.posop)
c:RegisterEffect(e2)
--pos
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103032,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetOperation(c101103032.posop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103032,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_CHANGE_POS)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101103032)
e4:SetTarget(c101103032.destg)
e4:SetOperation(c101103032.desop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,101103032+100)
e5:SetCondition(c101103032.thcon)
e5:SetTarget(c101103032.thtg)
e5:SetOperation(c101103032.thop)
c:RegisterEffect(e5)
end
function c101103032.rmcon(e)
local c=e:GetHandler()
return c:GetSummonLocation()==LOCATION_EXTRA
and bit.band(c:GetReason(),REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO
end
function c101103032.posfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanChangePosition()
end
function c101103032.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101103032.posfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g1=Duel.SelectTarget(tp,c101103032.posfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g2=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,2,0,0)
end
function c101103032.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsCanChangePosition,nil,e)
if tg:GetCount()>0 then
Duel.ChangePosition(tg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c101103032.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
end
end
function c101103032.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c101103032.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c101103032.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103032.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101103032.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103032.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
function c101103032.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_PZONE) and c:IsFaceup()
end
function c101103032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_PZONE)
end
function c101103032.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--天孔邪鬼
--
--Script by 龙骑
function c101103033.initial_effect(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetValue(c101103033.actlimit)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103033,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c101103033.ctcon)
e2:SetTarget(c101103033.cttg)
e2:SetOperation(c101103033.ctop)
c:RegisterEffect(e2)
end
function c101103033.actlimit(e,re,tp)
local rc=re:GetHandler()
local c=e:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsAttribute(c:GetAttribute()) and rc~=c and rc:GetControler()==c:GetControler()
end
function c101103033.ctcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return p==Duel.GetTurnPlayer() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101103033.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end
function c101103033.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetControl(c,1-tp) and Duel.SelectYesNo(tp,aux.Stringid(101103033,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(aat)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--黄紡鮄デュオニギス
--
--Script by Real_Scl
function c101103034.initial_effect(c)
--banish
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103034,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101103034)
e1:SetTarget(c101103034.rmtg)
e1:SetOperation(c101103034.rmop)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103034,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101103134)
e2:SetTarget(c101103034.lvtg)
e2:SetOperation(c101103034.lvop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103034,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,101103234)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c101103034.atktg)
e3:SetOperation(c101103034.atkop)
c:RegisterEffect(e3)
end
function c101103034.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c101103034.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c101103034.cfilter,tp,LOCATION_MZONE,0,nil)
local dg=Duel.GetDecktopGroup(1-tp,ct)
if chk==0 then return ct>0 and ct>0 and dg:FilterCount(Card.IsAbleToRemove,nil)==ct end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,dg,#dg,0,0)
end
function c101103034.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101103034.cfilter,tp,LOCATION_MZONE,0,nil)
local dg=Duel.GetDecktopGroup(1-tp,ct)
if #dg>0 then
Duel.DisableShuffleCheck()
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
end
end
function c101103034.lvfilter(c)
return c:IsLevelBelow(4) and c101103034.cfilter(c)
end
function c101103034.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103034.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103034.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103034.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101103034.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(tc:GetOriginalLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c101103034.cfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c101103034.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103034.cfilter2,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.IsExistingMatchingCard(c101103034.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c101103034.atkop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101103034.cfilter2,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c101103034.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*100)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--ワイトベイキング
--
--Script by 龙骑
function c101103035.initial_effect(c)
aux.AddCodeList(c,32274490)
--change code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(32274490)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_HAND)
e2:SetTarget(c101103035.reptg)
e2:SetValue(c101103035.repval)
e2:SetOperation(c101103035.repop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101103035)
e3:SetTarget(c101103035.thtg)
e3:SetOperation(c101103035.thop)
c:RegisterEffect(e3)
end
function c101103035.repfilter(c,tp)
return c:IsFaceup() and c:IsLevelBelow(3) and c:IsRace(RACE_ZOMBIE) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101103035.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and eg:IsExists(c101103035.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101103035.repval(e,c)
return c101103035.repfilter(c,e:GetHandlerPlayer())
end
function c101103035.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
end
function c101103035.thfilter(c)
return (aux.IsCodeListed(c,32274490) or c:IsCode(32274490)) and not c:IsCode(101103035) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101103035.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c101103035.thfilter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c101103035.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101103035.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg1)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
\ No newline at end of file
--おジャマ・ピンク
--Ojama Pink
--Ejeffers1239
function c101103036.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103036,1))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,101103036)
e1:SetCondition(c101103036.thcon)
e1:SetTarget(c101103036.target)
e1:SetOperation(c101103036.activate)
c:RegisterEffect(e1)
end
function c101103036.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function c101103036.target(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_HANDES,nil,0,PLAYER_ALL,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c101103036.activate(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.Draw(tp,1,REASON_EFFECT)
local h2=Duel.Draw(1-tp,1,REASON_EFFECT)
if h1>0 or h2>0 then Duel.BreakEffect() end
local groundcollapse=false
if h1>0 then
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
local dc=Duel.GetOperatedGroup():GetFirst()
if dc:IsSetCard(0xf) then groundcollapse=true end
end
if h2>0 then
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
if groundcollapse and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(101103036,0)) then
Duel.BreakEffect()
local zone=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
end
--鎧竜の聖騎士
--
--"LUA BY REIKAI"
function c101103037.initial_effect(c)
c:EnableReviveLimit()
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103037,1))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1,1101103037)
e1:SetCondition(c101103037.tdcon)
e1:SetTarget(c101103037.tdtg)
e1:SetOperation(c101103037.tdop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103037,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c101103037.cost)
e2:SetCountLimit(1,101103037)
e2:SetTarget(c101103037.target)
e2:SetOperation(c101103037.activate)
c:RegisterEffect(e2)
end
function c101103037.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:GetSummonLocation()==LOCATION_EXTRA
end
function c101103037.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,bc,1,0,0)
end
function c101103037.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not bc:IsRelateToBattle() then return false end
Duel.SendtoDeck(bc,nil,2,REASON_EFFECT)
end
function c101103037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101103037.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:GetLevel()>=5 and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103037.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103037.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101103037.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,c101103037.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
end
--鉄駆竜スプリンド
--Scripted by mallu11
function c101103038.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,68468459,c101103038.mfilter,1,true,true)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103038,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103038)
e1:SetTarget(c101103038.seqtg)
e1:SetOperation(c101103038.seqop)
c:RegisterEffect(e1)
--to grave
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_TO_GRAVE)
e0:SetOperation(c101103038.regop)
c:RegisterEffect(e0)
--to hand/spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103038,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101103138)
e2:SetCondition(c101103038.thcon)
e2:SetTarget(c101103038.thtg)
e2:SetOperation(c101103038.thop)
c:RegisterEffect(e2)
end
function c101103038.mfilter(c)
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsFusionType(TYPE_EFFECT)
end
function c101103038.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c101103038.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
if c:GetSequence()==seq then
local g=c:GetColumnGroup():Filter(Card.IsFaceup,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101103038,2)) then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c101103038.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(101103038,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c101103038.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101103038)>0
end
function c101103038.thfilter(c,e,tp)
if not (c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) or c:IsCode(68468459)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c101103038.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103038.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c101103038.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c101103038.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--パラメタルフォーゼ・アゾートレス
--Parametalfoes Azothles
--Script by TheOnePharaoh
function c101103039.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xe1),aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),true)
--Pendulum destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103039,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101103039)
e1:SetCondition(c101103039.despcon)
e1:SetTarget(c101103039.desptg)
e1:SetOperation(c101103039.despop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101103139)
e2:SetCondition(c101103039.desmcon)
e2:SetTarget(c101103039.desmtg)
e2:SetOperation(c101103039.desmop)
c:RegisterEffect(e2)
--pendulum
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98452268,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c101103039.pencon)
e5:SetTarget(c101103039.pentg)
e5:SetOperation(c101103039.penop)
c:RegisterEffect(e5)
end
function c101103039.filter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(0xe1)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c101103039.despcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103039.filter,1,nil,tp)
end
function c101103039.desptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103039.despop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c101103039.desmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c101103039.desmfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck()
end
function c101103039.desmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c101103039.desmfilter,tp,LOCATION_EXTRA,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103039.desmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101103039.desmfilter,tp,LOCATION_EXTRA,0,2,2,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c101103039.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c101103039.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c101103039.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--黄金狂エルドリッチ
--
--Script by JustFish
function c101103040.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1142),c101103040.matfilter,true)
--change name
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(95440946)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103040,0))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101103040)
e4:SetCost(c101103040.cost)
e4:SetTarget(c101103040.cttg)
e4:SetOperation(c101103040.ctop)
c:RegisterEffect(e4)
end
function c101103040.matfilter(c)
return c:IsLevelAbove(5) and c:IsRace(RACE_ZOMBIE)
end
function c101103040.cfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsControler(tp) or c:IsFaceup())
end
function c101103040.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101103040.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c101103040.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function c101103040.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c101103040.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101103040.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103040.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c101103040.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c101103040.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TRIGGER)
tc:RegisterEffect(e2)
Duel.GetControl(tc,tp)
end
end
--双天将 密迹
--
--小花ソノガミ
function c101103041.initial_effect(c)
--フュージョン召喚
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,11759079,aux.FilterBoolFunction(Card.IsFusionSetCard,0x14f),2,true,false)
--最初に破壊されない
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c101103041.indtg)
e1:SetValue(c101103041.indct)
c:RegisterEffect(e1)
--すべての呪文/トラップを返す
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103041,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetTarget(c101103041.thtg)
e2:SetOperation(c101103041.thop)
c:RegisterEffect(e2)
--破壊
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101103041)
e3:SetCondition(c101103041.descon)
e3:SetTarget(c101103041.destg)
e3:SetOperation(c101103041.desop)
c:RegisterEffect(e3)
end
--初回は破壊されない
function c101103041.indtg(e,c)
return c:IsFaceup() and c:IsType(0x14f) and c:IsType(TYPE_FUSION)
end
function c101103041.indct(e,re,r,rp)
if bit.band(r,REASON_EFFECT)~=0 then
return 1
else return 0 end
end
--すべてを拭く
function c101103041.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101103041.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103041.thfilter,tp,0,LOCATION_SZONE,1,nil) end
local g=Duel.GetMatchingGroup(c101103041.thfilter,tp,0,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c101103041.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101103041.thfilter,tp,0,LOCATION_SZONE,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--破壊された
function c101103041.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c101103041.descon(e)
return Duel.IsExistingMatchingCard(c101103041.desfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil)
and ep==1-tp and re:GetHandler():IsOnField() and re:IsActiveType(TYPE_MONSTER)
end
function c101103041.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c101103041.desop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
-- --
--Script by JustFish --Script by JustFish
function c101103042.initial_effect(c) function c101103042.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c101103042.ffilter,2,true) aux.AddFusionProcFunRep(c,c101103042.ffilter,2,true)
......
--ドラグユニティナイト - ゴルマバル
--Dragunity Knight - Gormfabal
--Scripted by Xylen09
function c101103045.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x29),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103045,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101103045)
e1:SetCondition(c101103045.eqcon)
e1:SetTarget(c101103045.eqtg)
e1:SetOperation(c101103045.eqop)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103045,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101103145)
e2:SetCost(c101103045.rmcost)
e2:SetTarget(c101103045.rmtg)
e2:SetOperation(c101103045.rmop)
c:RegisterEffect(e2)
end
function c101103045.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101103045.eqfilter(c)
return c:IsSetCard(0x29) and c:IsType(TYPE_TUNER) and not c:IsForbidden()
end
function c101103045.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103045.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101103045.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101103045.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c101103045.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101103045.eqlimit)
tc:RegisterEffect(e1)
end
end
function c101103045.eqlimit(e,c)
return e:GetOwner()==c
end
function c101103045.costfilter(c,tp)
return c:IsControler(tp) and c:IsAbleToGraveAsCost()
end
function c101103045.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c101103045.costfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,c101103045.costfilter,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c101103045.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chk:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function c101103045.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
--スプリガンズ・シップ エクスブロウラー
--Scripted by mallu11
function c101103046.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,nil,nil,99)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103046,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103046)
e1:SetTarget(c101103046.seqtg)
e1:SetOperation(c101103046.seqop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103046,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_END)
e2:SetCountLimit(1,101103146)
e2:SetCondition(c101103046.rmcon)
e2:SetTarget(c101103046.rmtg)
e2:SetOperation(c101103046.rmop)
c:RegisterEffect(e2)
end
function c101103046.desfilter(c)
if c:IsLocation(LOCATION_SZONE) then
return c:GetSequence()<5
else
return true
end
end
--str2 to str6 is Spell&Trap Zone(from right to left)
--str7 to str13 is Monster Zone(from right to left)
function c101103046.seqfilter(c,i,chk)
local seq=c:GetSequence()
if i==11 then
return (seq==5 or (chk and seq==1)) and c:IsLocation(LOCATION_MZONE)
elseif i==12 then
return (seq==6 or (chk and seq==3)) and c:IsLocation(LOCATION_MZONE)
else
local loc
local j
if i<6 then
loc=LOCATION_MZONE
j=0
else
loc=LOCATION_SZONE
j=5
end
if c:IsLocation(loc) then
return seq==i-j-1
else
if i==7 then
return seq==i-j or seq==i-j-1 or seq==i-j-2 or seq==5
elseif i==9 then
return seq==i-j or seq==i-j-1 or seq==i-j-2 or seq==6
else
return (seq==i-j or seq==i-j-1 or seq==i-j-2) and seq<5
end
end
end
end
function c101103046.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.IsExistingMatchingCard(c101103046.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local b={}
for i=1,12 do
b[i]=Duel.IsExistingMatchingCard(c101103046.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i)
end
local off=0
local ops={}
local opval={}
off=1
for i=1,12 do
if b[i] then
ops[off]=aux.Stringid(101103046,i+1)
opval[off-1]=i
off=off+1
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local op=Duel.SelectOption(tp,table.unpack(ops))
e:SetLabel(opval[op])
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(101103046,opval[op]+1))
local g=Duel.GetMatchingGroup(c101103046.seqfilter,tp,0,LOCATION_ONFIELD,nil,opval[op],true)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103046.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local i=e:GetLabel()
if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(c101103046.seqfilter,tp,0,LOCATION_ONFIELD,nil,i,true)
if ct<=0 or not c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) then return end
local count=c:RemoveOverlayCard(tp,1,ct,REASON_EFFECT)
if count<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c101103046.seqfilter,tp,0,LOCATION_ONFIELD,count,count,nil,i,true)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
function c101103046.rmcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==1-tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function c101103046.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c101103046.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c101103046.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c101103046.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--神樹獣ハイペリュトン
--Divine Treebeast High Peryton
--Script by: XGlitchy30
function c101103047.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2)
c:EnableReviveLimit()
--attach overlay
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103047,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103047)
e1:SetCondition(c101103047.ovcon)
e1:SetTarget(c101103047.ovtg)
e1:SetOperation(c101103047.ovop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103047,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101103147)
e2:SetCondition(c101103047.negcon)
e2:SetTarget(c101103047.negtg)
e2:SetOperation(c101103047.negop)
c:RegisterEffect(e2)
end
function c101103047.ovcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and rp==tp
end
function c101103047.ovfilter(c,typ)
return c:IsType(typ) and c:IsCanOverlay()
end
function c101103047.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local typ=bit.band(re:GetActiveType(),TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103047.ovfilter(chkc,typ) end
if chk==0 then return Duel.IsExistingTarget(c101103047.ovfilter,tp,LOCATION_GRAVE,0,1,nil,typ) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101103047.ovfilter,tp,LOCATION_GRAVE,0,1,1,nil,typ)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c101103047.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Overlay(c,Group.FromCards(tc))
end
end
function c101103047.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101103047.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
local typ=bit.band(re:GetActiveType(),TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
return c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and c:GetOverlayGroup():IsExists(Card.IsType,1,nil,typ)
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 c101103047.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) then return end
local typ=bit.band(re:GetActiveType(),TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
local og=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,typ)
if og:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:Select(tp,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
--S-Force ジャスティファイ
--Scripted by mallu11
function c101103048.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,3,c101103048.lcheck)
c:EnableReviveLimit()
--zone limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTargetRange(1,0)
e1:SetValue(c101103048.zonelimit)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103048,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103048)
e2:SetTarget(c101103048.distg)
e2:SetOperation(c101103048.disop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103048,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(c101103048.rmcon)
e3:SetTarget(c101103048.rmtg)
e3:SetOperation(c101103048.rmop)
c:RegisterEffect(e3)
end
function c101103048.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x259)
end
function c101103048.zonelimit(e)
return 0x7f007f & ~e:GetHandler():GetLinkedZone()
end
function c101103048.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c101103048.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101103048.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103048.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101103048.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c101103048.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if not c:IsRelateToEffect(e) or not c:IsFaceup() or tc:IsImmuneToEffect(e) then return end
Duel.AdjustInstantly()
local zone=bit.band(c:GetLinkedZone(1-tp),0x1f)
if tc:IsDisabled() and tc:IsControler(1-tp) and Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0,zone)>0 and Duel.SelectYesNo(tp,aux.Stringid(101103048,2)) then
local s=0
local flag=bit.bxor(zone,0xff)*0x10000
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
s=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,flag)/0x10000
local nseq=0
if s==1 then nseq=0
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
Duel.MoveSequence(tc,nseq)
end
end
end
function c101103048.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler()
end
function c101103048.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=e:GetHandler():GetLinkedGroup():Filter(Card.IsAbleToRemove,nil)
if chk==0 then return #rg>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,#rg,0,0)
end
function c101103048.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local rg=c:GetLinkedGroup():Filter(Card.IsAbleToRemove,nil)
if #rg>0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
--ヘヴィメタルフォシス アマルガム
--Heavymetalphosis Amalgam
--Scripted by Xylen09
function c101103049.initial_effect(c)
--(0) Link Summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xe1),2,2)
c:EnableReviveLimit()
--(1) Equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103049,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101103049)
e1:SetCondition(c101103049.condition)
e1:SetTarget(c101103049.eqtg)
e1:SetOperation(c101103049.eqop)
c:RegisterEffect(e1)
--(2) Destroy and Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103049,1))
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_DESTROYED)
e2:SetCountLimit(1,101103049)
e2:SetCondition(c101103049.condition)
e2:SetTarget(c101103049.sptg)
e2:SetOperation(c101103049.spop)
c:RegisterEffect(e2)
end
function c101103049.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c101103049.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe1)
end
function c101103049.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103049.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101103049.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101103049.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c101103049.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not tc:IsControler(tp) or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if not c:CheckUniqueOnField(tp) or c:IsForbidden() then return end
if not Duel.Equip(tp,c,tc) then return end
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(c101103049.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
function c101103049.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101103049.desfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xe1) and Duel.GetMZoneCount(tp,c)>0
end
function c101103049.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101103049.desfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101103049.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101103049.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101103049.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--閉ザサレシ世界ノ冥神
--
--Script by mercury233
function c101103050.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),4)
c:EnableReviveLimit()
--extra material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c101103050.matval)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103050,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c101103050.discon)
e2:SetTarget(c101103050.distg)
e2:SetOperation(c101103050.disop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(c101103050.immcon)
e3:SetValue(c101103050.efilter)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103050,1))
e4:SetCategory(CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c101103050.negcon)
e4:SetTarget(c101103050.negtg)
e4:SetOperation(c101103050.negop)
c:RegisterEffect(e4)
end
--temp update
function Auxiliary.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg,c,tp) then return false end
end
return true
end
function c101103050.matval(e,lc,mg,c,tp)
if e:GetHandlerPlayer()~=tp then return true end
return lc:IsCode(101103050) and not mg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c101103050.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101103050.distg(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)
end
function c101103050.disop(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
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c101103050.immcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101103050.efilter(e,te)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
end
function c101103050.cfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
end
function c101103050.negcon(e,tp,eg,ep,ev,re,r,rp)
local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
return Duel.IsChainNegatable(ev) and rp==1-tp
and ex and (bit.band(dv,LOCATION_GRAVE)==LOCATION_GRAVE or g and g:IsExists(c101103050.cfilter,1,nil))
end
function c101103050.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)
end
function c101103050.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--スプリガンズ・ウォッチ
--Scripted by mallu11
function c101103054.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103054+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101103054.target)
e1:SetOperation(c101103054.activate)
c:RegisterEffect(e1)
end
function c101103054.filter(c)
return c:IsCode(101103055) and c:IsAbleToHand()
end
function c101103054.thfilter(c,tp)
return c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(c101103054.tgfilter,tp,LOCATION_DECK,0,1,c)
end
function c101103054.tgfilter(c)
return c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101103054.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b=Duel.IsEnvironment(101103055,tp,LOCATION_FZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c101103054.filter,tp,LOCATION_DECK,0,1,nil) or b and Duel.IsExistingMatchingCard(c101103054.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK)
end
function c101103054.activate(e,tp,eg,ep,ev,re,r,rp)
local b=Duel.IsEnvironment(101103055,tp,LOCATION_FZONE)
if b and Duel.IsExistingMatchingCard(c101103054.thfilter,tp,LOCATION_DECK,0,1,nil,tp) and (not Duel.IsExistingMatchingCard(c101103054.filter,tp,LOCATION_DECK,0,1,nil) or Duel.SelectYesNo(tp,aux.Stringid(101103054,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103054.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c101103054.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103054.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--大砂海ゴールド・ゴルゴンダ
--Scripted by mallu11
function c101103055.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c101103055.atktg)
e1:SetValue(1000)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103055,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101103055)
e2:SetCondition(c101103055.spcon)
e2:SetCost(c101103055.spcost)
e2:SetTarget(c101103055.sptg)
e2:SetOperation(c101103055.spop)
c:RegisterEffect(e2)
--can not attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103055,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,101103155)
e3:SetCondition(c101103055.catkcon)
e3:SetTarget(c101103055.catktg)
e3:SetOperation(c101103055.catkop)
c:RegisterEffect(e3)
end
function c101103055.atktg(e,c)
return c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103055.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103055.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101103055.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101103055.costfilter(c)
return c:IsSetCard(0x257) and c:IsDiscardable()
end
function c101103055.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103055.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101103055.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c101103055.spfilter(c,e,tp)
return c:IsSetCard(0x257) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c101103055.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103055.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101103055.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103055.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103055.catkfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&TYPE_XYZ~=0 and c:IsReason(REASON_EFFECT)
end
function c101103055.catkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103055.catkfilter,1,nil,tp)
end
function c101103055.catktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c101103055.catkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--鉄獣の邂逅
--Tri-Brigade Rendezvous
--Scripted by Xylen09
function c101103056.initial_effect(c)
--(1) Gains ATK
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103056,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101103056)
e1:SetTarget(c101103056.target)
e1:SetOperation(c101103056.activate)
c:RegisterEffect(e1)
--(2) Destroy Replace
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103056,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101103056+100)
e2:SetValue(c101103056.replaceval)
e2:SetTarget(c101103056.replacetg)
e2:SetOperation(c101103056.replaceop)
c:RegisterEffect(e2)
end
function c101103056.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsLinkState()
end
function c101103056.atkfilter2(c,e)
return c101103056.atkfilter(c) and c:IsCanBeEffectTarget(e)
end
function c101103056.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsController(tp) and c101103056.atkfilter(chkc) end
local g=Duel.GetMatchingGroup(c101103056.atkfilter2,tp,LOCATION_MZONE,0,nil,e)
if chk==0 then return #g>0 end
Duel.SelectTarget(tp,c101103056.atkfilter,tp,LOCATION_MZONE,0,1,#g,nil)
end
function c101103056.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsFaceup,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c101103056.replaceft(c,tp)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsLinkState()
and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101103056.replacetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c101103056.replaceft,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101103056.replaceval(e,c)
return c101103056.replaceft(c,e:GetHandlerPlayer())
end
function c101103056.replaceop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
--S-Force ブリッジヘッド
--Scripted by mallu11
function c101103057.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103057+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101103057.activate)
c:RegisterEffect(e1)
--indes battle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103057,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101103157)
e2:SetCondition(c101103057.indcon)
e2:SetTarget(c101103057.indtg)
e2:SetOperation(c101103057.indop)
c:RegisterEffect(e2)
end
function c101103057.thfilter(c)
return c:IsSetCard(0x259) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101103057.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101103057.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101103057,0)) then
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
function c101103057.indcon(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
local cg=ac:GetColumnGroup()
e:SetLabelObject(bc)
return ac:IsControler(1-tp) and cg:IsContains(bc) and bc:IsFaceup() and bc:IsSetCard(0x259) and bc:IsControler(tp)
end
function c101103057.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc and bc:IsRelateToBattle() end
end
function c101103057.indop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc and bc:IsRelateToBattle() and bc:IsControler(tp) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
bc:RegisterEffect(e1)
end
end
--S-Force ショウダウン
--Scripted by mallu11
function c101103058.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103058,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101103058+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101103058.sptg)
e1:SetOperation(c101103058.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103058,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103058+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(c101103058.thtg)
e2:SetOperation(c101103058.thop)
c:RegisterEffect(e2)
end
function c101103058.spfilter(c,e,tp)
return c:IsSetCard(0x259) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101103058.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103058.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101103058.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,c101103058.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 c101103058.thfilter(c)
return c:IsSetCard(0x259) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101103058.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103058.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103058.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101103058.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101103058.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
--パラメタルフォーズフュージョン
--Parametalfoes Fusion
--Scripted by Xylen09
function c101103061.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,101103061+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101103061.target)
e1:SetOperation(c101103061.activate)
c:RegisterEffect(e1)
end
function c101103061.filter0(c,e)
return c:IsCanBeFusionMaterial() and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsImmuneToEffect(e)
end
function c101103061.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c101103061.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xe1) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101103061.fcheck(tp,sg,fc)
return sg:GetClassCount(Card.GetLocation)==#sg
end
function c101103061.gcheck(sg)
return sg:GetClassCount(Card.GetLocation)==#sg
end
function c101103061.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
mg1:Merge(Duel.GetMatchingGroup(c101103061.filter0,tp,LOCATION_EXTRA,0,nil,e))
Auxiliary.FCheckAdditional=c101103061.fcheck
Auxiliary.GCheckAdditional=c101103061.gcheck
local res=Duel.IsExistingMatchingCard(c101103061.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101103061.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101103061.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101103061.filter1,nil,e)
mg1:Merge(Duel.GetMatchingGroup(c101103061.filter0,tp,LOCATION_EXTRA,0,nil,e))
Auxiliary.FCheckAdditional=c101103061.fcheck
Auxiliary.GCheckAdditional=c101103061.gcheck
local sg1=Duel.GetMatchingGroup(c101103061.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(c101103061.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,0,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
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
end
--黄金郷の七摩天
--
--Script by JustFish
function c101103062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103062,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101103062)
e2:SetTarget(c101103062.sptg)
e2:SetOperation(c101103062.spop)
c:RegisterEffect(e2)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103062,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101103062+100)
e2:SetCondition(c101103062.alcon)
e2:SetTarget(c101103062.altg)
e2:SetOperation(c101103062.alop)
c:RegisterEffect(e2)
end
function c101103062.filter0(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave()
end
function c101103062.filter1(c,e)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c101103062.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101103062.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101103062.filter0,nil)
local res=Duel.IsExistingMatchingCard(c101103062.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101103062.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function c101103062.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101103062.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c101103062.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101103062.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c101103062.alfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsFaceup()
end
function c101103062.alcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103062.alfilter,1,nil) and re:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c101103062.cfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function c101103062.altg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c101103062.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103062.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101103062,2))
local g=Duel.SelectTarget(tp,c101103062.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
end
function c101103062.alop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DRAW)
tc:RegisterEffect(e1)
end
end
--デーモンの杖
--
--"LUA BY REIKAI"
function c101103063.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c101103063.target)
e1:SetOperation(c101103063.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(1)
c:RegisterEffect(e2)
--confirm
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103063,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100270206)
e3:SetTarget(c101103063.cftg)
e3:SetOperation(c101103063.cfop)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103063,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,101103063)
e4:SetCondition(c101103063.thcon)
e4:SetCost(c101103063.thcost)
e4:SetTarget(c101103063.thtg)
e4:SetOperation(c101103063.thop)
c:RegisterEffect(e4)
end
function c101103063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101103063.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c101103063.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)>0 end
end
function c101103063.cfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local d=c:GetEquipTarget():GetAttack()
d=math.ceil(d/2)
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-d)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end
end
function c101103063.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET)
end
function c101103063.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c101103063.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c101103063.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not e:GetHandler():IsAbleToHand() then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
\ No newline at end of file
--鎧竜降臨
--
--"LUA BY REIKAI"
function c101103064.initial_effect(c)
aux.AddRitualProcGreaterCode(c,101103037,nil,c101103064.mfilter)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,101103064)
e1:SetCondition(aux.exccon)
e1:SetCost(c101103064.spcost)
e1:SetTarget(c101103064.sptg)
e1:SetOperation(c101103064.spop)
c:RegisterEffect(e1)
end
function c101103064.mfilter(c)
return c:IsCode(101103037)
end
function c101103064.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x10cf)
end
function c101103064.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:GetLevel()>0
end
function c101103064.spzfilter(g,tp)
if Duel.GetMZoneCount(tp,g,tp)<=0 then return false end
return g:GetSum(Card.GetLevel)>=4
end
function c101103064.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_HAND,0)
local sg=g:Filter(c101103064.cfilter,nil)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and sg:GetSum(Card.GetLevel)>=4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=sg:SelectSubGroup(tp,c101103064.spzfilter,false,1,99,tp)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c101103064.spfilter(c,e,tp)
return c:IsCode(101103037) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103064.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103064.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101103064.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not (c:IsRelateToEffect(e) and c:IsAbleToRemove() and c:IsLocation(LOCATION_GRAVE)) then return false end
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103064.spfilter,tp,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
end
\ No newline at end of file
--金満で謙虚な壺
--
--Script by Real_Scl
function c101103065.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103065+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101103065.cost)
e1:SetTarget(c101103065.target)
e1:SetOperation(c101103065.activate)
c:RegisterEffect(e1)
if not c101103065.gf then
c101103065.gf=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(c101103065.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c101103065.regop(e,tp,eg,ep,ev,re,r,rp)
if r==REASON_EFFECT then
Duel.RegisterFlagEffect(ep,101103065,RESET_PHASE+PHASE_END,0,1)
end
end
function c101103065.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c101103065.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,nil,POS_FACEDOWN)
local b1=#g>=3 and Duel.GetDecktopGroup(tp,3):IsExists(Card.IsAbleToHand,1,nil)
local b2=#g>=6 and Duel.GetDecktopGroup(tp,6):IsExists(Card.IsAbleToHand,1,nil)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.GetFlagEffect(tp,101103065)==0 and (b1 or b2)
end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(101103065,0),aux.Stringid(101103065,1))
else
op=Duel.SelectOption(tp,aux.Stringid(101103065,0))
end
local ct= op==0 and 3 or 6
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,ct,ct,nil)
Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101103065.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.ConfirmDecktop(p,d)
local g=Duel.GetDecktopGroup(p,d)
if #g>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sc=g:Select(p,1,1,nil):GetFirst()
if sc:IsAbleToHand() then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sc)
Duel.ShuffleHand(p)
else
Duel.SendtoGrave(sc,REASON_RULE)
end
end
if #g>1 then
Duel.SortDecktop(tp,tp,#g-1)
for i=1,#g-1 do
local dg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(dg:GetFirst(),1)
end
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c101103065.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101103065.damval(e,re,val,r,rp,rc)
return math.floor(val/2)
end
--ツッパリーチ
--
--Script by Real_Scl
function c101103066.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--redraw (rule)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103066,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DRAW)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c101103066.drcon)
e2:SetCost(c101103066.drcost)
e2:SetTarget(c101103066.drtg)
e2:SetOperation(c101103066.drop)
c:RegisterEffect(e2)
--redraw (effect)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103066,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DRAW)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c101103066.drcon2)
e3:SetCost(c101103066.drcost)
e3:SetTarget(c101103066.drtg2)
e3:SetOperation(c101103066.drop2)
c:RegisterEffect(e3)
end
function c101103066.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and r==REASON_RULE
end
function c101103066.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c101103066.tdfilter(c)
return not c:IsPublic() and c:IsAbleToDeck()
end
function c101103066.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=eg:Filter(c101103066.tdfilter,1,nil)
if chk==0 then return e:GetLabel()==100 and #tg>0 and Duel.IsPlayerCanDraw(tp,1) end
e:SetLabel(0)
local tc=tg:GetFirst()
if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
tc=tg:Select(tp,1,1,nil)
end
Duel.ConfirmCards(1-tp,tc)
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101103066.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c101103066.drcon2(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and r==REASON_EFFECT
end
function c101103066.drtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=eg:Filter(c101103066.tdfilter,1,nil)
if chk==0 then return e:GetLabel()==100 and c:IsAbleToGrave() and #tg>0 and Duel.IsPlayerCanDraw(tp,1) end
e:SetLabel(0)
local tc=tg:GetFirst()
if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
tc=tg:Select(tp,1,1,nil)
end
Duel.ConfirmCards(1-tp,tc)
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101103066.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoGrave(c,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_GRAVE) then return end
local tc=Duel.GetFirstTarget()
if tc and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--スプリガンズ・コール!
--Scripted by mallu11
function c101103068.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103068,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101103068)
e1:SetTarget(c101103068.sptg)
e1:SetOperation(c101103068.spop)
c:RegisterEffect(e1)
--overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103068,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103168)
e2:SetCondition(aux.exccon)
e2:SetCost(c101103068.ovcost)
e2:SetTarget(c101103068.ovtg)
e2:SetOperation(c101103068.ovop)
c:RegisterEffect(e2)
end
function c101103068.spfilter(c,e,tp)
return (c:IsSetCard(0x257) and c:IsType(TYPE_MONSTER) or c:IsCode(68468459)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103068.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103068.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101103068.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103068.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103068.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 c101103068.costfilter(c)
return c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost()
end
function c101103068.ovcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101103068.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101103068.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101103068.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end
function c101103068.ovfilter(c,e)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,68468459) and c:IsCanOverlay() and (not e or not c:IsImmuneToEffect(e))
end
function c101103068.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103068.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103068.tgfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c101103068.ovfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103068.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101103068.ovop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c101103068.ovfilter,tp,LOCATION_EXTRA,0,1,1,nil,e)
local oc=g:GetFirst()
if oc then
Duel.Overlay(tc,oc)
end
end
end
--スプリガンズ・ブラスト!
--Scripted by mallu11
function c101103069.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103069+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101103069.condition)
e1:SetTarget(c101103069.target)
e1:SetOperation(c101103069.activate)
c:RegisterEffect(e1)
end
function c101103069.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x257)
end
function c101103069.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101103069.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101103069.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,68468459)
end
function c101103069.disfilter(c)
return c:IsFaceup() and c:GetSequence()<5
end
function c101103069.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103069.disfilter,tp,0,LOCATION_MZONE,1,nil) or Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local ct=1
if Duel.IsExistingMatchingCard(c101103069.cfilter,tp,LOCATION_MZONE,0,1,nil) then ct=2 end
local min=0
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then min=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c101103069.disfilter,tp,0,LOCATION_MZONE,min,ct,nil)
ct=ct-#g
local dis=0
if ct>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 then
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101103069,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE)
dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0xe000e0)|dis
elseif #g==0 then
if ct==2 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>1 and Duel.SelectYesNo(tp,aux.Stringid(101103069,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE)
dis=Duel.SelectDisableField(tp,2,0,LOCATION_MZONE,0xe000e0)|dis
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE)
dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0xe000e0)|dis
end
end
end
local tc=g:GetFirst()
while tc do
dis=(2^tc:GetSequence())|dis
tc=g:GetNext()
end
e:SetLabel(dis)
Duel.Hint(HINT_ZONE,tp,dis)
end
function c101103069.disfilter2(c,dis)
return c:IsFaceup() and (2^c:GetSequence())&dis~=0
end
function c101103069.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dis=e:GetLabel()
local g=Duel.GetMatchingGroup(c101103069.disfilter2,tp,0,LOCATION_MZONE,nil,dis)
local tc=g:GetFirst()
while tc do
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e0)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
dis=dis-(2^tc:GetSequence())
tc=g:GetNext()
end
if dis~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DISABLE_FIELD)
e3:SetOperation(c101103069.disop)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabel(dis)
Duel.RegisterEffect(e3,tp)
end
end
function c101103069.disop(e,tp)
return e:GetLabel()
end
--ドラグマ・ジェネシス
--
--"Lua By REIKAI 2404873791"
function c101103070.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101103070+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101103070.target)
e1:SetOperation(c101103070.activate)
c:RegisterEffect(e1)
end
function c101103070.filter(c,tp)
local ctype=bit.band(c:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
return c:IsFaceup() and ctype~=0 and c:IsAbleToExtra()
and Duel.IsExistingTarget(c101103070.filter2,tp,0,LOCATION_MZONE,1,nil,ctype)
end
function c101103070.filter2(c,ctype)
return c:IsFaceup() and c:IsType(ctype) and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c101103070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101103070.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101103070.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,tp)
local ctype=bit.band(g:GetFirst():GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
local dg=Duel.SelectTarget(tp,c101103070.filter2,tp,0,LOCATION_MZONE,1,1,nil,ctype)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,dg,1,0,0)
end
function c101103070.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local tc1=e:GetLabelObject()
local tc2=g:GetFirst()
if tc1==tc2 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_EXTRA) then
if tc2:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsControler(1-tp) and not tc2:IsDisabled() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e2)
end
end
end
--S-Force スペシメン
--Scripted by mallu11
function c101103071.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103071,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101103071)
e1:SetCondition(c101103071.spcon)
e1:SetTarget(c101103071.sptg)
e1:SetOperation(c101103071.spop)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103071,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103071)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101103071.mvtg)
e2:SetOperation(c101103071.mvop)
c:RegisterEffect(e2)
end
function c101103071.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c101103071.spfilter(c,e,tp,zone)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x259) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101103071.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=0
local lg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
for lc in aux.Next(lg) do
zone=bit.bor(zone,lc:GetColumnZone(LOCATION_MZONE,tp))
end
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c101103071.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101103071.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103071.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103071.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone=0
local lg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
for lc in aux.Next(lg) do
zone=bit.bor(zone,lc:GetColumnZone(LOCATION_MZONE,tp))
end
if zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c101103071.mvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x259)
end
function c101103071.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103071.mvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103071.mvfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101103071,2))
Duel.SelectTarget(tp,c101103071.mvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101103071.mvop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or not tc:IsControler(tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
--戦華史略-大丈夫之義
--
--Script by 龙骑
function c101103074.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103074,0))
e2:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101103074)
e2:SetCondition(c101103074.tkcon)
e2:SetTarget(c101103074.tktg)
e2:SetOperation(c101103074.tkop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c101103074.reptg)
e3:SetValue(c101103074.repval)
e3:SetOperation(c101103074.repop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103074,1))
e4:SetCategory(CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCountLimit(1,101103174)
e4:SetCondition(c101103074.negcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c101103074.negtg)
e4:SetOperation(c101103074.negop)
c:RegisterEffect(e4)
end
function c101103074.cfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function c101103074.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103074.cfilter,1,nil,tp)
end
function c101103074.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,101103174,0x137,0x4011,500,500,1,RACE_BEASTWARRIOR,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101103074.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,101103174,0x137,0x4011,500,500,1,RACE_BEASTWARRIOR,ATTRIBUTE_WIND) then
local token=Duel.CreateToken(tp,101103174)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103074.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0x137) and not c:IsReason(REASON_REPLACE)
end
function c101103074.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED)
and eg:IsExists(c101103074.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101103074.repval(e,c)
return c101103074.repfilter(c,e:GetHandlerPlayer())
end
function c101103074.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
function c101103074.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x137)
end
function c101103074.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c101103074.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c101103074.negtg(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 c101103074.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--電脳堺門-玄武
--
--Script by Real_Scl
function c101103075.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103075+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103075,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101103075)
e2:SetCondition(c101103075.cpcon)
e2:SetTarget(c101103075.cptg)
e2:SetOperation(c101103075.cpop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103075,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,101103175)
e3:SetCondition(c101103075.spcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c101103075.sptg)
e3:SetOperation(c101103075.spop)
c:RegisterEffect(e3)
end
function c101103075.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x114e)
end
function c101103075.cpcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.IsExistingMatchingCard(c101103075.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c101103075.cpfilter(c)
return c:IsFaceup() and c:IsCanChangePosition()
end
function c101103075.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101103075.cpfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103075.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c101103075.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c101103075.cpop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c101103075.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c101103075.spfilter(c,e,tp)
return c:IsSetCard(0x14e) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c101103075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101103075.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101103075.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101103075.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c101103075.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local res= Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if res 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()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,0,nil)
if res and #g>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
--双天の転身
--
--Script by Real_Scl
function c101103076.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101103076)
e1:SetTarget(c101103076.target)
e1:SetOperation(c101103076.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103076,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101103176)
e2:SetCondition(c101103076.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101103076.thtg)
e2:SetOperation(c101103076.thop)
c:RegisterEffect(e2)
end
function c101103076.desfilter(c,e,tp)
local lv=c:GetOriginalLevel()
return c:IsFaceup() and c:IsSetCard(0x14f) and lv>0 and Duel.IsExistingMatchingCard(c101103076.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,lv,c)
end
function c101103076.spfilter(c,e,tp,lv,rc)
return c:IsSetCard(0x14f) and c:IsLevel(lv-1,lv+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,rc,tp)>0 or Duel.GetLocationCountFromEx(tp,tp,rc)>0)
end
function c101103076.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103076.desfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101103076.desfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101103076.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c101103076.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c101103076.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetOriginalLevel())
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c101103076.thcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101103076.thfilter(c)
return c:IsSetCard(0x14f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101103076.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101103076.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103076.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101103076.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101103076.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
--夢魔鏡の夢語らい
--
--Script by Real_Scl
function c101103077.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetTarget(c101103077.rmtg)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e2)
--place
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103077,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c101103077.tfcon)
e3:SetCost(c101103077.tfcost)
e3:SetTarget(c101103077.tftg)
e3:SetOperation(c101103077.tfop)
c:RegisterEffect(e3)
end
function c101103077.rmtg(e,c)
local re=c:GetReasonEffect()
return c:IsSetCard(0x131) and c:IsReason(REASON_COST) and c:IsReason(REASON_RELEASE) and re and re:IsActivated() and re:GetHandler()==c
end
function c101103077.tfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101103077.tfcost(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 c101103077.tffilter(c)
return c:IsFaceup() and c:IsCode(74665651,1050355)
end
function c101103077.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103077.tffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
function c101103077.spfilter(c,e,tp,code)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(c,code)
end
function c101103077.tfop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101103077.tffilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
if #tg==0 then return end
Duel.HintSelection(tg)
local tc=tg:GetFirst()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local g=Duel.GetMatchingGroup(c101103077.spfilter,tp,LOCATION_HAND,0,nil,e,tp,tc:GetCode())
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101103077,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
--E.M.R.
--
--Script by 龙骑
function c101103078.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101103078.cost)
e1:SetTarget(c101103078.target)
e1:SetOperation(c101103078.operation)
c:RegisterEffect(e1)
end
function c101103078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(100)
return true
end
end
function c101103078.costfilter(c)
return c:IsRace(RACE_MACHINE)
end
function c101103078.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local dc=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c101103078.costfilter,1,nil)
end
local g=Duel.SelectReleaseGroup(tp,c101103078.costfilter,1,1,nil)
local atk=g:GetFirst():GetAttack()
Duel.Release(g,REASON_COST)
local ct=math.floor(atk/1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function c101103078.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--碑像の天使-アズルーン
--
--Script by 龙骑
function c101103079.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:SetTarget(c101103079.target)
e1:SetOperation(c101103079.activate)
c:RegisterEffect(e1)
--disable special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103079,0))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c101103079.discon)
e2:SetCost(c101103079.discost)
e2:SetTarget(c101103079.distg)
e2:SetOperation(c101103079.disop)
c:RegisterEffect(e2)
--destory
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103079,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetTarget(c101103079.destg)
e3:SetOperation(c101103079.desop)
c:RegisterEffect(e3)
end
function c101103079.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,101103079,0,0x21,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101103079.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,101103079,0,0x21,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end
function c101103079.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c101103079.discfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:GetSummonLocation()==LOCATION_SZONE and (c:GetType()&(TYPE_TRAP+TYPE_CONTINUOUS))==TYPE_TRAP+TYPE_CONTINUOUS
end
function c101103079.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103079.discfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103079.discfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101103079.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 c101103079.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c101103079.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c101103079.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc and tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--壱時砲固定式
--Stationary One-o'-Clock Linear Accelerator
--Scripted by Gecko-chan
function c101103080.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103080+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101103080.condition)
e1:SetTarget(c101103080.target)
e1:SetOperation(c101103080.activate)
c:RegisterEffect(e1)
end
function c101103080.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c101103080.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsLevelAbove(1)
end
function c101103080.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103080.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end
local t={}
local i=1
for i=1,6 do t[i]=i end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,0,0,0)
end
function c101103080.activate(e,tp,eg,ep,ev,re,r,rp)
--Set up the equation
local dnum=e:GetLabel()
local fnum=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local gnum=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local dg=Duel.Duel.SelectMatchingCard(tp,c101103080.filter,tp,0,LOCATION_MZONE,1,1,nil)
local mon=dg:GetFirst()
local lnum=mon:GetLevel()
--The equation
if ((lnum*dnum)+fnum)==gnum then
--Select number of cards to send from Deck to GY
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local t={}
local i=1
if dcount<=dnum then
for i=1,dcount do t[i]=i end
else
for i=1,dnum do t[i]=i end
end
local snum=Duel.AnnounceNumber(tp,table.unpack(t))
if Duel.DiscardDeck(tp,snum,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local tdnum=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
local tdg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if tdnum<=0 or #tdg<=0 then return end
--Shuffle opponent's cards into Deck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=tdg:Select(tp,1,tdnum,nil)
Duel.HintSelection(rg)
Duel.SendtoDeck(rg,nil,snum,REASON_EFFECT)
end
else
--Lose LP
Duel.SetLP(tp,Duel.GetLP(tp)-dnum*500)
end
end
--闇黒の夢魔鏡
function c1050355.initial_effect(c)
aux.AddCodeList(c,74665651)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1050355,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,1050355)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c1050355.acttg)
e2:SetOperation(c1050355.actop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c1050355.damcon)
e3:SetOperation(c1050355.damop)
c:RegisterEffect(e3)
end
function c1050355.actfilter(c,tp)
return c:IsCode(74665651) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c1050355.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end
function c1050355.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function c1050355.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c1050355.cfilter2(c,tp)
return c:GetSummonPlayer()==tp
end
function c1050355.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1050355.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and eg:IsExists(c1050355.cfilter2,1,nil,1-tp)
end
function c1050355.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1050355)
Duel.Damage(1-tp,300,REASON_EFFECT)
end
--夢魔鏡の白騎士-ルペウス
function c1872843.initial_effect(c)
aux.AddCodeList(c,1050355)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1872843,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1872843)
e1:SetCondition(c1872843.indcon)
e1:SetOperation(c1872843.indop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1872843,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1872844)
e2:SetCondition(c1872843.spcon)
e2:SetCost(c1872843.spcost)
e2:SetTarget(c1872843.sptg)
e2:SetOperation(c1872843.spop)
c:RegisterEffect(e2)
end
function c1872843.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c1872843.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
end
end
function c1872843.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end
function c1872843.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c1872843.spfilter(c,e,tp)
return c:IsCode(38267552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1872843.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c1872843.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1872843.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,c1872843.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--夢現の夢魔鏡
function c25964547.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,25964547+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25964547.target)
e1:SetOperation(c25964547.activate)
c:RegisterEffect(e1)
end
function c25964547.cfilter1(c,tp)
return c:IsCode(74665651,1050355) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
and Duel.IsExistingMatchingCard(c25964547.cfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,tp,c:GetCode())
end
function c25964547.cfilter2(c,tp,code)
return c:IsCode(74665651,1050355) and not c:IsCode(code) and c:CheckUniqueOnField(1-tp) and not c:IsForbidden()
end
function c25964547.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c25964547.cfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end
function c25964547.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25964547,0))
local g1=Duel.SelectMatchingCard(tp,c25964547.cfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp)
local tc1=g1:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25964547,1))
local g2=Duel.SelectMatchingCard(tp,c25964547.cfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp,tc1:GetCode())
local tc2=g2:GetFirst()
if Duel.MoveToField(tc1,tp,tp,LOCATION_FZONE,POS_FACEUP,false) then
if Duel.MoveToField(tc2,tp,1-tp,LOCATION_FZONE,POS_FACEUP,false) then
tc2:SetStatus(STATUS_EFFECT_ENABLED,true)
end
tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end
end
--夢魔鏡の夢物語
function c37444964.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,37444964+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c37444964.condition)
e1:SetTarget(c37444964.target)
e1:SetOperation(c37444964.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c37444964.reptg)
e2:SetValue(c37444964.repval)
e2:SetOperation(c37444964.repop)
c:RegisterEffect(e2)
end
function c37444964.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x131)
end
function c37444964.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c37444964.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c37444964.filter1(c)
return c:IsFaceup() and c:IsCode(74665651) and c:IsAbleToDeck()
end
function c37444964.filter2(c)
return c:IsFaceup() and c:IsCode(1050355) and c:IsAbleToDeck()
end
function c37444964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c37444964.filter1,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingTarget(c37444964.filter2,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c37444964.filter1,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,c37444964.filter2,tp,LOCATION_REMOVED,0,1,1,nil)
g1:Merge(g2)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g3,1,0,0)
end
function c37444964.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c37444964.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x131)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c37444964.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c37444964.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c37444964.repval(e,c)
return c37444964.repfilter(c,e:GetHandlerPlayer())
end
function c37444964.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--夢魔鏡の黒騎士-ルペウス
function c38267552.initial_effect(c)
aux.AddCodeList(c,74665651)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38267552,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,38267552)
e1:SetCondition(c38267552.descon)
e1:SetTarget(c38267552.destg)
e1:SetOperation(c38267552.desop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38267552,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,38267553)
e2:SetCondition(c38267552.spcon)
e2:SetCost(c38267552.spcost)
e2:SetTarget(c38267552.sptg)
e2:SetOperation(c38267552.spop)
c:RegisterEffect(e2)
end
function c38267552.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c38267552.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c38267552.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
function c38267552.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end
function c38267552.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c38267552.spfilter(c,e,tp)
return c:IsCode(1872843) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c38267552.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c38267552.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c38267552.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,c38267552.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--夢魔鏡の乙女-イケロス
function c49389190.initial_effect(c)
aux.AddCodeList(c,1050355)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49389190,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,49389190)
e1:SetCondition(c49389190.thcon)
e1:SetTarget(c49389190.thtg)
e1:SetOperation(c49389190.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49389190,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,49389191)
e2:SetCondition(c49389190.spcon)
e2:SetCost(c49389190.spcost)
e2:SetTarget(c49389190.sptg)
e2:SetOperation(c49389190.spop)
c:RegisterEffect(e2)
end
function c49389190.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c49389190.thfilter(c)
return c:IsSetCard(0x131) and not c:IsCode(49389190) and c:IsAbleToHand()
end
function c49389190.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49389190.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c49389190.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c49389190.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 c49389190.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end
function c49389190.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c49389190.spfilter(c,e,tp)
return c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c49389190.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c49389190.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c49389190.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,c49389190.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -53,7 +53,7 @@ end ...@@ -53,7 +53,7 @@ end
function c50321796.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c50321796.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e) local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then if rg:GetCount()>0 then
Duel.SendtoHand(rg,nil,REASON_EFFECT) Duel.SendtoHand(rg,nil,REASON_EFFECT)
end end
end end
--夢魔鏡の夢占い
function c61459246.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--activate(effect)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,61459246+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c61459246.condition1)
e1:SetTarget(c61459246.target1)
e1:SetOperation(c61459246.activate1)
c:RegisterEffect(e1)
--activate(spsummon)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON)
e2:SetCountLimit(1,61459246+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c61459246.condition2)
e2:SetTarget(c61459246.target2)
e2:SetOperation(c61459246.activate2)
c:RegisterEffect(e2)
end
function c61459246.condition1(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and rp==1-tp and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end
function c61459246.target1(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 c61459246.activate1(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
function c61459246.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and rp==1-tp and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end
function c61459246.target2(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 c61459246.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
--夢幻の夢魔鏡
function c62171834.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,62171834+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c62171834.activate)
c:RegisterEffect(e1)
--atk/def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(500)
e2:SetCondition(c62171834.upcon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--atk/def down
local e4=e2:Clone()
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(-500)
e4:SetCondition(c62171834.downcon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
function c62171834.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x131) and c:IsAbleToHand()
end
function c62171834.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c62171834.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(62171834,0)) then
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
function c62171834.upcon(e)
return Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end
function c62171834.downcon(e)
return Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end
--夢魔鏡の聖獣-パンタス
function c62393472.initial_effect(c)
aux.AddCodeList(c,1050355)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62393472,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,62393472)
e1:SetCondition(c62393472.spcon1)
e1:SetTarget(c62393472.sptg1)
e1:SetOperation(c62393472.spop1)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62393472,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_END)
e2:SetCountLimit(1,62393473)
e2:SetCondition(c62393472.spcon2)
e2:SetCost(c62393472.spcost2)
e2:SetTarget(c62393472.sptg2)
e2:SetOperation(c62393472.spop2)
c:RegisterEffect(e2)
end
function c62393472.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER)
end
function c62393472.spfilter1(c,e,tp)
return c:IsSetCard(0x131) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(62393472)
end
function c62393472.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62393472.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c62393472.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c62393472.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c62393472.spop1(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
function c62393472.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end
function c62393472.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function c62393472.spfilter2(c,e,tp)
return c:IsCode(99792080) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62393472.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c62393472.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c62393472.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62393472.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function c65749035.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c65749035.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e) local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then if rg:GetCount()>0 then
Duel.Destroy(rg,REASON_EFFECT) Duel.Destroy(rg,REASON_EFFECT)
end end
end end
--聖光の夢魔鏡
function c74665651.initial_effect(c)
aux.AddCodeList(c,1050355)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74665651,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,74665651)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c74665651.acttg)
e2:SetOperation(c74665651.actop)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c74665651.limcon)
e3:SetValue(c74665651.atlimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(c74665651.limcon)
e4:SetTarget(c74665651.tglimit)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function c74665651.actfilter(c,tp)
return c:IsCode(1050355) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c74665651.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end
function c74665651.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function c74665651.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c74665651.limcon(e)
return Duel.IsExistingMatchingCard(c74665651.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c74665651.limfilter(c,lv)
return c:IsFaceup() and c:IsSetCard(0x131) and c:GetLevel()>lv
end
function c74665651.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x131) and Duel.IsExistingMatchingCard(c74665651.limfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end
function c74665651.tglimit(e,c)
return c:IsSetCard(0x131)
and Duel.IsExistingMatchingCard(c74665651.limfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end
--夢魔鏡の夢魔-イケロス
function c75888208.initial_effect(c)
aux.AddCodeList(c,74665651)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75888208,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,75888208)
e1:SetCondition(c75888208.spcon1)
e1:SetTarget(c75888208.sptg1)
e1:SetOperation(c75888208.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75888208,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,75888209)
e2:SetCondition(c75888208.spcon2)
e2:SetCost(c75888208.spcost2)
e2:SetTarget(c75888208.sptg2)
e2:SetOperation(c75888208.spop2)
c:RegisterEffect(e2)
end
function c75888208.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c75888208.spfilter1(c,e,tp)
return c:IsSetCard(0x131) and not c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75888208.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75888208.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c75888208.spop1(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,c75888208.spfilter1,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 c75888208.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end
function c75888208.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c75888208.spfilter2(c,e,tp)
return c:IsCode(49389190) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75888208.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c75888208.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c75888208.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75888208.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--混沌の夢魔鏡
function c98570539.initial_effect(c)
aux.AddCodeList(c,74665651,1050355)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,98570539+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c98570539.target)
e1:SetOperation(c98570539.activate)
c:RegisterEffect(e1)
end
function c98570539.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c98570539.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c98570539.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x131) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c98570539.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=nil
if Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
mg1:Merge(mg2)
end
if Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetMatchingGroup(c98570539.filter0,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(c98570539.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c98570539.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c98570539.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil):Filter(c98570539.filter1,nil,e)
local mg2=nil
if Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
mg1:Merge(mg2)
end
if Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetMatchingGroup(c98570539.filter0,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
end
local sg1=Duel.GetMatchingGroup(c98570539.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c98570539.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
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)
local mat2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
mat1:Sub(mat2)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.Remove(mat2,POS_FACEUP,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--夢魔鏡の魔獣-パンタス
function c99792080.initial_effect(c)
aux.AddCodeList(c,74665651)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99792080,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,99792080)
e1:SetCondition(c99792080.dircon)
e1:SetOperation(c99792080.dirop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99792080,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_END)
e2:SetCountLimit(1,99792081)
e2:SetCondition(c99792080.spcon)
e2:SetCost(c99792080.spcost)
e2:SetTarget(c99792080.sptg)
e2:SetOperation(c99792080.spop)
c:RegisterEffect(e2)
end
function c99792080.dircon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER) and aux.bpcon()
end
function c99792080.dirop(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:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c99792080.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end
function c99792080.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function c99792080.spfilter(c,e,tp)
return c:IsCode(62393472) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99792080.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c99792080.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c99792080.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,c99792080.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
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