Commit 3e3d09fa authored by mercury233's avatar mercury233

rm

parent 5ce86361
#created by ...
#main
101007001
101007002
101007003
101007004
101007005
101007006
101007007
101007008
101007009
101007010
101007011
101007012
101007013
101007014
101007015
101007016
101007017
101007018
101007019
101007020
101007021
101007022
101007023
101007024
101007025
101007100
101007027
101007028
101007029
101007030
101007031
101007032
101007057
101007058
101007059
101007060
101007061
101007062
101007063
101007064
101007065
101007066
101007067
101007068
101007069
101007070
101007071
101007072
101007073
101007074
101007075
101007076
101007077
101007078
101007079
101007080
#extra
101007033
101007034
101007035
101007036
101007037
101007038
101007039
101007040
101007041
101007042
101007043
!side
101007044
101007045
101007046
101007047
101007048
101007049
101007050
101007051
101007052
101007053
101007054
101007055
101007056
#created by ... #created by ...
#main #main
100200155
100411025 100411025
100411001 100411001
100411002 100411002
100411003 100411003
100411005 100411005
#extra #extra
100233001
!side !side
100234001
100234002
100234003
101006000
101006081
101006082
101006083
101006084
101006085
101006086
101006087
101006088
101006089
101006090
101006091
#The first line is used for comment #The first line is used for comment
!counter 0x4b 枪管指示物
!counter 0x4c 召唤指示物
!setname 0x10d9 妖刀-不知火
!setname 0x223 蔷薇龙
--ホワイトローズ・ドラゴン
--White Rose Dragon
--Script by nekrozar
function c100200155.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200155,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100200155)
e1:SetCondition(c100200155.spcon1)
e1:SetTarget(c100200155.sptg1)
e1:SetOperation(c100200155.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200155,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c100200155.sptg2)
e2:SetOperation(c100200155.spop2)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200155,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,100200155+100)
e3:SetCondition(c100200155.tgcon)
e3:SetTarget(c100200155.tgtg)
e3:SetOperation(c100200155.tgop)
c:RegisterEffect(e3)
end
function c100200155.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON+RACE_PLANT) and c:IsType(TYPE_TUNER)
end
function c100200155.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100200155.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100200155.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 c100200155.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100200155.spfilter(c,e,tp)
return c:IsSetCard(0x223) and not c:IsCode(100200155) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100200155.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200155.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 c100200155.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100200155.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 c100200155.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c100200155.tgfilter(c)
return c:IsLevelAbove(4) and c:IsRace(RACE_PLANT) and c:IsAbleToGrave()
end
function c100200155.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200155.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100200155.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100200155.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--時械神祖ヴルガータ
--Timelord Progenitor Vulgate
function c100233001.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--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)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e3)
--banish
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100233001,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c100233001.rmcond)
e4:SetTarget(c100233001.rmtg)
e4:SetOperation(c100233001.rmop)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100233001,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c100233001.spcon)
e5:SetTarget(c100233001.sptg)
e5:SetOperation(c100233001.spop)
c:RegisterEffect(e5)
end
function c100233001.rmcond(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()&LOCATION_EXTRA==LOCATION_EXTRA
end
function c100233001.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,LOCATION_MZONE,1-tp)
end
function c100233001.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
if Duel.Remove(g,0,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
for oc in aux.Next(og) do
oc:RegisterFlagEffect(100233001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,c:GetFieldID())
end
c:RegisterFlagEffect(100233101,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c100233001.dcon)
e1:SetOperation(c100233001.dop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100233001.dcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c100233001.dop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c100233001.val)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100233001.val(e,re,dam,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 then
return dam/2
else return dam end
end
function c100233001.spfilter(c,e,tp)
return c:GetFlagEffectLabel(100233001)==e:GetHandler():GetFieldID()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100233001.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100233101)>0
end
function c100233001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c100233001.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,LOCATION_REMOVED)
end
function c100233001.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c100233001.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,e,tp)
if ft<=0 or #tg==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil)
if #g>0 then
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)
end
end
--Xtra HERO Dread Decimator
function c100234001.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x8),2)
c:EnableReviveLimit()
--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(c100234001.atktg)
e1:SetValue(c100234001.atkval)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
end
function c100234001.atktg(e,c)
return (c==e:GetHandler() or (e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x8) and c:IsFaceup()))
end
function c100234001.atkfilter(c)
return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER)
end
function c100234001.atkval(e,c)
return Duel.GetMatchingGroup(c100234001.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)*100
end
--Gullveig of the Nordic Ascendant
--Scripted by Eerie Code, mod by mercury233
function c100234002.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c100234002.matfilter,1,1)
--banish and summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100234002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100234002)
e1:SetCondition(c100234002.spcon)
e1:SetTarget(c100234002.sptg)
e1:SetOperation(c100234002.spop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCondition(c100234002.tgcon)
e2:SetTarget(c100234002.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100234002.tgcon)
e3:SetValue(aux.imval1)
c:RegisterEffect(e3)
end
function c100234002.matfilter(c)
return c:IsLinkSetCard(0x42) and c:IsLevelBelow(5)
end
function c100234002.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100234002.rmfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0
end
function c100234002.spfilter(c,e,tp)
return c:IsSetCard(0x42) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100234002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c100234002.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c100234002.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100234002.fselect(c,tp,rg,sg,e)
sg:AddCard(c)
local res=c100234002.fgoal(tp,sg,e) or rg:IsExists(c100234002.fselect,1,sg,tp,rg,sg,e)
sg:RemoveCard(c)
return res
end
function c100234002.fgoal(tp,sg,e)
local ct=#sg
return ct>0 and ct<=3 and Duel.GetMZoneCount(tp,sg)>=ct
and Duel.IsExistingMatchingCard(c100234002.spfilter,tp,LOCATION_DECK,0,ct,nil,e,tp)
end
function c100234002.spop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
local min=1
for i=0,2 do
local cg=rg:Filter(c100234002.fselect,sg,tp,rg,sg,e)
if #cg==0 then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=cg:Select(tp,min,1,nil)
if #g==0 then break end
sg:Merge(g)
min=0
end
if #sg>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local ct=#(Duel.GetOperatedGroup())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c100234002.spfilter,tp,LOCATION_DECK,0,ct,ct,nil,e,tp)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
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(c100234002.splimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
end
function c100234002.splimit(e,c)
return not c:IsSetCard(0x4b)
end
function c100234002.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4b)
end
function c100234002.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLinkedGroup():IsExists(c100234002.tgfilter,1,nil)
end
function c100234002.tgtg(e,c)
return c100234002.tgfilter(c) and e:GetHandler():GetLinkedGroup():IsContains(c)
end
--The Phantom Knights of Rusty Bardiche
function c100234003.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_DARK),2)
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100234003)
e1:SetTarget(c100234003.target)
e1:SetOperation(c100234003.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(100234003,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100234003+100)
e2:SetCondition(c100234003.descon)
e2:SetTarget(c100234003.destg)
e2:SetOperation(c100234003.desop)
c:RegisterEffect(e2)
--cannot link material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c100234003.tgfilter(c,tp)
return c:IsSetCard(0x10db) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c100234003.setfilter,tp,LOCATION_DECK,0,1,c)
end
function c100234003.setfilter(c)
return c:IsSetCard(0xdb) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c100234003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100234003.tgfilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100234003.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100234003.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c100234003.setfilter,tp,LOCATION_DECK,0,1,nil) then
local tc=Duel.SelectMatchingCard(tp,c100234003.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.BreakEffect()
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c100234003.descfilter(c,lg)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) and lg:IsContains(c)
end
function c100234003.descon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c100234003.descfilter,1,nil,lg)
end
function c100234003.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,PLAYER_ALL,LOCATION_ONFIELD)
end
function c100234003.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--Alviss of the Nordic Alfar
--Scripted by ahtelel and Eerie Code
function c101006000.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006000,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetRange(LOCATION_REMOVED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c101006000.spcon)
e1:SetTarget(c101006000.sptg)
e1:SetOperation(c101006000.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101006000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101006000+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c101006000.spcon2)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101006000.sptg2)
e2:SetOperation(c101006000.spop2)
c:RegisterEffect(e2)
end
function c101006000.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return #eg==1 and eg:IsContains(e:GetHandler()) and re:IsActiveType(TYPE_LINK) and re:GetHandler():IsSetCard(0x42)
end
function c101006000.matfilter(c)
return c:IsSetCard(0x42) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) and c:IsLevelAbove(1)
end
function c101006000.fselect(c,tp,rg,sg,e)
sg:AddCard(c)
local res=false
if #sg<3 then
res=rg:IsExists(c101006000.fselect,1,sg,tp,rg,sg,e)
else
res=c101006000.fgoal(tp,sg,e)
end
sg:RemoveCard(c)
return res
end
function c101006000.fgoal(tp,sg,e)
return #sg==3 and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==2 and sg:GetSum(Card.GetLevel)==10
and Duel.IsExistingMatchingCard(c101006000.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg)
end
function c101006000.spfilter(c,e,tp,mg)
return c:IsSetCard(0x4b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not mg or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0)
end
function c101006000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c101006000.matfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c101006000.fselect,1,nil,tp,mg,sg,e)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_DECK+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101006000.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c101006000.matfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil)
local sg=Group.CreateGroup()
for i=0,2 do
local cg=mg:Filter(c101006000.fselect,sg,tp,mg,sg,e)
if cg:GetCount()==0 then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:Select(tp,1,1,nil)
sg:Merge(g)
end
if Duel.SendtoGrave(sg,REASON_EFFECT)==3 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c101006000.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101006000.cfilter(c,tp)
return c:IsPreviousSetCard(0x4b) and c:GetPreviousControler()==tp
end
function c101006000.spcon2(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c101006000.cfilter,1,nil,tp)
end
function c101006000.spfilter2(c,e,tp)
return c:IsSetCard(0x4b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function c101006000.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c101006000.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101006000.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101006000.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Consolation Prize
--scripted by Naim
function c101006081.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,101006081+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101006081.target)
e1:SetOperation(c101006081.activate)
c:RegisterEffect(e1)
end
function c101006081.filter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousLocation(LOCATION_HAND) and (not g or g:IsContains(c))
end
function c101006081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101006081.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101006081.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101006081.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101006081.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)
end
end
--Danger! Thunderbird!
function c101006082.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006082,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101006082.spcost)
e1:SetTarget(c101006082.sptg)
e1:SetOperation(c101006082.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101006082,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101006082)
e2:SetCondition(c101006082.descon)
e2:SetTarget(c101006082.destg)
e2:SetOperation(c101006082.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c101006082.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(101006082)==0 end
c:RegisterFlagEffect(101006082,RESET_CHAIN,0,1)
end
function c101006082.spfilter(c,e,tp)
return c:IsCode(101006082) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101006082.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101006082.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c101006082.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local tc=g:Select(1-tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(101006082) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c101006082.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c101006082.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c101006082.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFacedown() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101006082.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
--Danger! Dogman!
--Scripted by AlphaKretin
function c101006083.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006083,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101006083.spcost)
e1:SetTarget(c101006083.sptg)
e1:SetOperation(c101006083.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101006083,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101006083)
e2:SetCondition(c101006083.atkcon)
e2:SetTarget(c101006083.atktg)
e2:SetOperation(c101006083.atkop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c101006083.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(101006083)==0 end
c:RegisterFlagEffect(101006083,RESET_CHAIN,0,1)
end
function c101006083.spfilter(c,e,tp)
return c:IsCode(101006083) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101006083.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101006083.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c101006083.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local tc=g:Select(1-tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(101006083) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c101006083.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c101006083.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c101006083.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c101006083.atkop(e,tp,eg,ep,ev,re,r,rp)
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(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--Danger! Mothman!
--Scripted by AlphaKretin
function c101006084.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006084,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101006084.spcost)
e1:SetTarget(c101006084.sptg)
e1:SetOperation(c101006084.spop)
c:RegisterEffect(e1)
--draw and discard
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101006084,1))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101006084)
e2:SetCondition(c101006084.drcon)
e2:SetTarget(c101006084.drtg)
e2:SetOperation(c101006084.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c101006084.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(101006084)==0 end
c:RegisterFlagEffect(101006084,RESET_CHAIN,0,1)
end
function c101006084.spfilter(c,e,tp)
return c:IsCode(101006084) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101006084.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101006084.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c101006084.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local tc=g:Select(1-tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(101006084) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c101006084.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c101006084.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c101006084.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c101006084.drop(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.Draw(tp,1,REASON_EFFECT)
local h2=Duel.Draw(1-tp,1,REASON_EFFECT)
if h1>0 or h2>0 then Duel.BreakEffect() end
if h1>0 then
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
if h2>0 then
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--Danger!? Tsuchinoko?
--Scripted by AlphaKretin
function c101006085.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006085,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101006085.spcost)
e1:SetTarget(c101006085.sptg)
e1:SetOperation(c101006085.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101006085,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101006085)
e2:SetCondition(c101006085.spcon2)
e2:SetTarget(c101006085.sptg2)
e2:SetOperation(c101006085.spop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c101006085.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(101006085)==0 end
c:RegisterFlagEffect(101006085,RESET_CHAIN,0,1)
end
function c101006085.spfilter(c,e,tp)
return c:IsCode(101006085) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101006085.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101006085.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c101006085.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local tc=g:Select(1-tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(101006085) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c101006085.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c101006085.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c101006085.sptg2(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 c101006085.spop2(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
--Danger! Response Team
--scripted by Naim
function c101006086.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101006086)
e1:SetTarget(c101006086.target)
e1:SetOperation(c101006086.activate)
c:RegisterEffect(e1)
--to deck and draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(101006086,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101006086+100)
e2:SetCost(c101006086.tdcost)
e2:SetTarget(c101006086.tdtg)
e2:SetOperation(c101006086.tdop)
c:RegisterEffect(e2)
end
function c101006086.filter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0x11e) and c:IsAbleToHand()
and Duel.IsExistingTarget(c101006086.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c101006086.filter2(c)
return c:IsAbleToHand()
end
function c101006086.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101006086.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,c101006086.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,c101006086.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function c101006086.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c101006086.costfilter(c)
return c:IsSetCard(0x11e) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c101006086.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101006086.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101006086.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c101006086.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101006086.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--Second Expedition into Danger!
--scripted by Naim
function c101006087.initial_effect(c)
--activate inst
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(101006087,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(c101006087.atkcon)
e2:SetCost(c101006087.atkcost)
e2:SetTarget(c101006087.atktg)
e2:SetOperation(c101006087.atkop)
c:RegisterEffect(e2)
--to deck and draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetDescription(aux.Stringid(101006087,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,101006087)
e3:SetCost(c101006087.tdcost)
e3:SetTarget(c101006087.tdtg)
e3:SetOperation(c101006087.tdop)
c:RegisterEffect(e3)
end
function c101006087.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c101006087.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x11e)
end
function c101006087.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c101006087.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return e:GetHandler():GetFlagEffect(101006087)==0
and Duel.IsExistingTarget(c101006087.filter1,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101006087.filter1,tp,LOCATION_MZONE,0,1,1,nil)
e:GetHandler():RegisterFlagEffect(101006087,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c101006087.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and 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(500)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
function c101006087.costfilter(c)
return c:IsSetCard(0x11e) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c101006087.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101006087.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101006087.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c101006087.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101006087.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--Noble Knight Iyvanne
--Scripted by AlphaKretin
function c101006088.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006088,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_EQUIP)
e1:SetCountLimit(1,101006088)
e1:SetCondition(c101006088.tkcon)
e1:SetTarget(c101006088.tktg)
e1:SetOperation(c101006088.tkop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c101006088.atkcon)
e2:SetTarget(c101006088.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
end
function c101006088.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSetCard,1,nil,0x207a)
end
function c101006088.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101006088+100,0x107a,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101006088.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,101006088+100,0x107a,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,101006088+100)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101006088.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101006088.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x107a)
end
function c101006088.atkcon(e)
local c=e:GetHandler()
local eg=c:GetEquipGroup()
return #eg>0 and eg:IsExists(Card.IsSetCard,1,nil,0x207a)
end
function c101006088.atktg(e,c)
return c:IsSetCard(0x107a) and c~=e:GetHandler()
end
--Morgan, the Enchantress of Avalon
--Scripted by Eerie Code
function c101006089.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101006089,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101006089)
e1:SetCondition(c101006089.condition)
e1:SetCost(c101006089.cost)
e1:SetTarget(c101006089.target)
e1:SetOperation(c101006089.operation)
c:RegisterEffect(e1)
end
function c101006089.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x107a)
end
function c101006089.filter2(c)
return c:IsFaceup() and c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP)
end
function c101006089.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsExistingMatchingCard(c101006089.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c101006089.filter2,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101006089.cost(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 c101006089.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c101006089.filter2,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101006089.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c101006089.filter2,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.NegateActivation(ev)
end
end
--Heritage of the Chalice
--Scripted by ahtelel
function c101006090.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:SetCountLimit(1,101006090)
e1:SetTarget(c101006090.target)
e1:SetOperation(c101006090.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetRange(LOCATION_GRAVE)
e2:SetOperation(c101006090.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+101006090)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetTarget(c101006090.thtg)
e3:SetOperation(c101006090.thop)
c:RegisterEffect(e3)
end
function c101006090.filter(c)
return ((c:IsSetCard(0x107a) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x207a)) and c:IsAbleToHand()
end
function c101006090.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101006090.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101006090.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101006090.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101006090.checkfilter(c)
return c:IsSetCard(0x107a) and c:IsReason(REASON_BATTLE) and c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a)
end
function c101006090.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c101006090.checkfilter,1,nil) then Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+101006090,nil,0,rp,ep,ev) end
end
function c101006090.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 c101006090.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
--Until Noble Arms are Needed Once Again
--Scripted by Eerie Code
function c101006091.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:SetTarget(c101006091.target)
e1:SetOperation(c101006091.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101006091)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101006091.sptg)
e2:SetOperation(c101006091.spop)
c:RegisterEffect(e2)
end
function c101006091.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a)
end
function c101006091.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c101006091.filter,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct end
end
function c101006091.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101006091.filter,tp,LOCATION_ONFIELD,0,nil)
if ct==0 then return end
Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck()
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then ct=ct-1 end
Duel.ShuffleHand(tp)
if ct>0 then Duel.SortDecktop(tp,tp,ct) end
end
function c101006091.eqfilter(c,cd)
return c:IsCode(cd) and (c:IsFaceup() or not c:IsOnField())
end
function c101006091.spfilter(c,e,tp)
return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c101006091.eqfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function c101006091.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101006091.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101006091.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101006091.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--キャシー・イヴL2
--Catche Eve L2
--scripted by Larry126
function c101007001.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007001)
e1:SetTarget(c101007001.target)
e1:SetOperation(c101007001.operation)
c:RegisterEffect(e1)
end
function c101007001.filter(c)
return c:IsFaceup() and c:IsLevelAbove(3)
end
function c101007001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007001.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c101007001.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101007001.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND)
end
function c101007001.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<3 then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-2)
tc:RegisterEffect(e1)
if not tc:IsImmuneToEffect(e1) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--サイバース・シンクロン
--Cyberse Synchron
--scripted by LogicalNonsense
function c101007002.initial_effect(c)
--Increase level
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_UPDATE_LEVEL)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c101007002.target)
e1:SetOperation(c101007002.operation)
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:SetCountLimit(1,101007002)
e2:SetTarget(c101007002.reptg)
e2:SetValue(c101007002.repval)
c:RegisterEffect(e2)
end
function c101007002.filter(c)
return c:IsFaceup() and c:IsLevelBelow(4)
end
function c101007002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007002.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007002.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101007002.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c101007002.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(tc:GetOriginalLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c101007002.repfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()>=5 and c:IsControler(tp)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101007002.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c101007002.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 c101007002.repval(e,c)
return c101007002.repfilter(c,e:GetHandlerPlayer())
end
--転生炎獣ウルヴィー
--Salamangreat Wolvie
--scripted by LogicalNonsense
function c101007003.initial_effect(c)
--Used as material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c101007003.lkcon)
e1:SetOperation(c101007003.lkop)
c:RegisterEffect(e1)
--GY recycle, if special summoned
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007003,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101007003)
e2:SetCondition(c101007003.thcon1)
e2:SetTarget(c101007003.thtg)
e2:SetOperation(c101007003.thop)
c:RegisterEffect(e2)
--GY recycle, if added to hand
local e3=e2:Clone()
e3:SetCode(EVENT_TO_HAND)
e3:SetCondition(c101007003.thcon2)
e3:SetCost(c101007003.thcost)
c:RegisterEffect(e3)
end
function c101007003.lkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function c101007003.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
rc:RegisterEffect(e2)
end
function c101007003.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function c101007003.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT)~=0 and c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
end
function c101007003.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c101007003.thfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c101007003.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101007003.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007003.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101007003.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101007003.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
--転生炎獣パロー
--Salamangreat Parro
--scripted by Larry126
function c101007004.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101007004.spcon)
e1:SetTarget(c101007004.sptg)
e1:SetOperation(c101007004.spop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007004,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c101007004.atktg)
e2:SetOperation(c101007004.atkop)
c:RegisterEffect(e2)
--gain LP
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007004,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101007004)
e3:SetCost(c101007004.cost)
e3:SetTarget(c101007004.target)
e3:SetOperation(c101007004.operation)
c:RegisterEffect(e3)
end
function c101007004.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c101007004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c101007004.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_ATTACK)
end
end
function c101007004.filter(c,atk)
return c:IsSetCard(0x119) and c:GetAttack()~=atk
end
function c101007004.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101007004.filter(chkc,c:GetAttack()) end
if chk==0 then return Duel.IsExistingTarget(c101007004.filter,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101007004.filter,tp,LOCATION_GRAVE,0,1,1,nil,c:GetAttack())
end
function c101007004.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c101007004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101007004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c101007004.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--転生炎獣フォクサー
--Salamangreat Foxer
--scripted by Larry126
function c101007005.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007005,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007005)
e1:SetCondition(c101007005.condition)
e1:SetCost(c101007005.cost)
e1:SetTarget(c101007005.target)
e1:SetOperation(c101007005.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007005,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101007005)
e2:SetCondition(c101007005.spcon)
e2:SetTarget(c101007005.sptg)
e2:SetOperation(c101007005.spop)
c:RegisterEffect(e2)
end
function c101007005.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x119)
end
function c101007005.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101007005.cfilter,tp,LOCATION_GRAVE,0,3,nil)
end
function c101007005.cost(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 c101007005.filter(c)
return c:GetSequence()<5
end
function c101007005.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x119) and c:IsType(TYPE_LINK) and c:IsAbleToExtra()
end
function c101007005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101007005.filter,tp,0,LOCATION_SZONE,1,nil)
and Duel.IsExistingTarget(c101007005.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local lg=Duel.SelectTarget(tp,c101007005.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101007005.filter,tp,0,LOCATION_SZONE,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,lg,1,tp,LOCATION_GRAVE)
end
function c101007005.operation(e,tp,eg,ep,ev,re,r,rp)
local sc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local lc=g:GetFirst()
if lc==sc then lc=g:GetNext() end
if lc and lc:IsRelateToEffect(e) and Duel.SendtoDeck(lc,nil,2,REASON_EFFECT)>0 and lc:IsLocation(LOCATION_EXTRA) and sc and sc:IsRelateToEffect(e) then
Duel.Destroy(sc,REASON_EFFECT)
end
end
function c101007005.spfilter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE)
and c:GetPreviousControler()==1-tp and c:GetPreviousSequence()<5
end
function c101007005.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007005.spfilter,1,nil,tp)
end
function c101007005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c101007005.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--スピードローダー・ドラゴン
--Speedburst Dragon
--Script by nekrozar
function c101007006.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DAMAGE)
e1:SetCountLimit(1,101007006)
e1:SetCondition(c101007006.spcon)
e1:SetTarget(c101007006.sptg)
e1:SetOperation(c101007006.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007006,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,101007006+100)
e2:SetCondition(c101007006.thcon)
e2:SetTarget(c101007006.thtg)
e2:SetOperation(c101007006.thop)
c:RegisterEffect(e2)
end
function c101007006.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_EFFECT)~=0
end
function c101007006.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_DAMAGE,nil,0,tp,ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.ceil(ev/2))
end
function c101007006.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
Duel.BreakEffect()
local val=Duel.Damage(1-tp,ev,REASON_EFFECT)
if val>0 then
Duel.Recover(tp,math.ceil(val/2),REASON_EFFECT)
end
end
end
function c101007006.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c101007006.thfilter(c)
return c:IsSetCard(0x102) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007006.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c101007006.thfilter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c101007006.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101007006.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,tg1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg2=g:Select(tp,1,1,nil)
tg1:Merge(tg2)
if tg1:GetCount()==2 then
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg1)
end
end
--ヴァレット・シンクロン
--Rokket Synchron
--Script by nekrozar
function c101007007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c101007007.sptg)
e1:SetOperation(c101007007.spop)
c:RegisterEffect(e1)
end
function c101007007.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101007007.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101007007.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007007.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0,nil)
end
function c101007007.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 fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(101007007,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c101007007.descon)
e3:SetOperation(c101007007.desop)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007007.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101007007.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(101007007)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c101007007.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c101007007.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK) and c:IsLocation(LOCATION_EXTRA)
end
--ネオスペース・コネクター
--Neo Space Connector
--Script by nekrozar
function c101007008.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101007008)
e1:SetTarget(c101007008.sptg1)
e1:SetOperation(c101007008.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007008,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101007108)
e2:SetCost(c101007008.spcost2)
e2:SetTarget(c101007008.sptg2)
e2:SetOperation(c101007008.spop2)
c:RegisterEffect(e2)
end
c101007008.card_code_list={89943723}
function c101007008.spfilter(c,e,tp)
return (c:IsSetCard(0x1f) or c:IsCode(89943723)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007008.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007008.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 c101007008.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101007008.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_DEFENSE)
end
end
function c101007008.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101007008.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101007008.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c101007008.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007008.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007008.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--TGスクリュー・サーペント
--T.G. Screw Serpent
function c101007009.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101007009)
e1:SetTarget(c101007009.sptg)
e1:SetOperation(c101007009.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--level
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007009,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101007009+100)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c101007009.lvtg)
e3:SetOperation(c101007009.lvop)
c:RegisterEffect(e3)
end
function c101007009.spfilter(c,e,tp)
return c:IsSetCard(0x27) and c:IsLevelBelow(4) and not c:IsCode(101007009) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007009.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101007009.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101007009.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007009.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007009.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) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c101007009.filter(c)
return c:IsSetCard(0x27) and c:IsFaceup() and c:GetLevel()>0
end
function c101007009.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101007009.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007009.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101007009.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c101007009.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local lvl=1
local sel=Duel.SelectOption(tp,aux.Stringid(101007009,1),aux.Stringid(101007009,2))
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--TG ブースタ・ラプトル
--T.G. Booster Raptor
--Script by nekrozar
function c101007010.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007010)
e1:SetCondition(c101007010.sprcon)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(c101007010.regop)
c:RegisterEffect(e2)
end
function c101007010.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0x27)
end
function c101007010.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007010.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101007010.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007010,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c101007010.thtg)
e1:SetOperation(c101007010.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c101007010.thfilter(c)
return c:IsSetCard(0x27) and not c:IsCode(101007010) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101007010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101007010.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
--TG タンク・ラーヴァ
--T.G. Tank Larva
--Script by nekrozar
function c101007011.initial_effect(c)
--nontuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c101007011.tnval)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007011,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,101007011)
e2:SetCondition(c101007011.tkcon)
e2:SetTarget(c101007011.tktg)
e2:SetOperation(c101007011.tkop)
c:RegisterEffect(e2)
end
function c101007011.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler()) and c:IsSetCard(0x27)
end
function c101007011.tkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
and e:GetHandler():GetReasonCard():IsSetCard(0x27)
end
function c101007011.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101007111,0x27,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101007011.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,101007111,0x27,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then return end
local token=Duel.CreateToken(tp,101007111)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
--守護竜ガルミデス
--Script by nekrozar
function c101007013.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007013)
e1:SetCondition(c101007013.spcon)
e1:SetTarget(c101007013.sptg)
e1:SetOperation(c101007013.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007013,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101007113)
e2:SetCost(c101007013.thcost)
e2:SetTarget(c101007013.thtg)
e2:SetOperation(c101007013.thop)
c:RegisterEffect(e2)
end
function c101007013.cfilter(c,tp)
return c:IsType(TYPE_NORMAL) and c:IsControler(tp)
end
function c101007013.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007013.cfilter,1,nil,tp)
end
function c101007013.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 c101007013.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 c101007013.costfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost()
end
function c101007013.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007013.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007013.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101007013.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 c101007013.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
--守護竜プロミネシス
--Script by nekrozar
function c101007014.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007014,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCost(c101007014.atkcost)
e1:SetTarget(c101007014.atktg)
e1:SetOperation(c101007014.atkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101007014)
e2:SetCondition(c101007014.spcon)
e2:SetTarget(c101007014.sptg)
e2:SetOperation(c101007014.spop)
c:RegisterEffect(e2)
end
function c101007014.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 c101007014.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function c101007014.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007014.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007014.atkfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101007014.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101007014.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
end
end
function c101007014.cfilter(c,tp)
return c:IsType(TYPE_NORMAL) and c:IsControler(tp)
end
function c101007014.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c101007014.cfilter,1,nil,tp)
end
function c101007014.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 c101007014.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 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,true)
end
end
--守護竜アンドレイク
--Script by nekrozar
function c101007015.initial_effect(c)
c:EnableUnsummonable()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c101007015.splimit)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007015,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101007015)
e2:SetCondition(c101007015.atkcon)
e2:SetOperation(c101007015.atkop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007015,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101007115)
e3:SetCondition(c101007015.descon)
e3:SetTarget(c101007015.destg)
e3:SetOperation(c101007015.desop)
c:RegisterEffect(e3)
end
function c101007015.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c101007015.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
end
function c101007015.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(c:GetBaseDefense()*2)
c:RegisterEffect(e2)
end
end
function c101007015.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE+LOCATION_REMOVED)
end
function c101007015.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,1,0,0)
end
function c101007015.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
--星遺物-『星櫃』
--World Legacy - "World Ark"
--Script by nekrozar
function c101007016.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007016)
e1:SetCost(c101007016.spcost)
e1:SetTarget(c101007016.sptg)
e1:SetOperation(c101007016.spop)
c:RegisterEffect(e1)
--double tribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DOUBLE_TRIBUTE)
e2:SetValue(1)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007016,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101007116)
e3:SetCondition(c101007016.tgcon)
e3:SetTarget(c101007016.tgtg)
e3:SetOperation(c101007016.tgop)
c:RegisterEffect(e3)
end
function c101007016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c101007016.spfilter(c,e,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0
and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsType(TYPE_LINK)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007016.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c101007016.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c101007016.spfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,c101007016.spfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007016.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101007016.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c101007016.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) and eg:IsExists(c101007016.cfilter,1,nil,1-tp)
end
function c101007016.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101007016.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007016.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101007016.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007016.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--逢魔ノ妖刀-不知火
--Shiranui Spectralsword of Sunset
--Script by nekrozar
function c101007017.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101007017)
e1:SetCost(c101007017.spcost)
e1:SetTarget(c101007017.sptg)
e1:SetOperation(c101007017.spop)
c:RegisterEffect(e1)
end
function c101007017.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101007017.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsSetCard(0xd9) and not c:IsCode(101007017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.IsExistingTarget(c101007017.spfilter2,tp,LOCATION_REMOVED,0,1,c,e,tp)
end
function c101007017.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and not c:IsCode(101007017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007017.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetMZoneCount(tp,e:GetHandler())>1
and Duel.IsExistingTarget(c101007017.spfilter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c101007017.spfilter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c101007017.spfilter2,tp,LOCATION_REMOVED,0,1,1,g1,e,tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function c101007017.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007017.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ft,ft,nil)
end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
function c101007017.splimit(e,c)
return not c:IsRace(RACE_ZOMBIE)
end
--不知火の師範
--Shiranui Sensei
--Scripted by AlphaKretin
function c101007018.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,101007018)
e1:SetCondition(c101007018.condition)
e1:SetTarget(c101007018.target)
e1:SetOperation(c101007018.operation)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007018,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101007018+100)
e2:SetTarget(c101007018.atktg)
e2:SetOperation(c101007018.atkop)
c:RegisterEffect(e2)
end
function c101007018.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd9)
and Duel.IsExistingMatchingCard(c101007018.cfilter2,tp,LOCATION_MZONE,0,1,nil,c:GetCode())
end
function c101007018.cfilter2(c,code)
return c:IsFaceup() and c:IsSetCard(0xd9) and not c:IsCode(code)
end
function c101007018.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101007018.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c101007018.target(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 c101007018.operation(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 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,true)
end
end
function c101007018.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)
end
function c101007018.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101007018.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007018.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101007018.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101007018.atkop(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_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--不知火の武部
--Shiranui Spearitualist
--Scripted by AlphaKretin
function c101007019.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101007019)
e1:SetTarget(c101007019.sumtg)
e1:SetOperation(c101007019.sumop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007019,1))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101007019+100)
e2:SetTarget(c101007019.drtg)
e2:SetOperation(c101007019.drop)
c:RegisterEffect(e2)
end
function c101007019.filter(c,e,tp)
return c:IsSetCard(0x10d9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007019.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007019.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101007019.sumop(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,c101007019.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007019.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101007019.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_ZOMBIE)
end
function c101007019.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101007019.drop(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.Draw(tp,1,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--幻創龍ファンタズメイ
--
--Script by mercury233
function c101007020.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101007020)
e1:SetCondition(c101007020.spcon)
e1:SetTarget(c101007020.sptg)
e1:SetOperation(c101007020.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007020,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
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,101007020+100)
e2:SetCondition(c101007020.discon)
e2:SetCost(c101007020.discost)
e2:SetTarget(c101007020.distg)
e2:SetOperation(c101007020.disop)
c:RegisterEffect(e2)
end
function c101007020.spfilter(c,sp)
return c:GetSummonPlayer()==sp and c:IsType(TYPE_LINK)
end
function c101007020.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007020.spfilter,1,nil,1-tp)
end
function c101007020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_LINK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanDraw(tp,ct+1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101007020.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
Duel.BreakEffect()
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_LINK)
if Duel.Draw(tp,ct+1,REASON_EFFECT)==0 then return end
Duel.ShuffleHand(tp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,ct,ct,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c101007020.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c101007020.discon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) 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(c101007020.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c101007020.cfilter(c,g)
return g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101007020.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c101007020.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 c101007020.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
--オルフェゴール・トロイメア
--
--Script by mercury233
function c101007021.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(c101007021.indval)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101007021)
e2:SetCondition(c101007021.atkcon1)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101007021.atktg)
e2:SetOperation(c101007021.atkop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e3:SetCondition(c101007021.atkcon2)
c:RegisterEffect(e3)
end
function c101007021.indval(e,c)
return c:IsType(TYPE_LINK)
end
function c101007021.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c101007021.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c101007021.tgfilter(c)
return c:IsFaceup()
end
function c101007021.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() and not c:IsCode(101007021)
end
function c101007021.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101007021.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007021.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c101007021.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101007021.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c101007021.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007021.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local gc=g:GetFirst()
if Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE)
and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local lv=gc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(lv*100)
tc:RegisterEffect(e1)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c101007021.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c101007021.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
--プランキッズ・ロック
--Planckster Rock
function c101007022.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007022,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101007022)
e1:SetCondition(c101007022.reccon)
e1:SetTarget(c101007022.rectg)
e1:SetOperation(c101007022.recop)
c:RegisterEffect(e1)
end
function c101007022.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x120) and r&REASON_FUSION+REASON_LINK~=0
end
function c101007022.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101007022.spfilter(c,e,tp)
return c:IsSetCard(0x120) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(101007022)
end
function c101007022.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
if #rc>0 and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and Duel.Draw(tp,1,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(c101007022.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101007022,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
--マドルチェ・プティンセスール
--Madolche Petitsens
--Script by mercury233
function c101007023.initial_effect(c)
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007023,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007023)
e1:SetCondition(c101007023.spcon1)
e1:SetTarget(c101007023.sptg1)
e1:SetOperation(c101007023.spop1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007023,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101007023+100)
e2:SetTarget(c101007023.sptg2)
e2:SetOperation(c101007023.spop2)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007023,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c101007023.retcon)
e3:SetTarget(c101007023.rettg)
e3:SetOperation(c101007023.retop)
c:RegisterEffect(e3)
end
function c101007023.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
end
function c101007023.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 c101007023.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 c101007023.spfilter2(c,e,tp)
return c:IsSetCard(0x71) and not c:IsCode(101007023) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007023.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007023.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101007023.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101007023.spfilter2,tp,LOCATION_DECK+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 tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-1)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c101007023.splimit)
Duel.RegisterEffect(e2,tp)
end
function c101007023.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x71)
end
function c101007023.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()==1-tp
and e:GetHandler():GetPreviousControler()==tp
end
function c101007023.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c101007023.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
--サイコウィールダー
--Psychic Wheelder
--Script by nekrozar
function c101007024.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101007024)
e1:SetCondition(c101007024.sprcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007024,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,101007124)
e2:SetCondition(c101007024.descon)
e2:SetTarget(c101007024.destg)
e2:SetOperation(c101007024.desop)
c:RegisterEffect(e2)
end
function c101007024.sprfilter(c)
return c:IsFaceup() and c:IsLevel(3) and not c:IsCode(101007024)
end
function c101007024.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007024.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101007024.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c101007024.desfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk-1)
end
function c101007024.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=e:GetHandler():GetReasonCard():GetAttack()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101007024.desfilter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(c101007024.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,atk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101007024.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,atk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101007024.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
--サイコトラッカー
--Psychic Tracker
--Script by nekrozar
function c101007025.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101007025)
e1:SetCondition(c101007025.sprcon)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c101007025.atkcon)
e2:SetOperation(c101007025.atkop)
c:RegisterEffect(e2)
end
function c101007025.sprfilter(c)
return c:IsFaceup() and c:IsLevel(3) and not c:IsCode(101007025)
end
function c101007025.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007025.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101007025.atkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c101007025.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--彩宝龍
--
--Script by mercury233
function c101007027.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007027,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,101007027)
e1:SetCondition(c101007027.spcon1)
e1:SetTarget(c101007027.sptg1)
e1:SetOperation(c101007027.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007027,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetCountLimit(1,101007027)
e2:SetCondition(c101007027.spcon2)
e2:SetTarget(c101007027.sptg2)
e2:SetOperation(c101007027.spop2)
c:RegisterEffect(e2)
end
function c101007027.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and not c:IsPublic()
end
function c101007027.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101007027.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 c101007027.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT)~=0 and c:IsPreviousLocation(LOCATION_GRAVE)
and c:GetPreviousControler()==tp and not c:IsPublic()
end
function c101007027.sptg2(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 c101007027.spop2(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 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,true)
end
end
--炎天禍サンバーン
--Sunburn the Sweltering Solar Calamity
--Script by nekrozar
function c101007028.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007028)
e1:SetCondition(c101007028.spcon)
e1:SetTarget(c101007028.sptg)
e1:SetOperation(c101007028.spop)
c:RegisterEffect(e1)
end
function c101007028.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_FIRE)~=0
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c101007028.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007028.cfilter,1,nil,tp)
end
function c101007028.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 c101007028.damfilter(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:GetAttack()>0 and c101007028.cfilter(c,tp)
end
function c101007028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(c101007028.damfilter,nil,tp)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101007028,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=g:Select(tp,1,1,nil)
Duel.Damage(1-tp,math.ceil(sg:GetFirst():GetAttack()/2),REASON_EFFECT)
end
end
--隅烏賊
--Script by nekrozar
function c101007029.initial_effect(c)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007029,0))
e1:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCountLimit(1)
e1:SetCost(c101007029.seqcost)
e1:SetTarget(c101007029.seqtg)
e1:SetOperation(c101007029.seqop)
c:RegisterEffect(e1)
--cannot be battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101007029.atcon)
e2:SetValue(c101007029.atlimit)
c:RegisterEffect(e2)
end
function c101007029.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c101007029.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101007129,0,0x4011,a:GetAttack(),0,2,RACE_AQUA,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101007029.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
local a=Duel.GetAttacker()
if not a:IsAttackable() or not Duel.IsPlayerCanSpecialSummonMonster(tp,101007129,0,0x4011,a:GetAttack(),0,2,RACE_AQUA,ATTRIBUTE_WATER) then return end
local token=Duel.CreateToken(tp,101007129)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(a:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
function c101007029.atcon(e)
local seq=e:GetHandler():GetSequence()
return seq==0 or seq==4
end
function c101007029.atlimit(e,c)
local tp=e:GetHandlerPlayer()
return c:IsControler(1-tp) and c:IsAttackBelow(e:GetHandler():GetDefense()) and not c:IsImmuneToEffect(e)
end
--孤高除獣
--
--Script by mercury233
function c101007030.initial_effect(c)
--banish
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007030,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101007030)
e1:SetCost(c101007030.cost)
e1:SetTarget(c101007030.target)
e1:SetOperation(c101007030.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101007030+100)
e2:SetCondition(c101007030.thcon)
e2:SetTarget(c101007030.thtg)
e2:SetOperation(c101007030.thop)
c:RegisterEffect(e2)
end
function c101007030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c101007030.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c101007030.tgfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function c101007030.tgfilter(c,rc)
return c:IsAbleToRemove() and c:IsRace(rc:GetRace())
end
function c101007030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c101007030.cfilter,tp,LOCATION_HAND,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101007030.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c101007030.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=e:GetLabelObject()
local g=Duel.SelectMatchingCard(tp,c101007030.tgfilter,tp,LOCATION_DECK,0,1,1,nil,rc)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c101007030.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE)
or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
end
function c101007030.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007030.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c101007030.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007030.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101007030.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101007030.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--エキストラケアトップス
--
--Script by mercury233
function c101007031.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,101007031)
e1:SetTarget(c101007031.sptg)
e1:SetOperation(c101007031.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c101007031.drcon)
e2:SetTarget(c101007031.drtg)
e2:SetOperation(c101007031.drop)
c:RegisterEffect(e2)
end
function c101007031.cfilter(c)
if not (c:IsReason(REASON_BATTLE) and c:GetPreviousSequence()>5) then return false end
local d=c:GetBattleTarget()
return d:IsRelateToBattle() and d:GetSequence()<=5 or not d:IsRelateToBattle() and d:GetPreviousSequence()<=5
end
function c101007031.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007031.cfilter,1,nil)
end
function c101007031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:Filter(c101007031.cfilter,nil):GetFirst()
if chk==0 then return tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
e:SetLabel(tc:GetControler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101007031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,e:GetLabel(),false,false,POS_FACEUP_DEFENSE)
end
end
function c101007031.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c101007031.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101007031.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
--魔神儀-カリスライム
--
--Script by mercury233
function c101007032.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101007032)
e1:SetCost(c101007032.spcost)
e1:SetTarget(c101007032.sptg)
e1:SetOperation(c101007032.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101007032)
e2:SetCost(c101007032.descost)
e2:SetTarget(c101007032.destg)
e2:SetOperation(c101007032.desop)
c:RegisterEffect(e2)
end
function c101007032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c101007032.spfilter(c,e,tp)
return c:IsSetCard(0x117) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007032.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
and Duel.IsExistingMatchingCard(c101007032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101007032.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101007032.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c101007032.regop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c101007032.damcon)
e2:SetOperation(c101007032.damop)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp)
end
function c101007032.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsType,1,nil,TYPE_RITUAL) then
e:SetLabel(1)
end
end
function c101007032.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()~=1
end
function c101007032.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,Duel.GetLP(tp)-2500)
end
function c101007032.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0x117) and c:IsAbleToGraveAsCost()
end
function c101007032.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007032.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007032.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101007032.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(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101007032.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
--トリックスターバンド・ギタースイート
--Trickstar Band Sweet Guitar
--scripted by Larry126
function c101007033.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xfb),c101007033.matfilter,true)
--avoid damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD)
e1:SetTargetRange(0,1)
e1:SetValue(c101007033.damval)
c:RegisterEffect(e1)
--gain atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007033,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101007033.atkcon)
e2:SetOperation(c101007033.atkop)
c:RegisterEffect(e2)
--recycle
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007033,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetLabelObject(e2)
e3:SetCondition(c101007033.condition)
e3:SetTarget(c101007033.target)
e3:SetOperation(c101007033.operation)
c:RegisterEffect(e3)
end
function c101007033.matfilter(c)
return c:IsFusionType(TYPE_LINK) and c:IsFusionSetCard(0xfb)
end
function c101007033.damval(e,re,val,r,rp)
if r&REASON_EFFECT==REASON_EFFECT and re and re:IsActiveType(TYPE_MONSTER) then
local rc=re:GetHandler()
if rc:IsFaceup() and rc:IsSetCard(0xfb) and rc:IsType(TYPE_LINK)
and rc:GetLinkedGroup():IsContains(e:GetHandler()) then
return val*2
end
end
return val
end
function c101007033.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and r&REASON_EFFECT==REASON_EFFECT and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xfb)
end
function c101007033.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetLabelObject(e)
e1:SetValue(ev)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c101007033.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfb) and c:IsAbleToHand()
end
function c101007033.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackedCount()>0
end
function c101007033.target(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_GRAVE)
end
function c101007033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local chk=false
local effs={c:IsHasEffect(EFFECT_UPDATE_ATTACK)}
for _,eff in ipairs(effs) do
if eff:GetLabelObject()==e:GetLabelObject() then
eff:Reset()
chk=true
end
end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101007033.thfilter),tp,LOCATION_GRAVE,0,nil)
if chk and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101007033,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--転生炎獣ヴァイオレットキマイラ
--Salamangreat Violet Chimera
--Script by nekrozar
function c101007034.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x119),aux.FilterBoolFunction(Card.IsFusionType,TYPE_LINK),true)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007034,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c101007034.atkcon1)
e1:SetOperation(c101007034.atkop1)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007034,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101007034.atkcon2)
e2:SetCost(c101007034.atkcost2)
e2:SetOperation(c101007034.atkop2)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c101007034.regcon)
e3:SetOperation(c101007034.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c101007034.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c101007034.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c101007034.atkop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local g=c:GetMaterial()
local atk=g:GetSum(Card.GetBaseAttack)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.ceil(atk/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c101007034.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc~=nil and bc:GetAttack()~=bc:GetBaseAttack()
end
function c101007034.atkcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(101007034)==0 end
c:RegisterFlagEffect(101007034,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c101007034.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=c:GetAttack()*2
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_DISABLE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1)
end
end
function c101007034.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()==1
end
function c101007034.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCondition(c101007034.atkcon3)
e1:SetTarget(c101007034.atktg3)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c101007034.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,101007034) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c101007034.atkcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget()
end
function c101007034.atktg3(e,c)
return c==e:GetHandler():GetBattleTarget()
end
--E・HERO ブレイヴ・ネオス
--Elemental HERO Brave Neos
--Script by nekrozar
function c101007035.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,c101007035.ffilter,1,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101007035.atkval)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007035,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(aux.bdocon)
e3:SetTarget(c101007035.thtg)
e3:SetOperation(c101007035.thop)
c:RegisterEffect(e3)
end
c101007035.material_setcode=0x8
c101007035.card_code_list={89943723}
c101007035.neos_fusion=true
function c101007035.ffilter(c)
return c:IsLevelBelow(4) and c:IsFusionType(TYPE_EFFECT)
end
function c101007035.atkfilter(c)
return (c:IsSetCard(0x8) or c:IsSetCard(0x1f)) and c:IsType(TYPE_MONSTER)
end
function c101007035.atkval(e,c)
return Duel.GetMatchingGroupCount(c101007035.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100
end
function c101007035.thfilter(c)
return aux.IsCodeListed(c,89943723) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101007035.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007035.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101007035.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101007035.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
--E・HERO コスモ・ネオス
--Elemental HERO Cosmo Neos
--Script by nekrozar
function c101007036.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,c101007036.ffilter,3,true,true)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c101007036.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c101007036.sprcon)
e2:SetOperation(c101007036.sprop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007036,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c101007036.retcon1)
e3:SetTarget(c101007036.rettg)
e3:SetOperation(c101007036.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c101007036.retcon2)
c:RegisterEffect(e4)
--act limit
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101007036,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c101007036.limcon)
e5:SetTarget(c101007036.limtg)
e5:SetOperation(c101007036.limop)
c:RegisterEffect(e5)
end
c101007036.material_setcode=0x8
c101007036.card_code_list={89943723}
function c101007036.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x1f) and (not sg or not sg:Filter(Card.IsFusionSetCard,nil,0x1f):IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c101007036.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c101007036.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c101007036.sprfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp,c)
end
function c101007036.sprfilter1(c,tp,fc)
return c:IsFusionCode(89943723) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(c101007036.sprfilter2,tp,LOCATION_MZONE,0,1,c,tp,fc,c)
end
function c101007036.sprfilter2(c,tp,fc,mc)
return c:IsFusionSetCard(0x1f) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(c101007036.sprfilter3,tp,LOCATION_MZONE,0,1,Group.FromCards(c,mc),tp,fc,mc,c)
end
function c101007036.sprfilter3(c,tp,fc,mc1,mc2)
return c:IsFusionSetCard(0x1f) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc) and not c:IsFusionAttribute(mc2:GetFusionAttribute())
and Duel.IsExistingMatchingCard(c101007036.sprfilter4,tp,LOCATION_MZONE,0,1,Group.FromCards(c,mc1,mc2),tp,fc,mc1,mc2,c)
end
function c101007036.sprfilter4(c,tp,fc,mc1,mc2,mc3)
local g=Group.FromCards(c,mc1,mc2,mc3)
return c:IsFusionSetCard(0x1f) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(fc) and not c:IsFusionAttribute(mc2:GetFusionAttribute()) and not c:IsFusionAttribute(mc3:GetFusionAttribute())
and Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function c101007036.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,c101007036.sprfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,c101007036.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),tp,c,g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g3=Duel.SelectMatchingCard(tp,c101007036.sprfilter3,tp,LOCATION_MZONE,0,1,1,Group.FromCards(g1:GetFirst(),g2:GetFirst()),tp,c,g1:GetFirst(),g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g4=Duel.SelectMatchingCard(tp,c101007036.sprfilter4,tp,LOCATION_MZONE,0,1,1,Group.FromCards(g1:GetFirst(),g2:GetFirst(),g3:GetFirst()),tp,c,g1:GetFirst(),g2:GetFirst(),g3:GetFirst())
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c101007036.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c101007036.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c101007036.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c101007036.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c101007036.limcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c101007036.limtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(c101007036.chainlm)
end
function c101007036.chainlm(e,rp,tp)
return tp==rp
end
function c101007036.limop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c101007036.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101007036.aclimit(e,re,tp)
return re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--ヴァレルロード・S・ドラゴン
--Borreload Savage Dragon
--Scripted by AlphaKretin, mod by mercury233
function c101007037.initial_effect(c)
c:EnableCounterPermit(0x14b)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetDescription(aux.Stringid(101007037,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c101007037.eqcon)
e1:SetTarget(c101007037.eqtg)
e1:SetOperation(c101007037.eqop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007037,1))
e2:SetCategory(CATEGORY_NEGATE)
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,101007037)
e2:SetCondition(c101007037.discon)
e2:SetCost(c101007037.discost)
e2:SetTarget(c101007037.distg)
e2:SetOperation(c101007037.disop)
c:RegisterEffect(e2)
end
function c101007037.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101007037.eqfilter(c,tp)
return c:IsType(TYPE_LINK) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c101007037.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c101007037.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c101007037.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101007037.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
local lk=tc:GetLink()
if lk>0 then
c:AddCounter(0x14b,lk)
end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101007037.eqlimit)
tc:RegisterEffect(e1)
local atk=tc:GetAttack()
if atk>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(atk/2)
tc:RegisterEffect(e2)
end
end
end
function c101007037.eqlimit(e,c)
return e:GetOwner()==c
end
function c101007037.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c101007037.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x14b,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x14b,1,REASON_COST)
end
function c101007037.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)
end
function c101007037.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--サイバース・クアンタム・ドラゴン
--Cyberse Quantum Dragon
--Scripted by Eerie Code
function c101007038.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--repeat attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007038,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1)
e1:SetTarget(c101007038.thtg)
e1:SetOperation(c101007038.thop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c101007038.tgcon)
e2:SetTarget(c101007038.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c101007038.tgcon)
e3:SetValue(c101007038.tgtg)
c:RegisterEffect(e3)
end
function c101007038.tgcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_LINK)
end
function c101007038.tgtg(e,c)
return c~=e:GetHandler()
end
function c101007038.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if chk==0 then return tc and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c101007038.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if c==tc then tc=Duel.GetAttackTarget() end
if tc and tc:IsRelateToBattle() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsChainAttackable() then
Duel.ChainAttack()
end
end
--TG スター・ガーディアン
--T.G. Star Guardian
--Script by nekrozar
function c101007039.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x27),1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007039,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101007039)
e1:SetTarget(c101007039.thtg)
e1:SetOperation(c101007039.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007039,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,101007139)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c101007039.sptg)
e2:SetOperation(c101007039.spop)
c:RegisterEffect(e2)
--synchro effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007039,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101007039.sccon)
e3:SetTarget(c101007039.sctg)
e3:SetOperation(c101007039.scop)
c:RegisterEffect(e3)
end
function c101007039.thfilter(c,tp)
return c:IsSetCard(0x27) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007039.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101007039.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007039.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c101007039.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c101007039.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c101007039.spfilter(c,e,tp)
return c:IsSetCard(0x27) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007039.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007039.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101007039.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,c101007039.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101007039.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101007039.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(101007039)==0
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
e:GetHandler():RegisterFlagEffect(101007039,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101007039.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
--業神-不知火
--Shiranui Skillsaga
--Script by nekrozar
function c101007040.initial_effect(c)
c:SetSPSummonOnce(101007040)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007040,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c101007040.postg)
e1:SetOperation(c101007040.posop)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007040,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,101007040)
e2:SetTarget(c101007040.tktg)
e2:SetOperation(c101007040.tkop)
c:RegisterEffect(e2)
end
function c101007040.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c101007040.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c101007040.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101007140,0xd9,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101007040.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,101007140,0xd9,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_FIRE) then return end
local token=Duel.CreateToken(tp,101007140)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--妖神-不知火
--Shiranui Spiritsaga
--scripted by Naim, mod by mercury233
function c101007041.initial_effect(c)
--limit SSummon
c:SetSPSummonOnce(101007041)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007041,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c101007041.target)
e1:SetOperation(c101007041.operation)
c:RegisterEffect(e1)
end
function c101007041.filter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c101007041.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007041.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_GRAVE)
end
function c101007041.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101007041.filter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local b1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local b2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
local b3=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if tc:IsRace(RACE_ZOMBIE) and #b1>0 and Duel.SelectYesNo(tp,aux.Stringid(101007041,1)) then
local t1=b1:GetFirst()
while t1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300)
t1:RegisterEffect(e1)
t1=b1:GetNext()
end
end
if tc:IsAttribute(ATTRIBUTE_FIRE) and #b2>0 and Duel.SelectYesNo(tp,aux.Stringid(101007041,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local t2=b2:Select(tp,1,1,nil)
Duel.HintSelection(t2)
Duel.Destroy(t2,REASON_EFFECT)
end
if tc:IsType(TYPE_SYNCHRO) and #b3>0 and Duel.SelectYesNo(tp,aux.Stringid(101007041,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local t3=b3:Select(tp,1,1,nil)
Duel.HintSelection(t3)
Duel.Destroy(t3,REASON_EFFECT)
end
end
end
--ハイパーサイコライザー
--Hyper Psychic Riser
--Script by nekrozar
function c101007042.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--attack limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c101007042.atktg)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(c101007042.actlimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007042,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101007042)
e3:SetCondition(c101007042.thcon)
e3:SetTarget(c101007042.thtg)
e3:SetOperation(c101007042.thop)
c:RegisterEffect(e3)
end
function c101007042.atktg(e,c)
return c:GetAttack()<e:GetHandler():GetAttack()
end
function c101007042.actlimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()>e:GetHandler():GetAttack()
end
function c101007042.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and rp==1-tp
end
function c101007042.thfilter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
and Duel.IsExistingTarget(c101007042.thfilter2,tp,LOCATION_GRAVE,0,1,c,c:GetAttribute(),c:GetRace())
end
function c101007042.thfilter2(c,att,rac)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) and c:IsAttribute(att) and c:IsRace(rac) and c:IsAbleToHand()
end
function c101007042.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101007042.thfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectTarget(tp,c101007042.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectTarget(tp,c101007042.thfilter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst(),g1:GetFirst():GetAttribute(),g1:GetFirst():GetRace())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function c101007042.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--サイバース・インテグレーター
--
--Script by mercury233
function c101007043.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007043,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101007043)
e1:SetCondition(c101007043.spcon)
e1:SetTarget(c101007043.sptg)
e1:SetOperation(c101007043.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007043,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101007043+100)
e2:SetCondition(c101007043.drcon)
e2:SetTarget(c101007043.drtg)
e2:SetOperation(c101007043.drop)
c:RegisterEffect(e2)
end
function c101007043.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101007043.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007043.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007043.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 c101007043.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,aux.NecroValleyFilter(c101007043.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_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:SetTarget(c101007043.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101007043.splimit(e,c)
return not c:IsRace(RACE_CYBERSE)
end
function c101007043.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101007043.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 c101007043.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
--サイバース・ウィキッド
--
--Script by mercury233
function c101007044.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,2)
c:EnableReviveLimit()
--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:SetCondition(c101007044.indcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--link target indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c101007044.indtg)
e3:SetValue(1)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101007044,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,101007044)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c101007044.thcon)
e4:SetCost(c101007044.thcost)
e4:SetTarget(c101007044.thtg)
e4:SetOperation(c101007044.thop)
c:RegisterEffect(e4)
end
function c101007044.indcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101007044.indtg(e,c)
return c:IsRace(RACE_CYBERSE) and e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c101007044.thcfilter(c,ec)
if c:IsLocation(LOCATION_MZONE) then
return ec:GetLinkedGroup():IsContains(c)
else
return bit.extract(ec:GetLinkedZone(c:GetPreviousControler()),c:GetPreviousSequence())~=0
end
end
function c101007044.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not eg:IsContains(c) and eg:IsExists(c101007044.thcfilter,1,nil,c)
end
function c101007044.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsAbleToRemoveAsCost()
end
function c101007044.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007044.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101007044.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101007044.thfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function c101007044.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007044.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101007044.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101007044.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
--アップデートジャマー
--
--Script by mercury233
function c101007045.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c101007045.mfilter,2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007045,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c101007045.atkcon)
e1:SetCost(c101007045.atkcost)
e1:SetOperation(c101007045.atkop)
c:RegisterEffect(e1)
--be material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007045,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c101007045.efcon)
e2:SetTarget(c101007045.eftg)
e2:SetOperation(c101007045.efop)
c:RegisterEffect(e2)
--reg
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c101007045.efcon)
e3:SetOperation(c101007045.regop)
c:RegisterEffect(e3)
end
function c101007045.mfilter(c)
return c:IsLevelAbove(2) and c:IsLinkRace(RACE_CYBERSE)
end
function c101007045.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return a:GetControler()==tp and a:IsRace(RACE_CYBERSE)
or d and d:GetControler()==tp and d:IsRace(RACE_CYBERSE)
end
function c101007045.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(101007045)==0 end
c:RegisterFlagEffect(101007045,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c101007045.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c101007045.distg)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c101007045.disop)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e3,tp)
if a:IsRelateToBattle() then
local aa=a:GetTextAttack()
local ad=a:GetTextDefense()
if a:IsImmuneToEffect(e) then
aa=a:GetBaseAttack()
ad=a:GetBaseDefense()
end
if aa<0 then aa=0 end
if ad<0 then ad=0 end
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SET_ATTACK_FINAL)
e4:SetReset(RESET_PHASE+PHASE_DAMAGE)
e4:SetValue(aa)
a:RegisterEffect(e4,true)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_SET_DEFENSE_FINAL)
e5:SetReset(RESET_PHASE+PHASE_DAMAGE)
e5:SetValue(ad)
a:RegisterEffect(e5,true)
end
if d and d:IsRelateToBattle() then
local da=d:GetTextAttack()
local dd=d:GetTextDefense()
if d:IsImmuneToEffect(e) then
da=d:GetBaseAttack()
dd=d:GetBaseDefense()
end
if da<0 then da=0 end
if dd<0 then dd=0 end
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_SET_ATTACK_FINAL)
e6:SetValue(da)
e6:SetReset(RESET_PHASE+PHASE_DAMAGE)
d:RegisterEffect(e6,true)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_SET_DEFENSE_FINAL)
e7:SetValue(dd)
e7:SetReset(RESET_PHASE+PHASE_DAMAGE)
d:RegisterEffect(e7,true)
end
if a:IsRelateToBattle() and d and d:IsRelateToBattle() then
local g=Group.FromCards(a,d)
g:KeepAlive()
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_BATTLE_DESTROYING)
e8:SetLabelObject(g)
e8:SetOperation(c101007045.damop)
e8:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e8,tp)
end
end
function c101007045.distg(e,c)
return c~=e:GetHandler()
end
function c101007045.disop(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if bit.band(loc,LOCATION_ONFIELD)~=0 then
Duel.NegateEffect(ev)
end
end
function c101007045.damfilter(c,p)
return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(p)
end
function c101007045.damop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():IsExists(c101007045.damfilter,1,nil,1-tp) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
function c101007045.efcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c101007045.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=e:GetHandler():GetReasonCard()
if chk==0 then return rc:GetFlagEffect(101007045)~=0 and rc:GetFlagEffect(101007145)==0 end
rc:RegisterFlagEffect(101007145,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c101007045.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=e:GetHandler():GetReasonCard()
if rc:GetFlagEffect(101007045)==0 then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007045,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
rc:RegisterEffect(e1)
end
function c101007045.regop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
rc:RegisterFlagEffect(101007045,RESET_EVENT+RESETS_STANDARD,0,1)
end
--デトネイト・デリーター
--
--Script by mercury233
function c101007046.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2)
--battle
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1)
e1:SetTarget(c101007046.destg1)
e1:SetOperation(c101007046.desop1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c101007046.descost2)
e2:SetTarget(c101007046.destg2)
e2:SetOperation(c101007046.desop2)
c:RegisterEffect(e2)
end
function c101007046.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsFaceup() and not tc:IsLinkAbove(3) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c101007046.desop1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c101007046.cfilter(c,g)
return g:IsContains(c)
end
function c101007046.descost2(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,c101007046.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,c101007046.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function c101007046.destg2(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(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101007046.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--クロック・リザード
--Clock Lizard
--Script by nekrozar
function c101007047.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,2)
--fusion summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007047,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c101007047.spcost)
e1:SetTarget(c101007047.sptg)
e1:SetOperation(c101007047.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007047,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCondition(c101007047.atkcon)
e2:SetTarget(c101007047.atktg)
e2:SetOperation(c101007047.atkop)
c:RegisterEffect(e2)
end
function c101007047.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101007047.spfilter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c101007047.spfilter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c101007047.spfilter2(c,e,tp,m,f,chkf)
return (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101007047.spfilter3(c,e,tp,chkf)
if not c:IsType(TYPE_FUSION) or not c:IsAbleToExtra() then return false end
local mg=Duel.GetMatchingGroup(c101007047.spfilter0,tp,LOCATION_GRAVE,0,c)
local res=c101007047.spfilter2(c,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=c101007047.spfilter2(c,e,tp,mg,mf,chkf)
end
end
return res
end
function c101007047.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local chkf=PLAYER_NONE
if chk==0 then return Duel.GetLocationCountFromEx(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101007047.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,chkf) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101007047.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101007047.spfilter3),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,chkf)
local tc=g:GetFirst()
if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then
local mg1=Duel.GetMatchingGroup(c101007047.spfilter1,tp,LOCATION_GRAVE,0,nil,e)
local mgchk1=c101007047.spfilter2(tc,e,tp,mg1,nil,chkf)
local mg2=nil
local mgchk2=false
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
mgchk2=c101007047.spfilter2(tc,e,tp,mg2,mf,chkf)
end
if (Duel.GetLocationCountFromEx(tp)>0 and mgchk1) or mgchk2 then
if mgchk1 and (not mgchk2 or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
end
function c101007047.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and c:IsPreviousLocation(LOCATION_GRAVE)
end
function c101007047.atkfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c101007047.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,RACE_CYBERSE)
and Duel.IsExistingMatchingCard(c101007047.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c101007047.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101007047.atkfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local atk=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_CYBERSE)*400
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(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--転生炎獣サンライトウルフ
--Salamangreat Sunlight Wolf
--Scripted by Eerie Code, mod by mercury233
function c101007048.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c101007048.matfilter,2,2)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007048,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101007048)
e1:SetCondition(c101007048.thcon1)
e1:SetTarget(c101007048.thtg1)
e1:SetOperation(c101007048.thop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007048,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101007048+100)
e3:SetCondition(c101007048.thcon2)
e3:SetTarget(c101007048.thtg2)
e3:SetOperation(c101007048.thop2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c101007048.valcheck)
c:RegisterEffect(e4)
end
function c101007048.matfilter(c)
return c:IsLinkType(TYPE_EFFECT) and c:IsLinkAttribute(ATTRIBUTE_FIRE)
end
function c101007048.cfilter(c,ec)
if c:IsLocation(LOCATION_MZONE) then
return ec:GetLinkedGroup():IsContains(c)
else
return bit.band(ec:GetLinkedZone(c:GetPreviousControler()),bit.lshift(0x1,c:GetPreviousSequence()))~=0
end
end
function c101007048.thcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007048.cfilter,1,nil,e:GetHandler())
end
function c101007048.thfilter1(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007048.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007048.thfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c101007048.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101007048.thfilter1),tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007048.sumlimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
end
end
function c101007048.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
function c101007048.thcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetHandler():GetFlagEffect(101007048)~=0
end
function c101007048.thfilter2(c)
return c:IsSetCard(0x119) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101007048.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007048.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c101007048.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101007048.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101007048.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,101007048) and c:IsSummonType(SUMMON_TYPE_LINK) then
c:RegisterFlagEffect(101007048,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE-RESET_TEMP_REMOVE,0,1)
end
end
--トリックスター・ディーヴァリディス
--
--Script by mercury233
function c101007049.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,101007049)
aux.AddLinkProcedure(c,c101007049.mfilter,2,2)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007049,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101007049)
e1:SetTarget(c101007049.damtg)
e1:SetOperation(c101007049.damop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007049,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101007049.damcon2)
e2:SetTarget(c101007049.damtg)
e2:SetOperation(c101007049.damop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101007049.mfilter(c)
return c:IsLinkSetCard(0xfb) and c:IsLevelBelow(3)
end
function c101007049.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,200)
end
function c101007049.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c101007049.cfilter(c,tp)
return c:GetSummonPlayer()==tp
end
function c101007049.damcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007049.cfilter,1,nil,1-tp)
end
--TGトライデント・ランチャー
--T.G. Trident Launcher
function c101007050.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,c101007050.lcheck)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007050,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101007050)
e1:SetCondition(c101007050.spcon)
e1:SetTarget(c101007050.sptg)
e1:SetOperation(c101007050.spop)
c:RegisterEffect(e1)
--cannot be target/battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101007050.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function c101007050.lcheck(g,lc)
return g:IsExists(c101007050.mzfilter,1,nil)
end
function c101007050.mzfilter(c)
return c:IsSetCard(0x27) and c:IsType(TYPE_TUNER)
end
function c101007050.tgtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO)
end
function c101007050.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101007050.spfilter(c,e,tp,zone)
return c:IsSetCard(0x27) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
end
function c101007050.spcheck(sg,e,tp,mg)
return sg:GetClassCount(Card.GetLocation)==#sg
end
function c101007050.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp)&0x1f
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
return ct>2 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c101007050.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,zone)
and Duel.IsExistingMatchingCard(c101007050.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone)
and Duel.IsExistingMatchingCard(c101007050.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,zone)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c101007050.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local zone=c:GetLinkedZone(tp)&0x1f
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if ct<3 then return end
local g1=Duel.GetMatchingGroup(c101007050.spfilter,tp,LOCATION_HAND,0,nil,e,tp,zone)
local g2=Duel.GetMatchingGroup(c101007050.spfilter,tp,LOCATION_DECK,0,nil,e,tp,zone)
local g3=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101007050.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,zone)
if #g1==0 or #g2==0 or #g3==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg3=g3:Select(tp,1,1,nil)
sg1:Merge(sg3)
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP_DEFENSE,zone)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007050.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101007050.splimit(e,c)
return not c:IsSetCard(0x27)
end
--守護竜エルピィ
--Script by nekrozar
function c101007051.initial_effect(c)
c:SetSPSummonOnce(101007051)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c101007051.matfilter,1,1)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007051.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007051,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101007051)
e2:SetTarget(c101007051.sptg)
e2:SetOperation(c101007051.spop)
c:RegisterEffect(e2)
if aux.GetMultiLinkedZone==nil then
function aux.GetMultiLinkedZone(tp)
local lg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_LINK)
local multi_linked_zone=0
local single_linked_zone=0
for tc in aux.Next(lg) do
local zone=tc:GetLinkedZone(tp)&0x7f
multi_linked_zone=single_linked_zone&zone|multi_linked_zone
single_linked_zone=single_linked_zone~zone
end
return multi_linked_zone
end
end
end
function c101007051.matfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_DRAGON)
end
function c101007051.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsRace(RACE_DRAGON)
end
function c101007051.lkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101007051.spfilter(c,e,tp,zone)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101007051.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=aux.GetMultiLinkedZone(tp)
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007051.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101007051.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=aux.GetMultiLinkedZone(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or zone==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101007051.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--守護竜ピスティ
--Script by nekrozar
function c101007052.initial_effect(c)
c:SetSPSummonOnce(101007052)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c101007052.matfilter,1,1)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007052.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007052,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101007052)
e2:SetTarget(c101007052.sptg)
e2:SetOperation(c101007052.spop)
c:RegisterEffect(e2)
if aux.GetMultiLinkedZone==nil then
function aux.GetMultiLinkedZone(tp)
local lg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_LINK)
local multi_linked_zone=0
local single_linked_zone=0
for tc in aux.Next(lg) do
local zone=tc:GetLinkedZone(tp)&0x7f
multi_linked_zone=single_linked_zone&zone|multi_linked_zone
single_linked_zone=single_linked_zone~zone
end
return multi_linked_zone
end
end
end
function c101007052.matfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_DRAGON)
end
function c101007052.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsRace(RACE_DRAGON)
end
function c101007052.lkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101007052.spfilter(c,e,tp,zone)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101007052.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=aux.GetMultiLinkedZone(tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c101007052.spfilter(chkc,e,tp,zone) end
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101007052.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007052.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007052.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=aux.GetMultiLinkedZone(tp)
local tc=Duel.GetFirstTarget()
if zone~=0 and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--守護竜アガーペイン
--Script by nekrozar
function c101007053.initial_effect(c)
c:SetSPSummonOnce(101007053)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_DRAGON),2,2)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007053.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007053,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101007053)
e2:SetTarget(c101007053.sptg)
e2:SetOperation(c101007053.spop)
c:RegisterEffect(e2)
if aux.GetMultiLinkedZone==nil then
function aux.GetMultiLinkedZone(tp)
local lg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_LINK)
local multi_linked_zone=0
local single_linked_zone=0
for tc in aux.Next(lg) do
local zone=tc:GetLinkedZone(tp)&0x7f
multi_linked_zone=single_linked_zone&zone|multi_linked_zone
single_linked_zone=single_linked_zone~zone
end
return multi_linked_zone
end
end
end
function c101007053.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsRace(RACE_DRAGON)
end
function c101007053.lkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101007053.spfilter(c,e,tp,zone)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101007053.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=aux.GetMultiLinkedZone(tp)
if chk==0 then return zone~=0 and Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c101007053.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101007053.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=aux.GetMultiLinkedZone(tp)
if Duel.GetLocationCountFromEx(tp)<=0 or zone==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101007053.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--麗神-不知火
--Shiranui Splendidsaga
--scripted by Naim
function c101007054.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE),2)
--indes by effects
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SYNCHRO))
e1:SetValue(1)
c:RegisterEffect(e1)
--indes by battle
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE))
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007054,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101007054)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(c101007054.condition)
e3:SetTarget(c101007054.target)
e3:SetOperation(c101007054.operation)
c:RegisterEffect(e3)
end
function c101007054.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c101007054.filter(c,e,tp,zone)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101007054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=e:GetHandler():GetLinkedZone(tp)&0x1f
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101007054.filter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101007054.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007054.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007054.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local zone=c:GetLinkedZone(tp)&0x1f
if tc and tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--閃刀姫-カイナ
--Sky Striker Ace - Kaina
--Script by nekrozar
function c101007055.initial_effect(c)
c:SetSPSummonOnce(101007055)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c101007055.matfilter,1,1)
--atk limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007055,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c101007055.atktg)
e1:SetOperation(c101007055.atkop)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101007055.reccon)
e3:SetOperation(c101007055.recop)
c:RegisterEffect(e3)
end
function c101007055.matfilter(c)
return c:IsLinkSetCard(0x1115) and not c:IsLinkAttribute(ATTRIBUTE_EARTH)
end
function c101007055.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c101007055.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
end
end
function c101007055.reccon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x115) and rp==tp and e:GetHandler():GetFlagEffect(1)>0
end
function c101007055.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,100,REASON_EFFECT)
end
--灼熱の火霊使いヒータ
--Hiita the Blazing Fire Charmer
--Script by nekrozar
function c101007056.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c101007056.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007056,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101007056)
e1:SetTarget(c101007056.sptg)
e1:SetOperation(c101007056.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007056,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,101007156)
e2:SetCondition(c101007056.thcon)
e2:SetTarget(c101007056.thtg)
e2:SetOperation(c101007056.thop)
c:RegisterEffect(e2)
end
function c101007056.lcheck(g)
return g:IsExists(Card.IsLinkAttribute,1,nil,ATTRIBUTE_FIRE)
end
function c101007056.spfilter(c,e,tp,zone)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101007056.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c101007056.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101007056.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007056.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007056.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c101007056.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c101007056.thfilter(c)
return c:IsDefenseBelow(1500) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c101007056.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007056.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101007056.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101007056.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
--フュージョン・オブ・ファイア
--Fusion of Fire
--Script by nekrozar
function c101007057.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101007057+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101007057.target)
e1:SetOperation(c101007057.activate)
c:RegisterEffect(e1)
end
function c101007057.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c101007057.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c101007057.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x119) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101007057.filter3(c,e)
return not c:IsImmuneToEffect(e)
end
function c101007057.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c101007057.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c101007057.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101007057.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101007057.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101007057.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c101007057.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c101007057.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101007057.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--トリックスター・ライブステージ
--
--Script by mercury233
function c101007058.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:SetOperation(c101007058.activate)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007058,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101007058)
e2:SetCost(c101007058.cost)
e2:SetCondition(c101007058.spcon1)
e2:SetTarget(c101007058.sptg)
e2:SetOperation(c101007058.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(101007058,2))
e3:SetCountLimit(1,101007058+100)
e3:SetCondition(c101007058.spcon2)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(101007058,ACTIVITY_SPSUMMON,c101007058.counterfilter)
end
function c101007058.counterfilter(c)
return c:IsSetCard(0xfb)
end
function c101007058.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101007058,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:SetLabelObject(e)
e1:SetTarget(c101007058.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101007058.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xfb)
end
function c101007058.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfb) and c:IsAbleToHand()
end
function c101007058.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c101007058.thfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101007058,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
function c101007058.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0xfb) and c:IsType(TYPE_LINK)
end
function c101007058.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101007058.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c101007058.cfilter2(c)
return c:GetSequence()<5
end
function c101007058.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101007058.cfilter2,tp,0,LOCATION_SZONE,1,nil)
end
function c101007058.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101007158,0xfb,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT,POS_FACEUP) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101007058.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,101007158,0xfb,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,101007158)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--トリックスター・フュージョン
--
--Script by mercury233
function c101007059.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007059,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101007059.target)
e1:SetOperation(c101007059.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(101007059,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101007059.thtg)
e2:SetOperation(c101007059.thop)
c:RegisterEffect(e2)
end
function c101007059.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c101007059.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xfb) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101007059.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c101007059.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101007059.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101007059.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101007059.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c101007059.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101007059.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c101007059.thfilter(c)
return c:IsSetCard(0xfb) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007059.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101007059.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007059.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101007059.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101007059.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007059.sumlimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
end
end
function c101007059.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
--ネオス・フュージョン
--Neos Fusion
--Script by mercury233
function c101007060.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007060,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101007060.target)
e1:SetOperation(c101007060.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c101007060.reptg)
e2:SetValue(c101007060.repval)
e2:SetOperation(c101007060.repop)
c:RegisterEffect(e2)
--return replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c101007060.reptg2)
e3:SetOperation(c101007060.repop2)
e3:SetValue(c101007060.repval2)
c:RegisterEffect(e3)
end
c101007060.card_code_list={89943723}
function c101007060.filter1(c,e)
return c:IsAbleToGrave() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c101007060.filter2(c,e,tp,m,chkf)
return c.neos_fusion and aux.IsMaterialListCode(c,89943723)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101007060.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c101007060.filter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK,0,nil,e)
return Duel.IsExistingMatchingCard(c101007060.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101007060.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(c101007060.filter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK,0,nil,e)
local sg=Duel.GetMatchingGroup(c101007060.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
Duel.SendtoGrave(mat,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
end
function c101007060.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_FUSION)
and aux.IsMaterialListCode(c,89943723) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101007060.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c101007060.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101007060.repval(e,c)
return c101007060.repfilter(c,e:GetHandlerPlayer())
end
function c101007060.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function c101007060.repfilter2(c,tp,re)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and aux.IsMaterialListCode(c,89943723) and c:IsType(TYPE_MONSTER)
and c:GetDestination()==LOCATION_DECK and re:GetOwner()==c
end
function c101007060.reptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re
and e:GetHandler():IsAbleToRemove() and eg:IsExists(c101007060.repfilter2,1,nil,tp,re) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),95) then
return true
else return false end
end
function c101007060.repop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function c101007060.repval2(e,c)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and aux.IsMaterialListCode(c,89943723) and c:IsType(TYPE_MONSTER)
end
--守護竜の結界
--Script by nekrozar
function c101007061.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007061,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101007061)
e2:SetTarget(c101007061.atktg)
e2:SetOperation(c101007061.atkop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c101007061.desreptg)
e3:SetValue(c101007061.desrepval)
e3:SetOperation(c101007061.desrepop)
c:RegisterEffect(e3)
end
function c101007061.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function c101007061.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101007061.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007061.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007061.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c101007061.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101007061.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101007061.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c101007061.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetSum(Card.GetLink)
local tc=Duel.GetFirstTarget()
if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
function c101007061.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_DRAGON) and c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c101007061.tgfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave()
end
function c101007061.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetCount()==1 and eg:IsExists(c101007061.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c101007061.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101007061.desrepval(e,c)
return c101007061.repfilter(c,e:GetHandlerPlayer())
end
function c101007061.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007061.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
--星遺物の守護竜
--Script by nekrozar
function c101007062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101007062)
e1:SetTarget(c101007062.target)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007062,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c101007062.seqtg)
e2:SetOperation(c101007062.seqop)
c:RegisterEffect(e2)
end
function c101007062.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c101007062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101007062.spfilter(chkc,e,tp) end
if chk==0 then return true end
if Duel.IsExistingTarget(c101007062.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101007062,1)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c101007062.activate)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101007062.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c101007062.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c101007062.seqfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function c101007062.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007062.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007062.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101007062,2))
Duel.SelectTarget(tp,c101007062.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101007062.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
--逢華妖麗譚-不知火語
--Shiranui Story Saga
--Logical Nonsense
function c101007063.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:SetCountLimit(1,101007063+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101007063.condition)
e1:SetCost(c101007063.cost)
e1:SetTarget(c101007063.target)
e1:SetOperation(c101007063.activate)
c:RegisterEffect(e1)
end
function c101007063.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c101007063.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c101007063.costfilter(c,e,tp)
return c:IsDiscardable() and c:IsRace(RACE_ZOMBIE)
and Duel.IsExistingMatchingCard(c101007063.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end
function c101007063.spfilter(c,e,tp,code)
return c:IsSetCard(0xd9) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code)
end
function c101007063.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007063.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
end
local g=Duel.SelectMatchingCard(tp,c101007063.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101007063.activate(e,tp,eg,ep,ev,re,r,rp)
local dc=e:GetLabelObject()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101007063.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,dc:GetCode())
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101007063.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101007063.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_ZOMBIE)
end
--不知火流 伝承の陣
--Shiranui Style Succession
--Script by nekrozar
function c101007064.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(40005099)
c:RegisterEffect(e2)
--summon limit
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101007064,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(c101007064.limcost)
e3:SetOperation(c101007064.limop)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101007064,1))
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetTarget(c101007064.rmtg)
e4:SetOperation(c101007064.rmop)
c:RegisterEffect(e4)
end
function c101007064.costfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
function c101007064.limcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007064.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101007064.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101007064.limop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE))
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
Duel.RegisterEffect(e2,tp)
end
function c101007064.rmfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove()
end
function c101007064.tgfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsDefense(0) and c:IsAbleToGrave()
end
function c101007064.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007064.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007064.rmfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c101007064.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101007064.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(c101007064.tgfilter,tp,LOCATION_DECK,0,nil)
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED)
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101007064,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--魔神儀の祝誕
--
--Script by mercury233
function c101007065.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101007065,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101007065.target)
e1:SetOperation(c101007065.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007065,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101007065)
e2:SetCost(c101007065.thcost)
e2:SetTarget(c101007065.thtg)
e2:SetOperation(c101007065.thop)
c:RegisterEffect(e2)
end
function c101007065.filter(c,e,tp,m,ft)
if bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if c:IsCode(21105106) then return c101007065.c21105106ritual_custom_condition(c,mg,ft,true) end
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(c101007065.filterF,1,nil,tp,mg,c)
end
end
function c101007065.filterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end
function c101007065.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsSetCard,nil,0x117)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c101007065.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101007065.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsSetCard,nil,0x117)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c101007065.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil
if tc:IsCode(21105106) then
c101007065.c21105106ritual_custom_operation(tc,mg,true)
local mat=tc:GetMaterial()
Duel.ReleaseRitualMaterial(mat)
else
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c101007065.filterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c101007065.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0x117) and not c:IsCode(101007065) and c:IsAbleToGraveAsCost()
end
function c101007065.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007065.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007065.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101007065.spfilter(c,e,tp)
return c:IsSetCard(0x117) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007065.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c101007065.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c101007065.thop(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,c101007065.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
function c101007065.c21105106filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c101007065.c21105106ritual_custom_condition(c,mg,ft,greater)
--ft is kept for compatablity
local tp=c:GetControler()
local g=mg:Filter(c101007065.c21105106filter,c,tp)
local sg=Group.CreateGroup()
return g:IsExists(c101007065.c21105106rselect,1,nil,tp,sg,g,c,greater)
end
function c101007065.c21105106rselect(c,tp,sg,mg,rc,greater)
sg:AddCard(c)
local res=#sg==3 and c101007065.c21105106rgoal(tp,sg,rc,greater)
or #sg<3 and mg:IsExists(c101007065.c21105106rselect,1,sg,tp,sg,mg,rc,greater)
sg:RemoveCard(c)
return res
end
function c101007065.c21105106rgoal(tp,sg,rc,greater)
if not (#sg==3 and Duel.GetMZoneCount(tp,sg,tp)>0 and sg:GetClassCount(Card.GetRace)==3) then return false end
if greater then
Duel.SetSelectedCard(sg)
return sg:CheckWithSumGreater(Card.GetLevel,rc:GetLevel())
else
return sg:GetSum(Card.GetLevel)==rc:GetLevel()
end
end
function c101007065.c21105106ritual_custom_operation(c,mg1,greater)
local tp=c:GetControler()
local lv=c:GetLevel()
local mg=mg1:Filter(c101007065.c21105106filter,c,tp)
local sg=Group.CreateGroup()
while #sg<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=mg:FilterSelect(tp,c101007065.c21105106rselect,1,1,sg,tp,sg,mg,c,greater)
sg:Merge(g)
end
c:SetMaterial(sg)
end
--ユニゾン・チューン
--Script by nekrozar
function c101007066.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101007066+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101007066.target)
e1:SetOperation(c101007066.activate)
c:RegisterEffect(e1)
end
function c101007066.filter1(c,tp)
local lv=c:GetLevel()
return lv>0 and c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
and Duel.IsExistingTarget(c101007066.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lv)
end
function c101007066.filter2(c,lv)
return c:IsFaceup() and (not c:IsType(TYPE_TUNER) or not c:IsLevel(lv))
end
function c101007066.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101007066.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c101007066.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,c101007066.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g1:GetFirst():GetLevel())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,0)
end
function c101007066.activate(e,tp,eg,ep,ev,re,r,rp)
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end
if hc:IsRelateToEffect(e) and Duel.Remove(hc,POS_FACEUP,REASON_EFFECT)~=0 and hc:IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL)
e1:SetValue(hc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_TUNER)
tc:RegisterEffect(e2)
end
end
--強欲で金満な壺
--Pot of Indulgence
--Scripted by Eerie Code
function c101007067.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_PLAYER_TARGET)
e1:SetCondition(c101007067.condition)
e1:SetCost(c101007067.cost)
e1:SetTarget(c101007067.target)
e1:SetOperation(c101007067.activate)
c:RegisterEffect(e1)
end
function c101007067.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c101007067.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c101007067.cfilter(c)
return c:IsFacedown() and c:IsAbleToRemoveAsCost()
end
function c101007067.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101007067.cfilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsPlayerCanDraw(tp,1) and #g>=3
end
local op=0
if Duel.IsPlayerCanDraw(tp,2) and #g>=6 then
op=Duel.SelectOption(tp,aux.Stringid(101007067,0),aux.Stringid(101007067,1))
else
op=Duel.SelectOption(tp,aux.Stringid(101007067,0))
end
local rg=g:RandomSelect(tp,3+op*3)
Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(op+1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,op+1)
end
function c101007067.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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--土俵間際
--Script by nekrozar
function c101007068.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c101007068.condition)
e1:SetTarget(c101007068.target)
e1:SetOperation(c101007068.activate)
c:RegisterEffect(e1)
end
function c101007068.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c101007068.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>0
end
function c101007068.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 c101007068.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007068.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101007068.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,math.ceil(g:GetFirst():GetBaseAttack()/2))
end
function c101007068.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Damage(1-tp,math.ceil(tc:GetBaseAttack()/2),REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetTargetRange(0,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
--大胆無敵
--Script by nekrozar
function c101007069.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c101007069.reccon)
e2:SetOperation(c101007069.recop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetCondition(c101007069.indcon)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function c101007069.cfilter(c,tp)
return c:GetSummonPlayer()==tp
end
function c101007069.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101007069.cfilter,1,nil,1-tp)
end
function c101007069.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101007069)
Duel.Recover(tp,300,REASON_EFFECT)
end
function c101007069.indcon(e)
return Duel.GetLP(e:GetHandlerPlayer())>=10000
end
--サモンオーバー
--Script by nekrozar
function c101007070.initial_effect(c)
c:EnableCounterPermit(0x4b)
c:SetCounterLimit(0x4b,6)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c101007070.ctop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c101007070.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101007070,0))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetRange(LOCATION_FZONE)
e4:SetCondition(c101007070.tgcon)
e4:SetTarget(c101007070.tgtg)
e4:SetOperation(c101007070.tgop)
c:RegisterEffect(e4)
end
function c101007070.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x4b,1)
end
function c101007070.indcon(e)
return e:GetHandler():GetCounter(0x4b)==6
end
function c101007070.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():GetCounter(0x4b)==6
end
function c101007070.tgfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToGrave()
end
function c101007070.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007070.tgfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c101007070.tgfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c101007070.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
local g=Duel.GetMatchingGroup(c101007070.tgfilter,tp,0,LOCATION_MZONE,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--NEXT
--NEXT
--Script by nekrozar
function c101007071.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,101007071+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101007071.target)
e1:SetOperation(c101007071.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c101007071.handcon)
c:RegisterEffect(e2)
end
c101007071.card_code_list={89943723}
function c101007071.filter(c,e,tp)
return (c:IsCode(89943723) or c:IsSetCard(0x1f)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007071.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007071.filter,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 c101007071.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101007071.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()==0 then return end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
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)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetAbsoluteRange(tp,1,0)
e3:SetTarget(c101007071.splimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1
until ft<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(101007071,0))
Duel.SpecialSummonComplete()
end
function c101007071.splimit(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function c101007071.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
--守護竜の核醒
--Script by nekrozar
function c101007072.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007072,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,101007072)
e2:SetCost(c101007072.spcost)
e2:SetTarget(c101007072.sptg)
e2:SetOperation(c101007072.spop)
c:RegisterEffect(e2)
end
function c101007072.costfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsAbleToGraveAsCost()
end
function c101007072.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007072.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101007072.costfilter,1,1,REASON_COST)
end
function c101007072.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(4)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007072.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007072.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 c101007072.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101007072.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--崩界の守護竜
--Script by nekrozar
function c101007073.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101007073+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101007073.cost)
e1:SetTarget(c101007073.target)
e1:SetOperation(c101007073.activate)
c:RegisterEffect(e1)
end
function c101007073.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c101007073.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c101007073.costfilter(c,ec,tp)
if not c:IsRace(RACE_DRAGON) then return false end
return Duel.IsExistingTarget(c101007073.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c,c,ec)
end
function c101007073.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c101007073.costfilter,1,c,c,tp)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c101007073.costfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c101007073.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(sg,REASON_EFFECT)
end
--不知火流 才華の陣
--Shiranui Style Skill
--Logical Nonsense
function c101007074.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,101007074)
e1:SetTarget(c101007074.target)
e1:SetOperation(c101007074.activate)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101007074,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101007074)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101007074.immtg)
e2:SetOperation(c101007074.immop)
c:RegisterEffect(e2)
end
function c101007074.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007074.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007074.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101007074.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101007074.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c101007074.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)
end
function c101007074.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101007074.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101007074.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101007074.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101007074.immop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c101007074.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c101007074.efilter(e,te)
return te:GetOwner()~=e:GetHandler()
end
--逢魔ノ刻
--Witching Hour
--Script by nekrozar
function c101007075.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101007075.target)
e1:SetOperation(c101007075.activate)
c:RegisterEffect(e1)
end
function c101007075.filter(c,e,tp)
return not c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101007075.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101007075.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007075.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101007075.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)
end
end
--オルフェゴール・リリース
--
--Script by mercury233
function c101007076.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,101007076+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101007076.cost)
e1:SetTarget(c101007076.target)
e1:SetOperation(c101007076.activate)
c:RegisterEffect(e1)
end
function c101007076.rfilter(c,tp)
return c:IsRace(RACE_MACHINE) and (c:IsControler(tp) or c:IsFaceup())
end
function c101007076.fselect(c,tp,rg,sg)
sg:AddCard(c)
if sg:GetCount()<2 then
res=rg:IsExists(c101007076.fselect,1,sg,tp,rg,sg)
else
res=c101007076.fgoal(tp,sg)
end
sg:RemoveCard(c)
return res
end
function c101007076.fgoal(tp,sg)
if sg:GetCount()>0 and Duel.GetMZoneCount(tp,sg)>0 then
Duel.SetSelectedCard(sg)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function c101007076.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
local rg=Duel.GetReleaseGroup(tp):Filter(c101007076.rfilter,nil,tp)
local g=Group.CreateGroup()
if chk==0 then return rg:IsExists(c101007076.fselect,1,nil,tp,rg,g) end
while g:GetCount()<2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:FilterSelect(tp,c101007076.fselect,1,1,g,tp,rg,g)
g:Merge(sg)
end
Duel.Release(g,REASON_COST)
end
function c101007076.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101007076.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101007076.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and Duel.IsExistingTarget(c101007076.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
local ct=math.min(2,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if Duel.IsPlayerAffectedByEffect(tp,59822133)
or not Duel.IsExistingMatchingCard(c101007076.cfilter,tp,0,LOCATION_MZONE,1,nil) then
ct=1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101007076.spfilter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function c101007076.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ft,ft,nil)
end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--サブテラーの継承
--Subterror Succession
--Script by nekrozar
function c101007077.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101007077+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c101007077.target)
e1:SetOperation(c101007077.activate)
c:RegisterEffect(e1)
end
function c101007077.tgfilter1(c,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c101007077.thfilter1,tp,LOCATION_DECK,0,1,nil,c:GetAttribute(),c:GetCode())
end
function c101007077.thfilter1(c,att,code)
return c:IsAttribute(att) and not c:IsCode(code) and c:IsType(TYPE_FLIP) and c:IsAbleToHand()
end
function c101007077.tgfilter2(c,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_FLIP) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c101007077.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetAttribute(),c:GetOriginalLevel())
end
function c101007077.thfilter2(c,att,clv)
local lv=c:GetOriginalLevel()
return lv>0 and c:IsAttribute(att) and lv<clv and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101007077.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c101007077.tgfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(c101007077.tgfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(101007077,0),aux.Stringid(101007077,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(101007077,0))
else
op=Duel.SelectOption(tp,aux.Stringid(101007077,1))+1
end
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101007077.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c101007077.tgfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
local tc1=g1:GetFirst()
if tc1 and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c101007077.thfilter1,tp,LOCATION_DECK,0,1,1,nil,tc1:GetAttribute(),tc1:GetCode())
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c101007077.tgfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
local tc1=g1:GetFirst()
if tc1 and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c101007077.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc1:GetAttribute(),tc1:GetOriginalLevel())
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--闇の増産工場
--Dark Factory of Increased Production
--Scripted by Eerie Code
function c101007078.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101007078)
e2:SetCost(c101007078.cost)
e2:SetTarget(c101007078.target)
e2:SetOperation(c101007078.operation)
c:RegisterEffect(e2)
end
function c101007078.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c101007078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101007078.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101007078.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101007078.target(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 c101007078.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--魔女の一撃
--Witch's Strike
--Script by mercury233
function c101007079.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_NEGATED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c101007079.condition1)
e1:SetTarget(c101007079.target)
e1:SetOperation(c101007079.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_NEGATED)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_CUSTOM+101007079)
c:RegisterEffect(e3)
if not c101007079.global_check then
c101007079.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(c101007079.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101007079.checkop(e,tp,eg,ep,ev,re,r,rp)
local dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_PLAYER)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+101007079,e,0,dp,0,0)
end
function c101007079.condition1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c101007079.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101007079.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--ロスタイム
--Script by nekrozar
function c101007080.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101007080+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101007080.condition)
e1:SetOperation(c101007080.activate)
c:RegisterEffect(e1)
end
function c101007080.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(1-tp)>=4000 and Duel.GetLP(tp)~=Duel.GetLP(1-tp)-1000
end
function c101007080.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(1-tp)>=4000 and Duel.GetLP(tp)~=Duel.GetLP(1-tp)-1000 then
Duel.SetLP(tp,Duel.GetLP(1-tp)-1000)
end
end
--封狼雷坊
--Script by mercury233
function c101007100.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101007100)
e1:SetCondition(c101007100.condition)
e1:SetCost(c101007100.cost)
e1:SetTarget(c101007100.target)
e1:SetOperation(c101007100.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101007200)
e2:SetCondition(c101007100.spcon)
e2:SetTarget(c101007100.sptg)
e2:SetOperation(c101007100.spop)
c:RegisterEffect(e2)
end
function c101007100.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c101007100.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function c101007100.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101007100.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(44508094,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c101007100.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c101007100.spfilter(c,e,tp)
return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101007100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101007100.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101007100.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,c101007100.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
--E・HERO エアー・ネオス
function c11502550.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,54959865,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c11502550.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11502550.spcon)
e2:SetOperation(c11502550.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11502550,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c11502550.retcon1)
e3:SetTarget(c11502550.rettg)
e3:SetOperation(c11502550.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c11502550.retcon2)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c11502550.atkval)
c:RegisterEffect(e5)
end
c11502550.material_setcode=0x8
c11502550.card_code_list={89943723}
c11502550.neos_fusion=true
function c11502550.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c11502550.matfilter(c)
return c:IsFusionCode(89943723,54959865) and c:IsAbleToDeckOrExtraAsCost()
end
function c11502550.spfilter1(c,tp,g)
return g:IsExists(c11502550.spfilter2,1,c,tp,c)
end
function c11502550.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(54959865)
or c:IsFusionCode(54959865) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11502550.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c11502550.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c11502550.spfilter1,1,nil,tp,g)
end
function c11502550.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c11502550.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c11502550.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c11502550.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c11502550.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c11502550.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c11502550.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c11502550.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local rg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_GRAVE,0,nil,101007060)
local rep=false
for rc in Auxiliary.Next(rg) do
local rpeg={rc:IsHasEffect(101007060)}
for _,rpe in pairs(rpeg) do
if Duel.SelectEffectYesNo(tp,rc,rpe:GetDescription()) then
rep=true
local op=rpe:GetOperation()
op(rpe,tp,eg,ep,ev,re,r,rp)
break
end
end
if rep then break end
end
if not rep then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c11502550.atkval(e,c)
local lps=Duel.GetLP(c:GetControler())
local lpo=Duel.GetLP(1-c:GetControler())
if lps>=lpo then return 0
else return lpo-lps end
end
--インスタント・ネオスペース
function c11913700.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c11913700.target)
e1:SetOperation(c11913700.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c11913700.eqlimit)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(42015635)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11913700,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c11913700.spcon)
e4:SetTarget(c11913700.sptg)
e4:SetOperation(c11913700.spop)
c:RegisterEffect(e4)
end
c11913700.card_code_list={89943723}
function c11913700.eqlimit(e,c)
return aux.IsMaterialListCode(c,89943723)
end
function c11913700.filter(c)
return c:IsFaceup() and aux.IsMaterialListCode(c,89943723)
end
function c11913700.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c11913700.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11913700.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c11913700.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c11913700.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c11913700.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetPreviousEquipTarget()
return e:GetHandler():IsReason(REASON_LOST_TARGET) and not ec:IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c11913700.spfilter(c,e,tp)
return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11913700.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11913700.spfilter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end
function c11913700.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(c11913700.spfilter),tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--トライアングル・X・スパーク
function c12181376.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c12181376.target)
e1:SetOperation(c12181376.activate)
c:RegisterEffect(e1)
end
c12181376.card_code_list={12206212}
function c12181376.filter(c)
return c:IsFaceup() and c:IsCode(12206212)
end
function c12181376.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12181376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c12181376.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c12181376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(2700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
--cannot activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c12181376.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_SZONE)
e2:SetTarget(c12181376.distg)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--disable trap monster
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c12181376.distg)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c12181376.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
end
function c12181376.distg(e,c)
return c:IsType(TYPE_TRAP)
end
--リバース・オブ・ネオス
function c18302224.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c18302224.condition)
e1:SetTarget(c18302224.target)
e1:SetOperation(c18302224.activate)
c:RegisterEffect(e1)
end
c18302224.card_code_list={89943723}
function c18302224.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION)
end
function c18302224.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c18302224.cfilter,1,nil,tp)
end
function c18302224.filter(c,e,tp)
return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c18302224.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c18302224.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c18302224.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,c18302224.filter,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_ATTACK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetOperation(c18302224.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function c18302224.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--E・HERO ブラック・ネオス
function c28677304.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,43237273,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c28677304.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c28677304.spcon)
e2:SetOperation(c28677304.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28677304,0))
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c28677304.retcon1)
e3:SetTarget(c28677304.rettg)
e3:SetOperation(c28677304.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c28677304.retcon2)
c:RegisterEffect(e4)
--disable
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(28677304,1))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c28677304.discon)
e5:SetTarget(c28677304.distg)
e5:SetOperation(c28677304.disop)
c:RegisterEffect(e5)
end
c28677304.material_setcode=0x8
c28677304.card_code_list={89943723}
c28677304.neos_fusion=true
function c28677304.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c28677304.matfilter(c)
return c:IsFusionCode(89943723,43237273) and c:IsAbleToDeckOrExtraAsCost()
end
function c28677304.spfilter1(c,tp,g)
return g:IsExists(c28677304.spfilter2,1,c,tp,c)
end
function c28677304.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(43237273)
or c:IsFusionCode(43237273) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c28677304.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c28677304.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c28677304.spfilter1,1,nil,tp,g)
end
function c28677304.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c28677304.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c28677304.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c28677304.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c28677304.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c28677304.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c28677304.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c28677304.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local rg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_GRAVE,0,nil,101007060)
local rep=false
for rc in Auxiliary.Next(rg) do
local rpeg={rc:IsHasEffect(101007060)}
for _,rpe in pairs(rpeg) do
if Duel.SelectEffectYesNo(tp,rc,rpe:GetDescription()) then
rep=true
local op=rpe:GetOperation()
op(rpe,tp,eg,ep,ev,re,r,rp)
break
end
end
if rep then break end
end
if not rep then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c28677304.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCardTargetCount()==0
end
function c28677304.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c28677304.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c28677304.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28677304.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c28677304.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c28677304.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c28677304.rcon)
tc:RegisterEffect(e1,true)
end
end
function c28677304.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
--ミラクル・コンタクト
function c35255456.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c35255456.target)
e1:SetOperation(c35255456.activate)
c:RegisterEffect(e1)
end
c35255456.card_code_list={89943723}
function c35255456.filter1(c,e)
return c:IsAbleToDeck() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c35255456.filter2(c,e,tp,m,chkf)
return c:IsSetCard(0x3008) and aux.IsMaterialListCode(c,89943723)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c35255456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c35255456.filter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
return Duel.IsExistingMatchingCard(c35255456.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c35255456.cffilter(c)
return c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
function c35255456.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c35255456.filter1),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local sg=Duel.GetMatchingGroup(c35255456.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
local cf=mat:Filter(c35255456.cffilter,nil)
if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf)
end
Duel.SendtoDeck(mat,nil,2,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
--Contact Gate
function c41933425.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,41933425+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c41933425.cost)
e1:SetTarget(c41933425.target)
e1:SetOperation(c41933425.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(41933425,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c41933425.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c41933425.sptg)
e2:SetOperation(c41933425.spop)
c:RegisterEffect(e2)
end
c41933425.card_code_list={89943723}
function c41933425.cfilter1(c,e,tp)
return c:IsSetCard(0x1f) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c41933425.cfilter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c)
end
function c41933425.cfilter2(c,e,tp,tc)
if c:IsCode(tc:GetCode()) then return false end
local sg=Group.FromCards(tc,c)
local g=Duel.GetMatchingGroup(c41933425.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,sg,e,tp)
return c:IsSetCard(0x1f) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and g:GetClassCount(Card.GetCode)>1
end
function c41933425.spfilter1(c,e,tp)
return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c41933425.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c41933425.cfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c41933425.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c41933425.cfilter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst(),e,tp,g1:GetFirst())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c41933425.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c41933425.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and g:GetClassCount(Card.GetCode)>1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c41933425.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c41933425.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c41933425.spfilter1),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if g:GetClassCount(Card.GetCode)>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP)
end
end
function c41933425.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function c41933425.confilter(c,tp)
return aux.IsMaterialListCode(c,89943723) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsLocation(LOCATION_EXTRA)
end
function c41933425.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c41933425.confilter,1,nil,tp)
end
function c41933425.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c41933425.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c41933425.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c41933425.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,c41933425.spfilter2,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
--ネオスペース
function c42015635.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c42015635.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
--may not return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(42015635)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
c:RegisterEffect(e3)
end
c42015635.card_code_list={89943723}
function c42015635.atktg(e,c)
return c:IsCode(89943723) or aux.IsMaterialListCode(c,89943723)
end
--ネオス・フォース
function c47274077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c47274077.target)
e1:SetOperation(c47274077.operation)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c47274077.eqlimit)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(47274077,0))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCondition(c47274077.damcon)
e4:SetTarget(c47274077.damtg)
e4:SetOperation(c47274077.damop)
c:RegisterEffect(e4)
--return
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(47274077,1))
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetTarget(c47274077.rettg)
e5:SetOperation(c47274077.retop)
c:RegisterEffect(e5)
end
c47274077.card_code_list={89943723}
function c47274077.eqlimit(e,c)
return c:IsCode(89943723)
end
function c47274077.filter(c)
return c:IsFaceup() and c:IsCode(89943723)
end
function c47274077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c47274077.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47274077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c47274077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c47274077.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c47274077.damcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
return ec==e:GetHandler():GetEquipTarget() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c47274077.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
local dam=bc:GetAttack()
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c47274077.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c47274077.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c47274077.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
--E・HERO グラン・ネオス
function c48996569.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,80344569,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c48996569.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c48996569.spcon)
e2:SetOperation(c48996569.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48996569,0))
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c48996569.retcon1)
e3:SetTarget(c48996569.rettg)
e3:SetOperation(c48996569.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c48996569.retcon2)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(48996569,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetTarget(c48996569.thtg)
e5:SetOperation(c48996569.thop)
c:RegisterEffect(e5)
end
c48996569.material_setcode=0x8
c48996569.card_code_list={89943723}
c48996569.neos_fusion=true
function c48996569.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c48996569.matfilter(c)
return c:IsFusionCode(89943723,80344569) and c:IsAbleToDeckOrExtraAsCost()
end
function c48996569.spfilter1(c,tp,g)
return g:IsExists(c48996569.spfilter2,1,c,tp,c)
end
function c48996569.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(80344569)
or c:IsFusionCode(80344569) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c48996569.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c48996569.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c48996569.spfilter1,1,nil,tp,g)
end
function c48996569.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c48996569.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c48996569.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c48996569.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c48996569.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c48996569.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c48996569.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c48996569.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local rg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_GRAVE,0,nil,101007060)
local rep=false
for rc in Auxiliary.Next(rg) do
local rpeg={rc:IsHasEffect(101007060)}
for _,rpe in pairs(rpeg) do
if Duel.SelectEffectYesNo(tp,rc,rpe:GetDescription()) then
rep=true
local op=rpe:GetOperation()
op(rpe,tp,eg,ep,ev,re,r,rp)
break
end
end
if rep then break end
end
if not rep then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c48996569.filter(c)
return c:IsAbleToHand()
end
function c48996569.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48996569.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c48996569.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c48996569.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c48996569.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--ネオス・ワイズマン
function c5126490.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c5126490.spcon)
e2:SetOperation(c5126490.spop)
c:RegisterEffect(e2)
--damage&recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5126490,0))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetTarget(c5126490.damtg)
e3:SetOperation(c5126490.damop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end
c5126490.card_code_list={89943723}
function c5126490.spfilter1(c,tp)
return c:IsFaceup() and c:IsCode(89943723) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c5126490.spfilter2,tp,LOCATION_MZONE,0,1,c)
end
function c5126490.spfilter2(c)
return c:IsFaceup() and c:IsCode(78371393) and c:IsAbleToGraveAsCost()
end
function c5126490.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c5126490.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c5126490.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c5126490.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c5126490.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function c5126490.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil end
local bc=e:GetHandler():GetBattleTarget()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bc:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,bc:GetDefense())
end
function c5126490.damop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
local atk=bc:GetAttack()
local def=bc:GetDefense()
if atk<0 then atk=0 end
if def<0 then def=0 end
Duel.Damage(1-tp,atk,REASON_EFFECT,true)
Duel.Recover(tp,def,REASON_EFFECT,true)
Duel.RDComplete()
end
--E・HERO マリン・ネオス
function c5128859.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,78734254,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c5128859.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c5128859.spcon)
e2:SetOperation(c5128859.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5128859,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c5128859.destg)
e3:SetOperation(c5128859.desop)
c:RegisterEffect(e3)
end
c5128859.material_setcode=0x8
c5128859.card_code_list={89943723}
c5128859.neos_fusion=true
function c5128859.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c5128859.matfilter(c)
return c:IsFusionCode(89943723,78734254) and c:IsAbleToDeckOrExtraAsCost()
end
function c5128859.spfilter1(c,tp,g)
return g:IsExists(c5128859.spfilter2,1,c,tp,c)
end
function c5128859.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(78734254)
or c:IsFusionCode(78734254) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c5128859.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c5128859.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c5128859.spfilter1,1,nil,tp,g)
end
function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c5128859.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c5128859.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c5128859.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c5128859.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
end
function c5128859.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
--ラス・オブ・ネオス
function c52098461.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c52098461.target)
e1:SetOperation(c52098461.activate)
c:RegisterEffect(e1)
end
c52098461.card_code_list={89943723}
function c52098461.filter(c)
return c:IsFaceup() and c:IsCode(89943723) and c:IsAbleToDeck()
end
function c52098461.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c52098461.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c52098461.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c52098461.filter,tp,LOCATION_MZONE,0,1,1,nil)
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
dg:RemoveCard(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c52098461.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c52098461.filter(tc)
and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
end
end
--E・HERO アクア・ネオス
function c55171412.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,17955766,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c55171412.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c55171412.spcon)
e2:SetOperation(c55171412.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55171412,0))
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c55171412.retcon1)
e3:SetTarget(c55171412.rettg)
e3:SetOperation(c55171412.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c55171412.retcon2)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(55171412,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c55171412.descost)
e5:SetTarget(c55171412.destg)
e5:SetOperation(c55171412.desop)
c:RegisterEffect(e5)
end
c55171412.material_setcode=0x8
c55171412.card_code_list={89943723}
c55171412.neos_fusion=true
function c55171412.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c55171412.matfilter(c)
return c:IsFusionCode(89943723,17955766) and c:IsAbleToDeckOrExtraAsCost()
end
function c55171412.spfilter1(c,tp,g)
return g:IsExists(c55171412.spfilter2,1,c,tp,c)
end
function c55171412.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(17955766)
or c:IsFusionCode(17955766) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c55171412.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c55171412.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c55171412.spfilter1,1,nil,tp,g)
end
function c55171412.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c55171412.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c55171412.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c55171412.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c55171412.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c55171412.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c55171412.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c55171412.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local rg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_GRAVE,0,nil,101007060)
local rep=false
for rc in Auxiliary.Next(rg) do
local rpeg={rc:IsHasEffect(101007060)}
for _,rpe in pairs(rpeg) do
if Duel.SelectEffectYesNo(tp,rc,rpe:GetDescription()) then
rep=true
local op=rpe:GetOperation()
op(rpe,tp,eg,ep,ev,re,r,rp)
break
end
end
if rep then break end
end
if not rep then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c55171412.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c55171412.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
end
function c55171412.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
--サイバー・ボンテージ
function c63224564.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c63224564.target)
e1:SetOperation(c63224564.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
c:RegisterEffect(e2)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c63224564.eqlimit)
c:RegisterEffect(e4)
end
c63224564.card_code_list={12206212}
function c63224564.eqlimit(e,c)
return c:IsCode(76812113,12206212)
end
function c63224564.filter(c)
return c:IsFaceup() and c:IsCode(76812113,12206212)
end
function c63224564.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63224564.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c63224564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c63224564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c63224564.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--E・HERO アナザー・ネオス
function c69884162.initial_effect(c)
aux.EnableDualAttribute(c)
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetCondition(aux.IsDualState)
e1:SetValue(89943723)
c:RegisterEffect(e1)
end
c69884162.card_code_list={89943723}
--E・HERO ネオス・ナイト
function c72926163.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c72926163.valcheck)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c72926163.atkcon)
e3:SetOperation(c72926163.atkop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--multiatk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1)
c:RegisterEffect(e4)
--no battle damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e5)
end
c72926163.material_setcode=0x8
c72926163.card_code_list={89943723}
c72926163.neos_fusion=true
function c72926163.valcheck(e,c)
local g=c:GetMaterial()
local atk=0
local tc=g:GetFirst()
if tc:IsCode(89943723) or tc:CheckFusionSubstitute(c) then tc=g:GetNext() end
if not tc:IsCode(89943723) then
atk=tc:GetTextAttack()/2
end
e:SetLabel(atk)
end
function c72926163.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c72926163.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabelObject():GetLabel()
if atk>0 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)
c:RegisterEffect(e1)
end
end
--ハーピィの狩場
function c75782277.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--trigger
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetDescription(aux.Stringid(75782277,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER)
e4:SetCode(EVENT_CUSTOM+75782277)
e4:SetTarget(c75782277.target)
e4:SetOperation(c75782277.operation)
c:RegisterEffect(e4)
--atk/def
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_FZONE)
e5:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WINDBEAST))
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetValue(200)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
if not c75782277.global_check then
c75782277.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c75782277.check)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
c75782277.card_code_list={12206212}
function c75782277.check(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
while tc do
if tc:IsFaceup() and tc:IsCode(76812113,12206212) then
if tc:IsControler(0) then g1:AddCard(tc) else g2:AddCard(tc) end
end
tc=eg:GetNext()
end
if g1:GetCount()>0 then Duel.RaiseEvent(g1,EVENT_CUSTOM+75782277,re,r,rp,0,0) end
if g2:GetCount()>0 then Duel.RaiseEvent(g2,EVENT_CUSTOM+75782277,re,r,rp,1,0) end
end
function c75782277.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c75782277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c75782277.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c75782277.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c75782277.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--E・HERO フレア・ネオス
function c81566151.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,89621922,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c81566151.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c81566151.spcon)
e2:SetOperation(c81566151.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(81566151,0))
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c81566151.retcon1)
e3:SetTarget(c81566151.rettg)
e3:SetOperation(c81566151.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c81566151.retcon2)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c81566151.atkval)
c:RegisterEffect(e5)
end
c81566151.material_setcode=0x8
c81566151.card_code_list={89943723}
c81566151.neos_fusion=true
function c81566151.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c81566151.matfilter(c)
return c:IsFusionCode(89943723,89621922) and c:IsAbleToDeckOrExtraAsCost()
end
function c81566151.spfilter1(c,tp,g)
return g:IsExists(c81566151.spfilter2,1,c,tp,c)
end
function c81566151.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(89621922)
or c:IsFusionCode(89621922) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c81566151.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c81566151.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c81566151.spfilter1,1,nil,tp,g)
end
function c81566151.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c81566151.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c81566151.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c81566151.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c81566151.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c81566151.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c81566151.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c81566151.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local rg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_GRAVE,0,nil,101007060)
local rep=false
for rc in Auxiliary.Next(rg) do
local rpeg={rc:IsHasEffect(101007060)}
for _,rpe in pairs(rpeg) do
if Duel.SelectEffectYesNo(tp,rc,rpe:GetDescription()) then
rep=true
local op=rpe:GetOperation()
op(rpe,tp,eg,ep,ev,re,r,rp)
break
end
end
if rep then break end
end
if not rep then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c81566151.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*400
end
--E・HERO グロー・ネオス
function c85507811.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,17732278,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c85507811.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c85507811.spcon)
e2:SetOperation(c85507811.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(85507811,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c85507811.retcon1)
e3:SetTarget(c85507811.rettg)
e3:SetOperation(c85507811.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c85507811.retcon2)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(85507811,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c85507811.descon)
e5:SetTarget(c85507811.destg)
e5:SetOperation(c85507811.desop)
c:RegisterEffect(e5)
end
c85507811.material_setcode=0x8
c85507811.card_code_list={89943723}
c85507811.neos_fusion=true
function c85507811.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c85507811.matfilter(c)
return c:IsFusionCode(89943723,17732278) and c:IsAbleToDeckOrExtraAsCost()
end
function c85507811.spfilter1(c,tp,g)
return g:IsExists(c85507811.spfilter2,1,c,tp,c)
end
function c85507811.spfilter2(c,tp,mc)
return (c:IsFusionCode(89943723) and mc:IsFusionCode(17732278)
or c:IsFusionCode(17732278) and mc:IsFusionCode(89943723))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c85507811.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c85507811.matfilter,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c85507811.spfilter1,1,nil,tp,g)
end
function c85507811.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c85507811.matfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:FilterSelect(tp,c85507811.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:FilterSelect(tp,c85507811.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g1,nil,2,REASON_COST)
end
function c85507811.retcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(42015635)
end
function c85507811.retcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(42015635)
end
function c85507811.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c85507811.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local rg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_GRAVE,0,nil,101007060)
local rep=false
for rc in Auxiliary.Next(rg) do
local rpeg={rc:IsHasEffect(101007060)}
for _,rpe in pairs(rpeg) do
if Duel.SelectEffectYesNo(tp,rc,rpe:GetDescription()) then
rep=true
local op=rpe:GetOperation()
op(rpe,tp,eg,ep,ev,re,r,rp)
break
end
end
if rep then break end
end
if not rep then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c85507811.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c85507811.filter(c)
return c:IsFaceup()
end
function c85507811.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c85507811.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85507811.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c85507811.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c85507811.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
if tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
elseif tc:IsType(TYPE_SPELL) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
else
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end
end
--ハーピィ・レディ -鳳凰の陣-
function c86308219.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c86308219.condition)
e1:SetCost(c86308219.cost)
e1:SetTarget(c86308219.target)
e1:SetOperation(c86308219.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(86308219,ACTIVITY_SPSUMMON,c86308219.counterfilter)
end
c86308219.card_code_list={12206212}
function c86308219.counterfilter(c)
return bit.band(c:GetSummonLocation(),LOCATION_DECK+LOCATION_EXTRA)==0
end
function c86308219.cfilter(c)
return c:IsFaceup() and c:IsCode(76812113,12206212)
end
function c86308219.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86308219.cfilter,tp,LOCATION_ONFIELD,0,3,nil)
end
function c86308219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(86308219,tp,ACTIVITY_SPSUMMON)==0
and Duel.GetCurrentPhase()==PHASE_MAIN1 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:SetTargetRange(1,0)
e1:SetTarget(c86308219.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_BP)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c86308219.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
end
function c86308219.target(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
local ct=Duel.GetMatchingGroupCount(c86308219.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function c86308219.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local mg,matk=og:GetMaxGroup(Card.GetBaseAttack)
if matk>0 then
Duel.Damage(1-tp,matk,REASON_EFFECT)
end
end
end
--レインボー・ネオス
function c86346643.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,aux.FilterBoolFunction(Card.IsFusionSetCard,0x2034),1,false,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86346643,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TODECK)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c86346643.tdcost1)
e2:SetTarget(c86346643.tdtg1)
e2:SetOperation(c86346643.tdop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86346643,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_TODECK)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(c86346643.tdcost2)
e3:SetTarget(c86346643.tdtg2)
e3:SetOperation(c86346643.tdop2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86346643,3))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCategory(CATEGORY_TODECK)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCost(c86346643.tdcost3)
e4:SetTarget(c86346643.tdtg3)
e4:SetOperation(c86346643.tdop3)
c:RegisterEffect(e4)
end
c86346643.material_setcode=0x8
c86346643.card_code_list={89943723}
c86346643.neos_fusion=true
function c86346643.cfilter1(c)
return c:IsAbleToGraveAsCost()
end
function c86346643.tdcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86346643.cfilter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86346643.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c86346643.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c86346643.tdop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c86346643.cfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c86346643.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86346643.cfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86346643.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c86346643.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c86346643.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86346643.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c86346643.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c86346643.tdop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86346643.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c86346643.tdcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c86346643.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c86346643.tdop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--万華鏡-華麗なる分身-
function c90219263.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:SetCondition(c90219263.condition)
e1:SetTarget(c90219263.target)
e1:SetOperation(c90219263.activate)
c:RegisterEffect(e1)
end
c90219263.card_code_list={12206212}
function c90219263.cfilter(c)
return c:IsFaceup() and c:IsCode(76812113)
end
function c90219263.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c90219263.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c90219263.filter(c,e,tp)
return c:IsCode(76812113,12206212) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c90219263.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c90219263.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c90219263.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,c90219263.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment