Commit f63e4108 authored by mercury233's avatar mercury233

update scripts

parent 620dc8cf
--焔聖騎士-リナルド
--Scripted by nekrozar
function c100200174.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100200174)
e1:SetCondition(c100200174.sprcon)
e1:SetOperation(c100200174.sprop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200174,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,100200274)
e2:SetTarget(c100200174.thtg)
e2:SetOperation(c100200174.thop)
c:RegisterEffect(e2)
end
function c100200174.sprfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c100200174.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200174.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100200174.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
end
function c100200174.thfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsCode(100200174)) or c:IsType(TYPE_EQUIP)) and c:IsAbleToHand()
end
function c100200174.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 c100200174.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100200174.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100200174.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100200174.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--アーマード・ビットロン
--Scripted by mallu11
function c100200175.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200175,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100200175)
e1:SetCost(c100200175.spcost)
e1:SetTarget(c100200175.sptg)
e1:SetOperation(c100200175.spop)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200175,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100200275)
e2:SetCondition(c100200175.spcon2)
e2:SetTarget(c100200175.sptg2)
e2:SetOperation(c100200175.spop2)
c:RegisterEffect(e2)
end
function c100200175.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c100200175.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and not c:IsCode(100200175) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100200175.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200175.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100200175.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100200175.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetTarget(c100200175.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c100200175.splimit(e,c)
return not c:IsRace(RACE_CYBERSE)
end
function c100200175.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0 and c:IsLinkAbove(3)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c100200175.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100200175.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c100200175.sptg2(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 c100200175.spop2(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
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
......@@ -92,6 +92,7 @@ function c100263002.imop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c100263002.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
end
......
--コードブレイカー・ゼロデイ
--Scripted by mallu11
function c101012002.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c101012002.atktg)
e1:SetValue(-1000)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012002,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101012002.descon)
e2:SetTarget(c101012002.destg)
e2:SetOperation(c101012002.desop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012002,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c101012002.srcon)
e3:SetTarget(c101012002.srtg)
e3:SetOperation(c101012002.srop)
c:RegisterEffect(e3)
end
function c101012002.atktg(e,c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and not c:IsSetCard(0x23c) and c:GetLinkedGroup():IsContains(e:GetHandler())
end
function c101012002.desfilter(c)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&TYPE_LINK~=0 and c:IsPreviousSetCard(0x23c) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c101012002.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012002.desfilter,1,nil)
end
function c101012002.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
end
function c101012002.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 c101012002.srcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c101012002.srfilter(c)
return c:IsCode(101012002) and c:IsAbleToHand()
end
function c101012002.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012002.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012002.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012002.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
--転生炎獣ゼブロイドX
--Scripted by mallu11
function c101012003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,101012003)
e1:SetCondition(c101012003.spcon)
e1:SetTarget(c101012003.sptg)
e1:SetOperation(c101012003.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c101012003.efcon)
e2:SetOperation(c101012003.efop)
c:RegisterEffect(e2)
end
function c101012003.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:GetPreviousTypeOnField()&TYPE_LINK~=0
and c:IsPreviousSetCard(0x119) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c101012003.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012003.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c101012003.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012003.fselect(g,tp,c)
return g:IsContains(c)
and Duel.IsExistingMatchingCard(c101012003.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function c101012003.xyzfilter(c,g)
return c:IsSetCard(0x119) and c:IsXyzSummonable(g,2,2)
end
function c101012003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101012003.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and g:CheckSubGroup(c101012003.fselect,2,2,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
function c101012003.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101012003.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101012003.fselect,false,2,2,tp,e:GetHandler())
if sg and sg:GetCount()==2 then
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
local e2=e1:Clone()
tc2:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e3)
local e4=e3:Clone()
tc2:RegisterEffect(e4)
Duel.SpecialSummonComplete()
local xyzg=Duel.GetMatchingGroup(c101012003.xyzfilter,tp,LOCATION_EXTRA,0,nil,sg)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,sg)
end
end
end
function c101012003.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c101012003.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(101012003,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c101012003.atkval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c101012003.atkval(e,c)
return e:GetHandler():GetOverlayCount()*300
end
--剛鬼アイアン・クロー
--Scripted by mallu11
function c101012004.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012004,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,101012004)
e1:SetCondition(c101012004.atkcon)
e1:SetCost(c101012004.atkcost)
e1:SetOperation(c101012004.atkop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012004,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101012104)
e2:SetCondition(c101012004.thcon)
e2:SetTarget(c101012004.thtg)
e2:SetOperation(c101012004.thop)
c:RegisterEffect(e2)
end
function c101012004.atkcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a:IsControler(tp) then a,d=d,a end
e:SetLabelObject(a)
return a and a:IsFaceup() and a:IsControler(tp) and a:IsSetCard(0xfc) and a:IsRelateToBattle() and d and d:IsControler(1-tp)
end
function c101012004.atkcost(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 c101012004.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local a=e:GetLabelObject()
if not a or not a:IsRelateToBattle() then return end
if a:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
a:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c101012004.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetOwnerPlayer(tp)
a:RegisterEffect(e2)
end
end
function c101012004.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c101012004.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c101012004.thfilter(c)
return c:IsSetCard(0xfc) and not c:IsCode(101012004) and c:IsAbleToHand()
end
function c101012004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012004.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 c101012005.initial_effect(c)
--battle indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetCondition(c101012005.indcon)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012005,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012005)
e2:SetTarget(c101012005.atktg)
e2:SetOperation(c101012005.atkop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012005,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101012105)
e3:SetCondition(c101012005.thcon)
e3:SetTarget(c101012005.thtg)
e3:SetOperation(c101012005.thop)
c:RegisterEffect(e3)
end
function c101012005.indcon(e)
return e:GetHandler():IsDefensePos()
end
function c101012005.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfc)
end
function c101012005.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012005.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c101012005.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101012005.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c101012005.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c101012005.thfilter(c)
return c:IsSetCard(0xfc) and not c:IsCode(101012005) and c:IsAbleToHand()
end
function c101012005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012005.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 c101012006.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012006,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012006)
e1:SetCost(c101012006.srcost)
e1:SetTarget(c101012006.srtg)
e1:SetOperation(c101012006.srop)
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(c101012006.reptg)
e2:SetValue(c101012006.repval)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012006,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101012106)
e3:SetTarget(c101012006.atktg)
e3:SetOperation(c101012006.atkop)
c:RegisterEffect(e3)
end
function c101012006.costfilter(c,tp)
return c:IsSetCard(0x12b) and c:IsType(TYPE_TRAP) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101012006.srfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c101012006.srfilter(c,code)
return c:IsSetCard(0x12b) and c:IsType(TYPE_TRAP) and not c:IsCode(code) and c:IsAbleToHand()
end
function c101012006.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012006.costfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c101012006.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
e:SetLabel(tc:GetCode())
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function c101012006.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012006.srop(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012006.srfilter,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101012006.repfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c101012006.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c101012006.repfilter,1,nil,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
return true
else return false end
end
function c101012006.repval(e,c)
return c101012006.repfilter(c,e:GetHandlerPlayer())
end
function c101012006.atktg(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_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101012006.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--ノクトビジョン・ドラゴン
--Scripted by mallu11
function c101012007.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012007)
e1:SetCondition(c101012007.spcon)
e1:SetTarget(c101012007.sptg)
e1:SetOperation(c101012007.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012007,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,101012107)
e2:SetCondition(c101012007.drcon)
e2:SetTarget(c101012007.drtg)
e2:SetOperation(c101012007.drop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012007,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c101012007.discon)
e3:SetCost(aux.bfgcost)
e3:SetOperation(c101012007.disop)
c:RegisterEffect(e3)
end
function c101012007.spfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsControler(tp)
end
function c101012007.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012007.spfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c101012007.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 c101012007.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 c101012007.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c101012007.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101012007.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 c101012007.tfilter(c,tp)
return c:IsOnField() and c:IsControler(tp) and c:IsFacedown()
end
function c101012007.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c101012007.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c101012007.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(Card.IsFacedown,nil):Filter(Card.IsRelateToEffect,nil,re)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetValue(c101012007.tgoval)
e1:SetCondition(c101012007.tgocon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
function c101012007.tgoval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
function c101012007.tgocon(e)
return e:GetHandler():IsFacedown()
end
--アークネメシス・プロートス
--Scripted by mallu11
function c101012008.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101012008.sprcon)
e1:SetTarget(c101012008.sprtg)
e1:SetOperation(c101012008.sprop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012008,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101012008)
e3:SetTarget(c101012008.destg)
e3:SetOperation(c101012008.desop)
c:RegisterEffect(e3)
end
function c101012008.sprfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToRemoveAsCost()
end
function c101012008.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetAttribute)==#g
end
function c101012008.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(c101012008.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return rg:CheckSubGroup(c101012008.fselect,3,3,tp)
end
function c101012008.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(c101012008.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectSubGroup(tp,c101012008.fselect,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c101012008.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:DeleteGroup()
end
function c101012008.desfilter(c,attr)
return c:IsFaceup() and c:IsAttribute(attr)
end
function c101012008.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
local attr=0
while tc do
attr=attr|tc:GetAttribute()
tc=g:GetNext()
end
local at=Duel.AnnounceAttribute(tp,1,attr)
e:SetLabel(at)
local dg=Duel.GetMatchingGroup(c101012008.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,at)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c101012008.desop(e,tp,eg,ep,ev,re,r,rp)
local attr=e:GetLabel()
local dg=Duel.GetMatchingGroup(c101012008.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,attr)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetLabel(attr)
e1:SetTarget(c101012008.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c101012008.splimit(e,c)
return c:IsAttribute(e:GetLabel())
end
--アークネメシス・エスカトス
--Scripted by mallu11
function c101012009.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101012009.sprcon)
e1:SetTarget(c101012009.sprtg)
e1:SetOperation(c101012009.sprop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012009,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101012009)
e3:SetTarget(c101012009.destg)
e3:SetOperation(c101012009.desop)
c:RegisterEffect(e3)
end
function c101012009.sprfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToRemoveAsCost()
end
function c101012009.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetRace)==#g
end
function c101012009.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(c101012009.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return rg:CheckSubGroup(c101012009.fselect,3,3,tp)
end
function c101012009.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(c101012009.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=rg:SelectSubGroup(tp,c101012009.fselect,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c101012009.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:DeleteGroup()
end
function c101012009.desfilter(c,race)
return c:IsFaceup() and c:IsRace(race)
end
function c101012009.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
local race=0
while tc do
race=race|tc:GetRace()
tc=g:GetNext()
end
local rc=Duel.AnnounceRace(tp,1,race)
e:SetLabel(rc)
local dg=Duel.GetMatchingGroup(c101012009.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,rc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c101012009.desop(e,tp,eg,ep,ev,re,r,rp)
local race=e:GetLabel()
local dg=Duel.GetMatchingGroup(c101012009.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,race)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetLabel(race)
e1:SetTarget(c101012009.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c101012009.splimit(e,c)
return c:IsRace(e:GetLabel())
end
--ネメシス・フラッグ
--Scripted by mallu11
function c101012010.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012010)
e1:SetTarget(c101012010.sptg)
e1:SetOperation(c101012010.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012010,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012110)
e2:SetTarget(c101012010.srtg)
e2:SetOperation(c101012010.srop)
c:RegisterEffect(e2)
end
function c101012010.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsCode(101012010) and c:IsAbleToDeck()
end
function c101012010.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101012010.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012010.tdfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101012010.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101012010.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c101012010.srfilter(c)
return c:IsSetCard(0x23e) and c:IsType(TYPE_MONSTER) and not c:IsCode(101012010) and c:IsAbleToHand()
end
function c101012010.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012010.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012010.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012010.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
--ネメシス・アンブレラ
--Scripted by mallu11
function c101012011.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012011)
e1:SetTarget(c101012011.sptg)
e1:SetOperation(c101012011.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012011,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012111)
e2:SetTarget(c101012011.thtg)
e2:SetOperation(c101012011.thop)
c:RegisterEffect(e2)
end
function c101012011.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsCode(101012011) and c:IsAbleToDeck()
end
function c101012011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101012011.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012011.tdfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101012011.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101012011.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c101012011.thfilter(c)
return c:IsSetCard(0x23e) and c:IsType(TYPE_MONSTER) and not c:IsCode(101012011) and c:IsAbleToHand()
end
function c101012011.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101012011.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012011.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101012011.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101012011.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--ネメシス・コリドー
--Scripted by mallu11
function c101012012.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012012)
e1:SetTarget(c101012012.sptg)
e1:SetOperation(c101012012.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012012,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012112)
e2:SetTarget(c101012012.thtg)
e2:SetOperation(c101012012.thop)
c:RegisterEffect(e2)
end
function c101012012.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsCode(101012012) and c:IsAbleToDeck()
end
function c101012012.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101012012.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012012.tdfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101012012.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101012012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c101012012.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23e) and c:IsType(TYPE_MONSTER) and not c:IsCode(101012012) and c:IsAbleToHand()
end
function c101012012.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101012012.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012012.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101012012.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101012012.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--スカーレッド・ファミリア
--Scripted by mallu11
function c101012016.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012016)
e1:SetCost(c101012016.spcost)
e1:SetTarget(c101012016.sptg)
e1:SetOperation(c101012016.spop)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012016,1))
e2:SetCategory(CATEGORY_LVCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101012116)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101012016.lvtg)
e2:SetOperation(c101012016.lvop)
c:RegisterEffect(e2)
end
function c101012016.costfilter(c,tp)
return c:IsRace(RACE_FIEND) and Duel.GetMZoneCount(tp,c)>0
end
function c101012016.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101012016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101012016.costfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101012016.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c101012016.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101012016.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101012016.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101012016.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101012016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function c101012016.lvfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) and c:IsLevelAbove(1)
end
function c101012016.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012016.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012016.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012016.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
local lv=g:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101012016,2))
e:SetLabel(Duel.AnnounceLevel(tp,1,8,lv))
end
function c101012016.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--スカーレッド・ファミリア
--Scripted by mallu11
function c101012016.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012016)
e1:SetCost(c101012016.spcost)
e1:SetTarget(c101012016.sptg)
e1:SetOperation(c101012016.spop)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012016,1))
e2:SetCategory(CATEGORY_LVCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101012116)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101012016.lvtg)
e2:SetOperation(c101012016.lvop)
c:RegisterEffect(e2)
end
function c101012016.costfilter(c,tp)
return c:IsRace(RACE_FIEND) and Duel.GetMZoneCount(tp,c)>0
end
function c101012016.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101012016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101012016.costfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101012016.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c101012016.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101012016.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101012016.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101012016.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101012016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function c101012016.lvfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) and c:IsLevelAbove(1)
end
function c101012016.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012016.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012016.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012016.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
local lv=g:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101012016,2))
e:SetLabel(Duel.AnnounceLevel(tp,1,8,lv))
end
function c101012016.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--クリムゾン・リゾネーター
--Scripted by mallu11
function c101012017.initial_effect(c)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012017)
e1:SetCondition(c101012017.spcon1)
e1:SetCost(c101012017.spcost)
e1:SetTarget(c101012017.sptg1)
e1:SetOperation(c101012017.spop1)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012017,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012117)
e2:SetCondition(c101012017.spcon2)
e2:SetCost(c101012017.spcost)
e2:SetTarget(c101012017.sptg2)
e2:SetOperation(c101012017.spop2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(101012017,ACTIVITY_SPSUMMON,c101012017.counterfilter)
end
function c101012017.counterfilter(c)
return (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function c101012017.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c101012017.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101012017,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101012017.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101012017.splimit(e,c)
return not (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c101012017.sptg1(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101012017.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101012017.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
end
function c101012017.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101012017.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler())==1
end
function c101012017.spfilter(c,e,tp)
return c:IsSetCard(0x57) and not c:IsCode(101012017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012017.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101012017.spfilter,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 c101012017.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local ct=math.min(ft,2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012017.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--クリムゾン・リゾネーター
--Scripted by mallu11
function c101012017.initial_effect(c)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012017)
e1:SetCondition(c101012017.spcon1)
e1:SetCost(c101012017.spcost)
e1:SetTarget(c101012017.sptg1)
e1:SetOperation(c101012017.spop1)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012017,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012117)
e2:SetCondition(c101012017.spcon2)
e2:SetCost(c101012017.spcost)
e2:SetTarget(c101012017.sptg2)
e2:SetOperation(c101012017.spop2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(101012017,ACTIVITY_SPSUMMON,c101012017.counterfilter)
end
function c101012017.counterfilter(c)
return (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function c101012017.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c101012017.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101012017,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101012017.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101012017.splimit(e,c)
return not (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)) and c:IsLocation(LOCATION_EXTRA)
end
function c101012017.sptg1(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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101012017.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101012017.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
end
function c101012017.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101012017.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler())==1
end
function c101012017.spfilter(c,e,tp)
return c:IsSetCard(0x57) and not c:IsCode(101012017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012017.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101012017.spfilter,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 c101012017.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local ct=math.min(ft,2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012017.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ランタン・シャーク
--
--Scripted by mallu11
function c101012018.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101012018)
e1:SetTarget(c101012018.sptg)
e1:SetOperation(c101012018.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--xyzlv
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_XYZ_LEVEL)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c101012018.xyzlv)
c:RegisterEffect(e3)
end
function c101012018.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(3) and c:IsLevelBelow(5) and not c:IsCode(101012018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101012018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101012018.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101012018.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012018.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c101012018.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101012018.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c101012018.xyzlv(e,c,rc)
if rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(3) then
return c:GetLevel()+0x10000*3
elseif rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(5) then
return c:GetLevel()+0x10000*5
else
return c:GetLevel()
end
end
--ランタン・シャーク
--
--Scripted by mallu11
function c101012018.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101012018)
e1:SetTarget(c101012018.sptg)
e1:SetOperation(c101012018.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--xyzlv
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_XYZ_LEVEL)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c101012018.xyzlv)
c:RegisterEffect(e3)
end
function c101012018.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(3) and c:IsLevelBelow(5) and not c:IsCode(101012018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101012018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101012018.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101012018.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012018.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c101012018.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101012018.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c101012018.xyzlv(e,c,rc)
if rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(3) then
return c:GetLevel()+0x10000*3
elseif rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(5) then
return c:GetLevel()+0x10000*5
else
return c:GetLevel()
end
end
--カッター・シャーク
--
--Scripted by mallu11
function c101012019.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012019)
e1:SetTarget(c101012019.sptg)
e1:SetOperation(c101012019.spop)
c:RegisterEffect(e1)
--xyzlv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101012019.xyzlv)
c:RegisterEffect(e2)
end
function c101012019.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c101012019.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel(),c:GetCode())
end
function c101012019.spfilter(c,e,tp,lv,code)
return c:IsRace(RACE_FISH) and c:IsLevel(lv) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101012019.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012019.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101012019.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012019.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101012019.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local lv=tc:GetLevel()
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012019.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv,code)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(c101012019.splimit)
Duel.RegisterEffect(e2,tp)
end
function c101012019.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c101012019.xyzlv(e,c,rc)
if rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(3) then
return c:GetLevel()+0x10000*3
elseif rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(5) then
return c:GetLevel()+0x10000*5
else
return c:GetLevel()
end
end
--カッター・シャーク
--
--Scripted by mallu11
function c101012019.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012019)
e1:SetTarget(c101012019.sptg)
e1:SetOperation(c101012019.spop)
c:RegisterEffect(e1)
--xyzlv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101012019.xyzlv)
c:RegisterEffect(e2)
end
function c101012019.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c101012019.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel(),c:GetCode())
end
function c101012019.spfilter(c,e,tp,lv,code)
return c:IsRace(RACE_FISH) and c:IsLevel(lv) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101012019.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012019.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101012019.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012019.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101012019.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local lv=tc:GetLevel()
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012019.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv,code)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(c101012019.splimit)
Duel.RegisterEffect(e2,tp)
end
function c101012019.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c101012019.xyzlv(e,c,rc)
if rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(3) then
return c:GetLevel()+0x10000*3
elseif rc:IsAttribute(ATTRIBUTE_WATER) and rc:IsRank(5) then
return c:GetLevel()+0x10000*5
else
return c:GetLevel()
end
end
--宵星の騎士ギルス
--Scripted by mallu11
function c101012024.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012024,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101012024)
e1:SetTarget(c101012024.tgtg)
e1:SetOperation(c101012024.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012024,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101012124)
e3:SetCondition(c101012024.spcon)
e3:SetTarget(c101012024.sptg)
e3:SetOperation(c101012024.spop)
c:RegisterEffect(e3)
end
function c101012024.tgfilter(c)
return c:IsSetCard(0x11b,0xfe) and c:IsAbleToGrave()
end
function c101012024.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012024.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101012024.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101012024.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
if c:GetColumnGroup():GetCount()>=2 and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
end
function c101012024.tgfilter(c)
return c:IsSetCard(0x11b,0xfe) and c:IsAbleToGrave()
end
function c101012024.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler())==0
end
function c101012024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,101012124,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c101012024.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 or ft2<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,101012124,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,101012124)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local token=Duel.CreateToken(tp,101012124)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--天雷震龍-サンダー・ドラゴン
--Scripted by mallu11
function c101012025.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101012025.spcon)
e1:SetOperation(c101012025.spop)
c:RegisterEffect(e1)
--effect target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012025,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(c101012025.etcon)
e2:SetCost(c101012025.etcost)
e2:SetTarget(c101012025.ettg)
e2:SetOperation(c101012025.etop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012025,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c101012025.tgcon)
e3:SetTarget(c101012025.tgtg)
e3:SetOperation(c101012025.tgop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(101012025,ACTIVITY_CHAIN,c101012025.chainfilter)
end
function c101012025.chainfilter(re,tp,cid)
return not (re:GetHandler():IsRace(RACE_THUNDER) and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND)
end
function c101012025.spfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsLevelBelow(8) and c:IsRace(RACE_THUNDER) and c:IsAbleToRemoveAsCost()
end
function c101012025.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return (Duel.GetCustomActivityCount(101012025,tp,ACTIVITY_CHAIN)~=0
or Duel.GetCustomActivityCount(101012025,1-tp,ACTIVITY_CHAIN)~=0)
and Duel.IsExistingMatchingCard(c101012025.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end
function c101012025.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c101012025.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012025.etcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c101012025.fselect(g)
return g:IsExists(Card.IsRace,1,nil,RACE_THUNDER)
end
function c101012025.etcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(c101012025.fselect,2,2) end
local rg=g:SelectSubGroup(tp,c101012025.fselect,false,2,2)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function c101012025.etfilter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER)
end
function c101012025.ettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012025.etfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012025.etfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101012025.etfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101012025.etop(e,tp,eg,ep,ev,re,r,rp,chk)
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_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetValue(c101012025.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
end
function c101012025.tgoval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
function c101012025.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c101012025.tgfilter(c)
return c:IsSetCard(0x11c) and c:IsAbleToGrave()
end
function c101012025.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012025.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101012025.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101012025.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--ドラゴンメイド・チェイム
--Scripted by mallu11
function c101012026.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012026,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101012026)
e1:SetTarget(c101012026.srtg)
e1:SetOperation(c101012026.srop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012026,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101012126)
e3:SetTarget(c101012026.sptg)
e3:SetOperation(c101012026.spop)
c:RegisterEffect(e3)
end
function c101012026.srfilter(c)
return c:IsSetCard(0x133) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101012026.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012026.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012026.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012026.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c101012026.spfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelAbove(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012026.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(c101012026.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,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_HAND+LOCATION_GRAVE)
end
function c101012026.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.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101012026.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--轟の王 ハール
--Scripted by mallu11
function c101012027.initial_effect(c)
c:SetUniqueOnField(1,0,101012027)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012027,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c101012027.tgcon)
e1:SetTarget(c101012027.tgtg)
e1:SetOperation(c101012027.tgop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012027,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,101012027)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101012027.discon)
e2:SetCost(c101012027.discost)
e2:SetTarget(c101012027.distg)
e2:SetOperation(c101012027.disop)
c:RegisterEffect(e2)
end
function c101012027.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c101012027.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c101012027.cfilter,1,nil,1-tp)
end
function c101012027.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE+LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND)
end
function c101012027.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
function c101012027.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c101012027.costfilter(c)
return c:IsSetCard(0x134) or c:IsRace(RACE_SPELLCASTER)
end
function c101012027.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101012027.costfilter,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101012027.costfilter,2,2,nil)
Duel.Release(g,REASON_COST)
end
function c101012027.distg(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 c101012027.disop(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
--破械童子サラマ
--Scripted by mallu11
function c101012029.initial_effect(c)
--set card
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012029,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012029)
e1:SetTarget(c101012029.settg)
e1:SetOperation(c101012029.setop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012029,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101012129)
e2:SetCondition(c101012029.spcon)
e2:SetTarget(c101012029.sptg)
e2:SetOperation(c101012029.spop)
c:RegisterEffect(e2)
end
function c101012029.setfilter(c,e,tp)
if not c:IsSetCard(0x130) or c:IsCode(101012029) then return false end
if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else return c:IsSSetable() end
end
function c101012029.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101012029.setfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101012029.setfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c101012029.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetFirst():IsType(TYPE_MONSTER) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end
function c101012029.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local res=false
if tc:IsType(TYPE_MONSTER) then
res=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if res~=0 then Duel.ConfirmCards(1-tp,tc) end
else
res=Duel.SSet(tp,tc)
end
if res~=0 then
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
if ct>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c101012029.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and not re:GetHandler():IsCode(101012029))) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c101012029.spfilter(c,e,tp)
return c:IsSetCard(0x130) and not c:IsCode(101012029) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012029.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101012029.spfilter,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 c101012029.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,c101012029.spfilter,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)
end
end
--獣神王バルバロス
--Scripted by mallu11
function c101012030.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012030,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012030)
e1:SetCost(c101012030.spcost)
e1:SetTarget(c101012030.sptg)
e1:SetOperation(c101012030.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012030,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012130)
e2:SetCost(c101012030.descost)
e2:SetTarget(c101012030.destg)
e2:SetOperation(c101012030.desop)
c:RegisterEffect(e2)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c101012030.fselect(g,tp)
Duel.SetSelectedCard(g)
if Duel.GetMZoneCount(tp,g)>0 and g:CheckWithSumGreater(Card.GetLevel,8) then
Duel.SetSelectedCard(g)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function c101012030.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp):Filter(Card.IsLevelAbove,nil,1)
if chk==0 then return g:CheckSubGroup(c101012030.fselect,1,g:GetCount(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=g:SelectSubGroup(tp,c101012030.fselect,false,1,g:GetCount(),tp)
Duel.Release(rg,REASON_COST)
end
function c101012030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101012030.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 c101012030.cfilter(c)
return c:IsSetCard(0x23d) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToRemoveAsCost()
end
function c101012030.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012030.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101012030.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012030.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(aux.TURE,tp,0,LOCATION_ONFIELD,2,nil) end
local g=Duel.SelectTarget(tp,aux.TURE,tp,0,LOCATION_ONFIELD,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c101012030.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(tg,REASON_EFFECT)
end
--機巧狐-宇迦之御魂稲荷
--Scripted by mallu11
function c101012031.initial_effect(c)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012031)
e1:SetCondition(c101012031.spcon1)
e1:SetTarget(c101012031.sptg1)
e1:SetOperation(c101012031.spop1)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012031,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101012131)
e2:SetTarget(c101012031.sptg2)
e2:SetOperation(c101012031.spop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101012031,2))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c101012031.damcon)
e4:SetTarget(c101012031.damtg)
e4:SetOperation(c101012031.damop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c101012031.filter(c)
return c:GetSummonLocation()==LOCATION_DECK
end
function c101012031.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012031.filter,1,nil)
end
function c101012031.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101012031.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101012031.cfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c101012031.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c:GetAttribute())
end
function c101012031.spfilter(c,e,tp,attr)
return c:GetTextAttack()>=0 and c:GetTextAttack()==c:GetTextDefense() and c:IsAttribute(attr)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012031.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101012031.cfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101012031.cfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101012031.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local attr=tc:GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012031.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,attr)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c101012031.damfilter(c,tp)
return c:GetSummonPlayer()==1-tp
end
function c101012031.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012031.damfilter,1,nil,tp)
end
function c101012031.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function c101012031.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,300,REASON_EFFECT)
end
--トリアス・ヒエラルキア
--Scripted by mallu11
function c101012032.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012032,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,101012032)
e1:SetCondition(c101012032.spcon)
e1:SetCost(c101012032.spcost)
e1:SetTarget(c101012032.sptg)
e1:SetOperation(c101012032.spop)
c:RegisterEffect(e1)
end
function c101012032.spfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsControler(tp)
end
function c101012032.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101012032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_FAIRY) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,3,nil,RACE_FAIRY)
e:SetLabel(Duel.Release(g,REASON_COST))
end
function c101012032.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
local ct=e:GetLabel()
local cat=CATEGORY_SPECIAL_SUMMON
if ct==3 then
cat=cat+CATEGORY_DRAW
e:SetCategory(cat)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101012032.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if (ct>=2 and g:GetCount()>0) or ct==3 then
if ct>=2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101012032,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
Duel.HintSelection(dg)
res=Duel.Destroy(dg,REASON_EFFECT)
end
if ct==3 and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(101012032,2)) then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
end
--氷天禍チルブレイン
--Scripted by mallu11
function c101012033.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012033,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012033)
e1:SetCondition(c101012033.spcon)
e1:SetTarget(c101012033.sptg)
e1:SetOperation(c101012033.spop)
c:RegisterEffect(e1)
end
function c101012033.cfilter(c,tp,rp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WATER)~=0
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c101012033.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012033.cfilter,1,nil,tp)
end
function c101012033.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)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_HAND)
end
function c101012033.spop(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
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101012033,1)) then
Duel.BreakEffect()
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
--ユニオン・ドライバー
--Scripted by mallu11
function c101012034.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012034,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c101012034.eqtg)
e1:SetOperation(c101012034.eqop)
c:RegisterEffect(e1)
--unequip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012034,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c101012034.sptg)
e2:SetOperation(c101012034.spop)
c:RegisterEffect(e2)
--destroy sub
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetValue(c101012034.repval)
c:RegisterEffect(e3)
--reequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101012034,2))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,101012034)
e4:SetCost(c101012034.recost)
e4:SetTarget(c101012034.retg)
e4:SetOperation(c101012034.reop)
c:RegisterEffect(e4)
--eqlimit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_EQUIP_LIMIT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(c101012034.eqlimit)
c:RegisterEffect(e5)
end
function c101012034.filter(c)
local ct1,ct2=c:GetUnionCount()
return c:IsFaceup() and ct2==0
end
function c101012034.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012034.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(101012034)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101012034.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101012034.filter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
c:RegisterFlagEffect(101012034,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c101012034.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c101012034.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
aux.SetUnionState(c)
end
function c101012034.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(101012034)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(101012034,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c101012034.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,true,false,POS_FACEUP)
end
function c101012034.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 or bit.band(r,REASON_EFFECT)~=0
end
function c101012034.recost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget()
e:SetLabelObject(tc)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c101012034.refilter(c,tc,tp)
return aux.CheckUnionEquip(c,tc) and c:CheckEquipTarget(tc) and c:IsType(TYPE_UNION) and c:IsLevelBelow(4) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c101012034.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101012034.refilter,tp,LOCATION_DECK,0,1,nil,c:GetEquipTarget(),tp) end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
end
function c101012034.reop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c101012034.refilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
local ec=g:GetFirst()
if ec and aux.CheckUnionEquip(ec,tc) and Duel.Equip(tp,ec,tc) then
aux.SetUnionState(ec)
end
end
end
function c101012034.eqlimit(e,c)
return e:GetHandler():GetEquipTarget()==c
end
--悪魔嬢マリス
--Scripted by mallu11
function c101012035.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012035,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101012035)
e1:SetCost(c101012035.stcost)
e1:SetTarget(c101012035.sttg)
e1:SetOperation(c101012035.stop)
c:RegisterEffect(e1)
end
function c101012035.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,aux.TRUE,2,nil) end
local g=Duel.SelectReleaseGroup(tp,aux.TRUE,2,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.Release(g,REASON_COST)
end
function c101012035.stfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function c101012035.sttg(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 c101012035.stfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012035.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c101012035.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c101012035.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e1)
end
end
--悪魔嬢マリス
--Scripted by mallu11
function c101012035.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012035,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101012035)
e1:SetCost(c101012035.stcost)
e1:SetTarget(c101012035.sttg)
e1:SetOperation(c101012035.stop)
c:RegisterEffect(e1)
end
function c101012035.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,aux.TRUE,2,nil) end
local g=Duel.SelectReleaseGroup(tp,aux.TRUE,2,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.Release(g,REASON_COST)
end
function c101012035.stfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function c101012035.sttg(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 c101012035.stfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012035.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c101012035.stfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c101012035.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e1)
end
end
--朔夜しぐれ
--Scripted by mallu11
function c101012036.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012036,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101012036)
e1:SetCondition(c101012036.discon)
e1:SetCost(c101012036.discost)
e1:SetTarget(c101012036.distg)
e1:SetOperation(c101012036.disop)
c:RegisterEffect(e1)
end
function c101012036.cfilter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()==1-tp and (aux.disfilter1(c) or c:GetAttack()>0)
end
function c101012036.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012036.cfilter,1,nil,tp)
end
function c101012036.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c101012036.disfilter(c,g)
return g:IsContains(c)
end
function c101012036.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c101012036.cfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101012036.disfilter(chkc,g) end
if chk==0 then return Duel.IsExistingTarget(c101012036.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101012036.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
end
end
function c101012036.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() 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)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012036,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e3:SetReset(RESET_EVENT+RESET_TURN_SET+RESET_OVERLAY+RESET_MSCHANGE+RESET_PHASE+PHASE_END)
e3:SetOperation(c101012036.damop)
tc:RegisterEffect(e3,true)
end
end
function c101012036.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101012036)
local c=e:GetHandler()
local atk=c:GetTextAttack()
if atk<0 then atk=0 end
Duel.Damage(c:GetPreviousControler(),atk,REASON_EFFECT)
e:Reset()
end
--珠玉獣-アルゴザウルス
--Scripted by mallu11
function c101012037.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012037,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101012037)
e1:SetTarget(c101012037.destg)
e1:SetOperation(c101012037.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c101012037.desfilter(c,tp)
return c:IsRace(RACE_DINOSAUR) and not c:IsCode(101012037) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and Duel.IsExistingMatchingCard(c101012037.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetOriginalLevel())
end
function c101012037.thfilter(c,lv)
return ((c:GetOriginalLevel()==lv and c:IsRace(RACE_REPTILE+RACE_SEASERPENT+RACE_WINDBEAST)) or (c:IsSetCard(0x10e) and c:IsType(TYPE_SPELL))) and c:IsAbleToHand()
end
function c101012037.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012037.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(c101012037.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012037.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c101012037.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local lv=tc:GetOriginalLevel()
if Duel.IsExistingMatchingCard(c101012037.thfilter,tp,LOCATION_DECK,0,1,nil,lv) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c101012037.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
--百景戦都ゴルディロックス
--Scripted by mallu11
function c101012038.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c101012038.descon)
e1:SetOperation(c101012038.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101012038.atkcon)
e3:SetValue(3000)
c:RegisterEffect(e3)
--move
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101012038,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c101012038.seqtg)
e4:SetOperation(c101012038.seqop)
c:RegisterEffect(e4)
end
function c101012038.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()==2
end
function c101012038.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c101012038.atkcon(e)
return e:GetHandler():GetSequence()==2
end
function c101012038.seqfilter(c)
local tp=c:GetControler()
return c:IsFaceup() and c:GetSequence()<5 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0
end
function c101012038.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
e:SetLabel(math.log(fd,2))
end
function c101012038.seqfilter(c,tp,seq)
if c:IsControler(tp) then
return c:GetSequence()==seq
else
return c:GetSequence()==4-seq
end
end
function c101012038.exfilter(c,tp,seq)
if seq==1 then seq=5 end
if seq==3 then seq=6 end
if c:IsControler(tp) then
return c:GetSequence()==seq
else
return c:GetSequence()==11-seq
end
end
function c101012038.seqop(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or not Duel.CheckLocation(tp,LOCATION_MZONE,seq) then return end
local pseq=c:GetSequence()
if pseq>4 then return end
Duel.MoveSequence(c,seq)
if c:GetSequence()==seq then
if pseq>seq then pseq,seq=seq,pseq end
local dg=Group.CreateGroup()
dg:KeepAlive()
local g=nil
local exg=nil
for i=pseq,seq do
g=Duel.GetMatchingGroup(c101012038.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,tp,i)
dg:Merge(g)
if i==1 or i==3 then
exg=Duel.GetMatchingGroup(c101012038.exfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,tp,i)
dg:Merge(exg)
end
end
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
--マジカル・ハウンド
--Scripted by mallu11
function c101012039.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012039,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,101012039+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c101012039.sptg)
e1:SetOperation(c101012039.spop)
c:RegisterEffect(e1)
end
function c101012039.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101012039.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c101012039.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012039.cfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101012039.cfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101012039.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--召喚獣アウゴエイデス
--Scripted by mallu11
function c101012040.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,86120751,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),1,true,true)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012040,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101012040)
e1:SetTarget(c101012040.destg)
e1:SetOperation(c101012040.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(101012040,1))
e2:SetCode(EVENT_CUSTOM+101012040)
c:RegisterEffect(e2)
--event
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101012040.evcon)
e3:SetOperation(c101012040.evop)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101012040,2))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c101012040.atkcost)
e4:SetOperation(c101012040.atkop)
c:RegisterEffect(e4)
end
function c101012040.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp)
end
function c101012040.evcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c101012040.cfilter,1,nil,1-tp)
end
function c101012040.evop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+101012040,re,r,rp,ep,ev)
end
function c101012040.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101012040.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 c101012040.atkfilter(c)
return c:IsType(TYPE_FUSION) and c:IsAttackAbove(1) and c:IsAbleToRemoveAsCost()
end
function c101012040.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012040.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101012040.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local atk=g:GetFirst():GetAttack()
e:SetLabel(atk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012040.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabel()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
c:RegisterEffect(e1)
end
end
--召喚獣アウゴエイデス
--Scripted by mallu11
function c101012040.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,86120751,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),1,true,true)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012040,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101012040)
e1:SetTarget(c101012040.destg)
e1:SetOperation(c101012040.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(101012040,1))
e2:SetCode(EVENT_CUSTOM+101012040)
c:RegisterEffect(e2)
--event
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101012040.evcon)
e3:SetOperation(c101012040.evop)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101012040,2))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c101012040.atkcost)
e4:SetOperation(c101012040.atkop)
c:RegisterEffect(e4)
end
function c101012040.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp)
end
function c101012040.evcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c101012040.cfilter,1,nil,1-tp)
end
function c101012040.evop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+101012040,re,r,rp,ep,ev)
end
function c101012040.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101012040.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 c101012040.atkfilter(c)
return c:IsType(TYPE_FUSION) and c:IsAttackAbove(1) and c:IsAbleToRemoveAsCost()
end
function c101012040.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012040.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101012040.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local atk=g:GetFirst():GetAttack()
e:SetLabel(atk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012040.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabel()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
c:RegisterEffect(e1)
end
end
--ドラゴンメイド・シュトラール
--Scripted by mallu11
function c101012041.initial_effect(c)
--fusion material
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x133),c101012041.ffilter,true)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012041,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012041)
e1:SetTarget(c101012041.sptg)
e1:SetOperation(c101012041.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012041,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012141)
e2:SetCondition(c101012041.discon)
e2:SetTarget(c101012041.distg)
e2:SetOperation(c101012041.disop)
c:RegisterEffect(e2)
end
function c101012041.ffilter(c)
return c:IsLevelAbove(5) and c:IsRace(RACE_DRAGON)
end
function c101012041.spfilter(c,e,tp)
return c:IsLevelBelow(9) and c:IsSetCard(0x133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012041.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101012041.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101012041.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(c101012041.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101012041.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep==1-tp
end
function c101012041.cfilter(c,e,tp,ec)
return c:IsCode(41232647) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,ec,c)>0
end
function c101012041.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() and Duel.IsExistingMatchingCard(c101012041.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) 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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101012041.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
if c:IsAbleToExtra() and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012041.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--ドラゴンメイド・シュトラール
--Scripted by mallu11
function c101012041.initial_effect(c)
--fusion material
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x133),c101012041.ffilter,true)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012041,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101012041)
e1:SetTarget(c101012041.sptg)
e1:SetOperation(c101012041.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012041,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012141)
e2:SetCondition(c101012041.discon)
e2:SetTarget(c101012041.distg)
e2:SetOperation(c101012041.disop)
c:RegisterEffect(e2)
end
function c101012041.ffilter(c)
return c:IsLevelAbove(5) and c:IsRace(RACE_DRAGON)
end
function c101012041.spfilter(c,e,tp)
return c:IsLevelBelow(9) and c:IsSetCard(0x133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012041.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101012041.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101012041.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(c101012041.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101012041.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep==1-tp
end
function c101012041.cfilter(c,e,tp,ec)
return c:IsCode(41232647) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,ec,c)>0
end
function c101012041.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() and Duel.IsExistingMatchingCard(c101012041.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) 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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101012041.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
if c:IsAbleToExtra() and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012041.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--飢鰐竜アーケティス
--Scripted by mallu11
function c101012043.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012043,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101012043)
e1:SetCondition(c101012043.drcon)
e1:SetTarget(c101012043.drtg)
e1:SetOperation(c101012043.drop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101012043.adval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101012043,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101012143)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c101012043.descost)
e4:SetTarget(c101012043.destg)
e4:SetOperation(c101012043.desop)
c:RegisterEffect(e4)
end
function c101012043.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101012043.matfilter(c)
return not c:IsType(TYPE_TUNER)
end
function c101012043.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
if mg:GetCount()<=0 then return false end
local ct=mg:FilterCount(c101012043.matfilter,nil)
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 c101012043.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 c101012043.adval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*500
end
function c101012043.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c101012043.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(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101012043.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
......@@ -50,7 +50,7 @@ end
function c101012046.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
--コードブレイカー・ウイルスバーサーカー
--Scripted by mallu11
function c101012051.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,3,c101012051.lcheck)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012051,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101012051)
e1:SetCost(c101012051.spcon)
e1:SetTarget(c101012051.sptg)
e1:SetOperation(c101012051.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012051,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012151)
e2:SetTarget(c101012051.destg)
e2:SetOperation(c101012051.desop)
c:RegisterEffect(e2)
end
function c101012051.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x23c)
end
function c101012051.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c101012051.spfilter(c,e,tp)
if not c:IsSetCard(0x23c) then return false end
local ok=false
for p=0,1 do
local zone=Duel.GetLinkedZone(p)&0xff
ok=ok or (Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone))
end
return ok
end
function c101012051.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c101012051.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101012051.spop(e,tp,eg,ep,ev,re,r,rp)
local zone={}
local flag={}
for p=0,1 do
zone[p]=Duel.GetLinkedZone(p)&0xff
local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[p])
flag[p]=(~flag_tmp)&0x7f
end
local ft1=Duel.GetLocationCount(0,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[0])
local ft2=Duel.GetLocationCount(1,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[1])
if ft1+ft2<=0 then return end
local ct=math.min(ft1+ft2,2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101012051.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local ava_zone=0
for p=0,1 do
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sump=0
if sel_zone&0xff>0 then
sump=tp
else
sump=1-tp
sel_zone=sel_zone>>16
end
Duel.SpecialSummonStep(tc,0,tp,sump,false,false,POS_FACEUP,sel_zone)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
function c101012051.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23c) and c:IsLinkState()
end
function c101012051.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012051.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101012051.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101012051.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,ct,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--コードブレイカー・ウイルスバーサーカー
--Scripted by mallu11
function c101012051.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,3,c101012051.lcheck)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012051,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101012051)
e1:SetCost(c101012051.spcon)
e1:SetTarget(c101012051.sptg)
e1:SetOperation(c101012051.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012051,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101012151)
e2:SetTarget(c101012051.destg)
e2:SetOperation(c101012051.desop)
c:RegisterEffect(e2)
end
function c101012051.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x23c)
end
function c101012051.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c101012051.spfilter(c,e,tp)
if not c:IsSetCard(0x23c) then return false end
local ok=false
for p=0,1 do
local zone=Duel.GetLinkedZone(p)&0xff
ok=ok or (Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone))
end
return ok
end
function c101012051.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c101012051.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101012051.spop(e,tp,eg,ep,ev,re,r,rp)
local zone={}
local flag={}
for p=0,1 do
zone[p]=Duel.GetLinkedZone(p)&0xff
local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[p])
flag[p]=(~flag_tmp)&0x7f
end
local ft1=Duel.GetLocationCount(0,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[0])
local ft2=Duel.GetLocationCount(1,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[1])
if ft1+ft2<=0 then return end
local ct=math.min(ft1+ft2,2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101012051.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local ava_zone=0
for p=0,1 do
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sump=0
if sel_zone&0xff>0 then
sump=tp
else
sump=1-tp
sel_zone=sel_zone>>16
end
Duel.SpecialSummonStep(tc,0,tp,sump,false,false,POS_FACEUP,sel_zone)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
function c101012051.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23c) and c:IsLinkState()
end
function c101012051.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012051.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101012051.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101012051.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,ct,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--コードブレイカー・ウイルスソードマン
--Scripted by mallu11
function c101012052.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012052,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101012052)
e1:SetCost(c101012052.spcon1)
e1:SetTarget(c101012052.sptg1)
e1:SetOperation(c101012052.spop1)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c101012052.regcon1)
e2:SetOperation(c101012052.regop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012052,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,101012152)
e3:SetCondition(c101012052.spcon2)
e3:SetTarget(c101012052.sptg2)
e3:SetOperation(c101012052.spop2)
c:RegisterEffect(e3)
end
function c101012052.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c101012052.spfilter(c,e,tp)
if not c:IsCode(101012002) then return false end
local ok=false
for p=0,1 do
local zone=Duel.GetLinkedZone(p)&0xff
ok=ok or (Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone))
end
return ok
end
function c101012052.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c101012052.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c101012052.spop1(e,tp,eg,ep,ev,re,r,rp)
local zone={}
local flag={}
for p=0,1 do
zone[p]=Duel.GetLinkedZone(p)&0xff
local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[p])
flag[p]=(~flag_tmp)&0x7f
end
local ft1=Duel.GetLocationCount(0,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[0])
local ft2=Duel.GetLocationCount(1,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[1])
if ft1+ft2<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101012052.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc then
local ava_zone=0
for p=0,1 do
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sump=0
if sel_zone&0xff>0 then
sump=tp
else
sump=1-tp
sel_zone=sel_zone>>16
end
Duel.SpecialSummon(tc,0,tp,sump,false,false,POS_FACEUP,sel_zone)
end
end
end
function c101012052.regcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c101012052.regop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(101012052,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c101012052.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101012052)>0
end
function c101012052.sptg2(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,tp,LOCATION_GRAVE)
end
function c101012052.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
end
--剛鬼ザ・パワーロード・オーガ
--Scripted by mallu11
function c101012053.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_WARRIOR),2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101012053.atkval)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101012053.imcon)
e2:SetValue(c101012053.efilter)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012053,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101012053)
e3:SetCost(c101012053.descost)
e3:SetTarget(c101012053.destg)
e3:SetOperation(c101012053.desop)
c:RegisterEffect(e3)
end
function c101012053.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101012053.atkval(e,c)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(c101012053.atkfilter,tp,LOCATION_MZONE,0,e:GetHandler())
return g:GetSum(Card.GetLink)*200
end
function c101012053.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101012053.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c101012053.rfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfc) and c:IsType(TYPE_LINK) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c101012053.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101012053.rfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101012053.rfilter,1,1,nil)
e:SetLabel(g:GetFirst():GetLink())
Duel.Release(g,REASON_COST)
end
function c101012053.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return true end
local ct=e:GetLabel()
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101012053.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
--海晶乙女グレート・バブル・リーフ
--Scripted by mallu11
function c101012054.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WATER),2)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012054,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c101012054.drcost)
e1:SetTarget(c101012054.drtg)
e1:SetOperation(c101012054.drop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012054,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101012054.atkcon)
e2:SetOperation(c101012054.atkop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012054,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101012054)
e3:SetCost(c101012054.spcost)
e3:SetTarget(c101012054.sptg)
e3:SetOperation(c101012054.spop)
c:RegisterEffect(e3)
end
function c101012054.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c101012054.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012054.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101012054.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012054.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101012054.drop(e,tp,eg,ep,ev,re,r,rp,chk)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c101012054.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c101012054.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012054.atkfilter,1,nil) and not eg:IsContains(e:GetHandler())
end
function c101012054.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=eg:FilterCount(c101012054.atkfilter,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c101012054.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost()
end
function c101012054.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012054.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101012054.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101012054.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012054.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101012054.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c101012054.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,c101012054.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--逆巻く炎の宝札
--Scripted by mallu11
function c101012057.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101012057+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101012057.condition)
e1:SetCost(c101012057.cost)
e1:SetTarget(c101012057.target)
e1:SetOperation(c101012057.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(101012057,ACTIVITY_SUMMON,c101012057.counterfilter)
Duel.AddCustomActivityCounter(101012057,ACTIVITY_SPSUMMON,c101012057.counterfilter)
end
function c101012057.counterfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
function c101012057.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
end
function c101012057.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101012057,tp,ACTIVITY_SUMMON)==0
and Duel.GetCustomActivityCount(101012057,tp,ACTIVITY_SPSUMMON) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101012057.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function c101012057.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_FIRE)
end
function c101012057.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_LINK) and Duel.IsPlayerCanDraw(tp,c:GetLink())
end
function c101012057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101012057.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101012057.filter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012057.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local lk=g:GetFirst():GetLink()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(lk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,lk)
end
function c101012057.activate(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
--リンク・バースト
--Scripted by mallu11
function c101012058.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101012058+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101012058.target)
e1:SetOperation(c101012058.activate)
c:RegisterEffect(e1)
end
function c101012058.filter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101012058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101012058.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c101012058.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101012058.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.Destroy(tg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--メールの階段
--not fully implemented
--Scripted by mallu11
function c101012059.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012059,0))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c101012059.postg)
e2:SetOperation(c101012059.posop)
c:RegisterEffect(e2)
end
function c101012059.filter(c)
return c:IsSetCard(0x10b) and c:IsDiscardable(REASON_EFFECT)
end
function c101012059.posfilter(c)
return (c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition()) or (c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanTurnSet())
end
function c101012059.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012059.filter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c101012059.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,LOCATION_HAND)
end
function c101012059.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101012059.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)~=0 then
local pg=Duel.SelectMatchingCard(tp,c101012059.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
if pg:GetCount()>0 then
Duel.HintSelection(pg)
local pc=pg:GetFirst()
if pc:IsFacedown() then
Duel.ChangePosition(pc,POS_FACEUP_ATTACK)
else
Duel.ChangePosition(pc,POS_FACEDOWN_DEFENSE)
end
end
end
if tc then
local code=tc:GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(code)
e1:SetTarget(c101012059.dhlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c101012059.dhlimit(e,c,tp,r,re)
return re and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsCode(101012059) and r==REASON_EFFECT+REASON_DISCARD and c:IsCode(e:GetLabel())
end
--星義の執行者
--Scripted by mallu11
function c101012060.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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101012060+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101012060.target)
e1:SetOperation(c101012060.activate)
c:RegisterEffect(e1)
end
function c101012060.filter(c,e,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x23e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012060.target(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 c101012060.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101012060.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101012060.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101012060.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and tc:GetOriginalLevel()>=11 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
--コマンド・リゾネーター
--Scripted by mallu11
function c101012062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101012062+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101012062.cost)
e1:SetTarget(c101012062.target)
e1:SetOperation(c101012062.activate)
c:RegisterEffect(e1)
end
function c101012062.costfilter(c)
return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c101012062.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012062.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101012062.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c101012062.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsAbleToHand()
end
function c101012062.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012062.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012062.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012062.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
--コマンド・リゾネーター
--Scripted by mallu11
function c101012062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101012062+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101012062.cost)
e1:SetTarget(c101012062.target)
e1:SetOperation(c101012062.activate)
c:RegisterEffect(e1)
end
function c101012062.costfilter(c)
return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c101012062.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012062.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101012062.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c101012062.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsAbleToHand()
end
function c101012062.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012062.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012062.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012062.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
--エアー・トルピード
--Scripted by mallu11
function c101012063.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012063,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101012063)
e1:SetTarget(c101012063.target)
e1:SetOperation(c101012063.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012063,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101012063)
e2:SetCost(c101012063.drcost)
e2:SetTarget(c101012063.drtg)
e2:SetOperation(c101012063.drop)
c:RegisterEffect(e2)
end
function c101012063.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end
function c101012063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b=e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if b then ct=ct-1 end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012063.cfilter(chkc) end
if chk==0 then
return Duel.IsExistingTarget(c101012063.cfilter,tp,LOCATION_MZONE,0,1,nil) and ct>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012063.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*400)
end
function c101012063.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) then
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
local atk=Duel.Damage(1-tp,ct*400,REASON_EFFECT)
if tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
end
function c101012063.drfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost()
end
function c101012063.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101012063.drfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101012063.drfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012063.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 c101012063.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
--エアー・トルピード
--Scripted by mallu11
function c101012063.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012063,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101012063)
e1:SetTarget(c101012063.target)
e1:SetOperation(c101012063.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012063,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101012063)
e2:SetCost(c101012063.drcost)
e2:SetTarget(c101012063.drtg)
e2:SetOperation(c101012063.drop)
c:RegisterEffect(e2)
end
function c101012063.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end
function c101012063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b=e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if b then ct=ct-1 end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101012063.cfilter(chkc) end
if chk==0 then
return Duel.IsExistingTarget(c101012063.cfilter,tp,LOCATION_MZONE,0,1,nil) and ct>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012063.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*400)
end
function c101012063.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) then
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
local atk=Duel.Damage(1-tp,ct*400,REASON_EFFECT)
if tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
end
function c101012063.drfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost()
end
function c101012063.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101012063.drfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101012063.drfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101012063.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 c101012063.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
--マドルチェ・サロン
--Scripted by mallu11
function c101012064.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012064,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x71))
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101012064,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101012064)
e3:SetCondition(c101012064.secon)
e3:SetOperation(c101012064.seop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e4)
end
function c101012064.cfilter(c,tp)
return ((c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)) or c:IsPreviousLocation(LOCATION_GRAVE)) and c:IsLocation(LOCATION_HAND+LOCATION_DECK)
and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsControler(tp) and c:IsPreviousSetCard(0x71)
end
function c101012064.secon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101012064.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c101012064.sefilter(c)
return c:IsSetCard(0x71) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and not c:IsCode(101012064)
end
function c101012064.seop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c101012064.sefilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
--煉獄の災天
--Scripted by mallu11
function c101012065.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to grave1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012065,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101012065)
e2:SetCost(c101012065.tgcost1)
e2:SetTarget(c101012065.tgtg1)
e2:SetOperation(c101012065.tgop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(101012065,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetCost(c101012065.tgcost2)
e3:SetTarget(c101012065.tgtg2)
e3:SetOperation(c101012065.tgop2)
c:RegisterEffect(e3)
end
function c101012065.tgcost1(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c101012065.filter1(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGrave()
end
function c101012065.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101012065.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101012065.tgop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101012065.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c101012065.tgcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c101012065.filter2(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101012065.exfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c101012065.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c101012065.exfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(c101012065.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return ct>0 and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101012065.tgop2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101012065.exfilter,tp,0,LOCATION_MZONE,nil)
if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.GetMatchingGroup(c101012065.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--超重機回送
--Scripted by mallu11
function c101012066.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,101012066+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101012066.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c101012066.postg)
e2:SetOperation(c101012066.posop)
c:RegisterEffect(e2)
end
function c101012066.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x127) and c:IsAbleToHand()
end
function c101012066.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c101012066.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101012066,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 c101012066.pfilter1(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and c:IsCanChangePosition()
end
function c101012066.pfilter2(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)
end
function c101012066.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingTarget(c101012066.pfilter1,tp,LOCATION_MZONE,0,1,nil)
local b2=Duel.IsExistingTarget(c101012066.pfilter2,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanOverlay()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and (c101012066.pfilter1(chkc) or c101012066.pfilter2(chkc) and e:GetHandler():IsCanOverlay()) end
if chk==0 then return b1 or b2 end
local opt=0
local g=nil
if b1 and not b2 then
opt=Duel.SelectOption(tp,aux.Stringid(101012066,1))
end
if not b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(101012066,2))+1
end
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(101012066,1),aux.Stringid(101012066,2))
end
e:SetLabel(opt)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=Duel.SelectTarget(tp,c101012066.pfilter1,tp,LOCATION_MZONE,0,1,1,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=Duel.SelectTarget(tp,c101012066.pfilter2,tp,LOCATION_MZONE,0,1,1,nil)
end
end
function c101012066.posop(e,tp,eg,ep,ev,re,r,rp)
local opt=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if opt==0 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
else
if c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,c)
end
end
end
--ウィッチクラフト・デモンストレーション
--Scripted by mallu11
function c101012067.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012067,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_ATTACK+TIMING_END_PHASE)
e1:SetCountLimit(1,101012067)
e1:SetTarget(c101012067.target)
e1:SetOperation(c101012067.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012067,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,101012067)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c101012067.thcon)
e2:SetTarget(c101012067.thtg)
e2:SetOperation(c101012067.thop)
c:RegisterEffect(e2)
end
function c101012067.filter(c,e,tp)
return c:IsSetCard(0x128) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012067.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc,exc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101012067.filter,tp,LOCATION_HAND,0,1,exc,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101012067.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,c101012067.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c101012067.chainop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c101012067.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_SPELLCASTER) and ep==tp then
Duel.SetChainLimit(c101012067.chainlm)
end
end
function c101012067.chainlm(e,ep,tp)
return tp==ep
end
function c101012067.rccfilter(c)
return c:IsFaceup() and c:IsSetCard(0x128)
end
function c101012067.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and Duel.IsExistingMatchingCard(c101012067.rccfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101012067.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,0,0)
end
function c101012067.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--眷現の呪眼
--Scripted by mallu11
function c101012068.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012068,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101012068)
e1:SetTarget(c101012068.target)
e1:SetOperation(c101012068.activate)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012068,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101012168)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c101012068.imop)
c:RegisterEffect(e2)
end
function c101012068.filter(c)
return c:IsFaceup() and c:IsCode(44133040)
end
function c101012068.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,101012168,0x129,0x4011,400,400,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c101012068.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local flag=false
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,101012168,0x129,0x4011,400,400,1,RACE_FIEND,ATTRIBUTE_DARK) then
if ft>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsExistingMatchingCard(c101012068.filter,tp,LOCATION_SZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(101012068,2)) then
flag=true
end
local token=Duel.CreateToken(tp,101012168)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
if flag==true then
local token=Duel.CreateToken(tp,101012168)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101012068.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c101012068.splimit(e,c)
return not c:IsRace(RACE_FIEND)
end
function c101012068.imop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c101012068.imlimit)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101012068.imlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x129) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
--メガリス・アンフォームド
--Scripted by mallu11
function c101012070.initial_effect(c)
--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:SetTarget(c101012070.target)
e1:SetOperation(c101012070.activate)
c:RegisterEffect(e1)
end
function c101012070.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk))
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEUP_DEFENSE) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv*2,greater_or_equal)
local res=mg:CheckSubGroup(aux.RitualCheck,1,lv*2,tp,c,lv*2,greater_or_equal)
aux.GCheckAdditional=nil
return res
end
function c101012070.filter(c,e,tp)
return c:IsSetCard(0x138)
end
function c101012070.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL)
end
function c101012070.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c101012070.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
local mg=Duel.GetRitualMaterial(tp)
local b2=Duel.IsExistingMatchingCard(c101012070.RitualUltimateFilter,tp,LOCATION_DECK,0,1,nil,c101012070.filter,e,tp,mg,nil,Card.GetLevel,"Equal")
if chk==0 then return b1 or b2 end
local opt=0
if b1 and not b2 then
opt=Duel.SelectOption(tp,aux.Stringid(101012070,0))
end
if not b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(101012070,1))+1
end
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(101012070,0),aux.Stringid(101012070,1))
end
e:SetLabel(opt)
if opt==0 then
e:SetCategory(CATEGORY_ATKCHANGE)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
end
function c101012070.activate(e,tp,eg,ep,ev,re,r,rp)
local opt=e:GetLabel()
if opt==0 then
local ct=Duel.GetMatchingGroupCount(c101012070.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-ct*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
else
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c101012070.RitualUltimateFilter,tp,LOCATION_DECK,0,1,1,nil,c101012070.filter,e,tp,mg,nil,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel()*2,"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel()*2,tp,tc,tc:GetLevel()*2,"Equal")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP_DEFENSE)
tc:CompleteProcedure()
end
end
end
--融合派兵
--Scripted by mallu11
function c101012071.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,101012071+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101012071.cost)
e1:SetTarget(c101012071.target)
e1:SetOperation(c101012071.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(101012071,ACTIVITY_SPSUMMON,c101012071.counterfilter)
end
function c101012071.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION)
end
function c101012071.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101012071,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101012071.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101012071.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
function c101012071.ffilter(c,e,tp)
return c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(c101012071.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c,e,tp)
end
function c101012071.spfilter(c,fc,e,tp)
return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012071.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101012071.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101012071.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_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,c101012071.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012071.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--繁華の花笑み
--Scripted by mallu11
function c101012072.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101012072+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101012072.target)
e1:SetOperation(c101012072.activate)
c:RegisterEffect(e1)
end
function c101012072.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_SEASERPENT) and c:IsAbleToHand()
end
function c101012072.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,101012072)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,ct+3) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101012072.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,101012072)
if not Duel.IsPlayerCanDiscardDeck(tp,ct+3) then return end
Duel.ConfirmDecktop(tp,ct+3)
local g=Duel.GetDecktopGroup(tp,ct+3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and g:IsExists(Card.IsType,1,nil,TYPE_SPELL) and g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(tc,REASON_RULE)
end
g:RemoveCard(tc)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.ShuffleDeck(tp)
end
end
This diff is collapsed.
--エクシーズ・リバイブ・スプラッシュ
--Scripted by mallu11
function c101012075.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012075,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_ATTACK+TIMING_END_PHASE)
e1:SetCountLimit(1,101012075)
e1:SetTarget(c101012075.target)
e1:SetOperation(c101012075.activate)
c:RegisterEffect(e1)
--rank up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012075,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
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_ATTACK+TIMING_END_PHASE)
e2:SetCountLimit(1,101012075)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101012075.rktg)
e2:SetOperation(c101012075.rkop)
c:RegisterEffect(e2)
end
function c101012075.cfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101012075.cfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101012075.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101012075.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101012075.activate(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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c101012075.rkfilter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c101012075.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank())
end
function c101012075.spfilter(c,e,tp,mc,rank)
return c:IsRank(rank+1) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c101012075.rktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101012075.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101012075.rkfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012075.rkfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101012075.rkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL)
or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012075.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--エクシーズ・リバイブ・スプラッシュ
--Scripted by mallu11
function c101012075.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101012075,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_ATTACK+TIMING_END_PHASE)
e1:SetCountLimit(1,101012075)
e1:SetTarget(c101012075.target)
e1:SetOperation(c101012075.activate)
c:RegisterEffect(e1)
--rank up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101012075,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
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_ATTACK+TIMING_END_PHASE)
e2:SetCountLimit(1,101012075)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101012075.rktg)
e2:SetOperation(c101012075.rkop)
c:RegisterEffect(e2)
end
function c101012075.cfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101012075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101012075.cfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101012075.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101012075.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101012075.activate(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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c101012075.rkfilter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c101012075.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank())
end
function c101012075.spfilter(c,e,tp,mc,rank)
return c:IsRank(rank+1) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c101012075.rktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101012075.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101012075.rkfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101012075.rkfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101012075.rkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL)
or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101012075.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment