Commit 28102c4d authored by mercury233's avatar mercury233

update scripts

parent ca5d2fbd
#The first line is used for comment #The first line is used for comment
!victory 0x1f 「守护神 艾克佐迪亚」效果胜利
!setname 0x226 咒眼 !setname 0x226 咒眼
!setname 0x227 无限启动 !setname 0x227 无限启动
!setname 0x228 魔女术 !setname 0x228 魔女术
--HSRカイドレイク
--
--Scripted By-FW空鸽
function c100200158.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c100200158.sfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--link success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200158,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100200158)
e1:SetCondition(c100200158.con)
e1:SetTarget(c100200158.target)
e1:SetOperation(c100200158.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200158,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100200158+100)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c100200158.thcon)
e2:SetTarget(c100200158.thtg)
e2:SetOperation(c100200158.thop)
c:RegisterEffect(e2)
end
function c100200158.sfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_WIND)
end
function c100200158.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100200158.negfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c100200158.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local b2=Duel.GetMatchingGroup(c100200158.negfilter,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #b1>0 or #b2>0 end
local off=1
local ops={}
local opval={}
if #b1>0 then
ops[off]=aux.Stringid(100200158,1)
opval[off]=0
off=off+1
end
if #b2>0 then
ops[off]=aux.Stringid(100200158,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(100200158,sel+1))
if sel==0 then
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,b1,b1:GetCount(),0,0)
else
e:SetCategory(CATEGORY_DISABLE)
end
end
function c100200158.operation(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
local c=e:GetHandler()
local b1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local b2=Duel.GetMatchingGroup(c100200158.negfilter,tp,0,LOCATION_ONFIELD,nil)
if sel==0 then
Duel.Destroy(b1,REASON_EFFECT)
else
local nc=b2:GetFirst()
while nc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e2)
if nc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e3)
end
nc=b2:GetNext()
end
end
end
function c100200158.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100200158.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp
end
function c100200158.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200158.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100200158.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200158.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--青眼の究極亜竜
--
--Scripted By-FW空鸽
function c100236100.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeRep(c,89631139,3,true,true)
--cannot be target/effect indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100236100,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c100236100.descost)
e3:SetTarget(c100236100.destg)
e3:SetOperation(c100236100.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c100236100.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c100236100.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c100236100.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local ct=1
if e:GetLabel()==1 and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) then ct=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100236100.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
function c100236100.spfilter(c,code)
local code1,code2=c:GetOriginalCodeRule()
return code1==code or code2==code
end
function c100236100.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(c100236100.spfilter,1,nil,38517737) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--マジシャン・オブ・ブラックカオス・MAX
--
--Scripted By-FW空鸽
function c100236101.initial_effect(c)
c:EnableReviveLimit()
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100236101,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100236101)
e1:SetCost(c100236101.cost)
e1:SetOperation(c100236101.sumsuc)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100236101,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100236101+100)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c100236101.thtg)
e2:SetOperation(c100236101.thop)
c:RegisterEffect(e2)
end
function c100236101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c100236101.sumsuc(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(c100236101.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100236101.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c100236101.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c100236101.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100236101.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100236101.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100236101.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100236101.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--守護神エクゾディア
--
--Scripted By-FW空鸽
function c100236102.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100236102,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c100236102.ttcon)
e1:SetOperation(c100236102.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE+1)
c:RegisterEffect(e1)
--tribute check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100236102.valcheck)
c:RegisterEffect(e2)
--give atk effect only when summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SUMMON_COST)
e3:SetOperation(c100236102.facechk)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--win
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100236102,1))
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCondition(c100236102.wincon)
e4:SetOperation(c100236102.winop)
c:RegisterEffect(e4)
end
function c100236102.ttcon(e,c,minc)
if c==nil then return true end
return minc<=5 and Duel.CheckTribute(c,5)
end
function c100236102.ttop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,5,5)
c:SetMaterial(g)
Duel.Release(g, REASON_SUMMON+REASON_MATERIAL)
end
function c100236102.valcheck(e,c)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
local def=0
while tc do
atk=atk+math.max(tc:GetTextAttack(),0)
def=def+math.max(tc:GetTextDefense(),0)
tc=g:GetNext()
end
if e:GetLabel()==1 then
e:SetLabel(0)
--atk continuous effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--def continuous effect
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
end
end
function c100236102.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
end
function c100236102.winfilter(e,c)
return c:GetOwner()~=e:GetHandlerPlayer() and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c100236102.wincon(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 not c:IsRelateToBattle() or c:IsFacedown() then return false end
return c:GetSummonType()==SUMMON_TYPE_ADVANCE+1 and c100236102.winfilter(e,tc)
end
function c100236102.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_GUARDIAN_GOD_EXODIA=0x1f
Duel.Win(tp,WIN_REASON_GUARDIAN_GOD_EXODIA)
end
\ No newline at end of file
--守護神官マナ
--
--Scripted By-FW空鸽
function c100236103.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100236103,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,100236103)
e1:SetCondition(c100236103.spcon)
e1:SetTarget(c100236103.sptg)
e1:SetOperation(c100236103.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c100236103.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c100236103.spcon2)
e3:SetTarget(c100236103.sptg2)
e3:SetOperation(c100236103.spop2)
c:RegisterEffect(e3)
end
function c100236103.tfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_SPELLCASTER)
end
function c100236103.spcon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:GetCount()==1 and g:IsExists(c100236103.tfilter,1,nil,tp)
end
function c100236103.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 c100236103.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100236103.indtg(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(7)
end
function c100236103.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c100236103.spfilter(c,e,tp)
return c:IsCode(38033121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100236103.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100236103.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 c100236103.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(c100236103.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)
end
end
\ No newline at end of file
--真紅眼の亜黒竜
--
--Scripted By-FW空鸽
function c100236104.initial_effect(c)
c:EnableReviveLimit()
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100236104)
e1:SetCondition(c100236104.hspcon)
e1:SetOperation(c100236104.hspop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(c100236104.spcon)
e2:SetTarget(c100236104.sptg)
e2:SetOperation(c100236104.spop)
c:RegisterEffect(e2)
end
function c100236104.hspfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3b) and Duel.GetMZoneCount(tp,c)>0
end
function c100236104.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c100236104.hspfilter,1,c,tp)
end
function c100236104.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=Duel.SelectReleaseGroupEx(tp,c100236104.hspfilter,1,1,c,tp)
Duel.Release(sg,REASON_COST)
end
function c100236104.spcon(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 c100236104.filter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and not c:IsCode(100236104)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100236104.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100236104.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100236104.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100236104.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100236104.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if tc:IsCode(74677422) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
--ネオ・カイザー・グライダー
--
--Scripted By-FW空鸽
function c100236105.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100236105,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100236105)
e1:SetCost(c100236105.spcost)
e1:SetTarget(c100236105.sptg)
e1:SetOperation(c100236105.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100236105,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100236105+100)
e2:SetTarget(c100236105.atktg)
e2:SetOperation(c100236105.atkop)
c:RegisterEffect(e2)
end
function c100236105.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c100236105.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c100236105.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c100236105.cfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
end
function c100236105.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100236105.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100236105.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100236105.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100236105.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100236105.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 c100236105.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 c100236105.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(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--Sin Cross
--
--Tanaka Kotoha
function c100236106.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100236106.target)
e1:SetOperation(c100236106.activate)
c:RegisterEffect(e1)
end
function c100236106.filter(c,e,tp)
return c:IsSetCard(0x23) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c100236106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100236106.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100236106.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100236106.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100236106.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) then
local c=e:GetHandler()
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)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(100236106,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:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c100236106.rmcon1)
e3:SetOperation(c100236106.rmop1)
Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonComplete()
end
end
function c100236106.rmcon1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(100236106)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c100236106.rmop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetLabelObject(),POS_FACEUP,REASON_EFFECT)
end
--方界降世
--
--Script by Djeeta
function c100236114.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100236114,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c100236114.condition)
e1:SetTarget(c100236114.target)
e1:SetOperation(c100236114.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100236114,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100236114)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c100236114.spcon)
e2:SetTarget(c100236114.sptg)
e2:SetOperation(c100236114.spop)
c:RegisterEffect(e2)
end
function c100236114.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c100236114.filter(c,e,tp)
return c:IsCode(15610297) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100236114.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100236114.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100236114.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,c100236114.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc)
end
end
end
function c100236114.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-2000
end
function c100236114.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100236114.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then
e:SetLabel(1)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c100236114.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100236114.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
local i=0
while tc and i<2 and e:GetLabel()==1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and ft>0
and Duel.IsExistingMatchingCard(c100236114.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(100236114,2)) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,c100236114.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
tc=g:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
end
Duel.SpecialSummonComplete()
end
--方界縁起
--
--Script by Djeeta
function c100236118.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100236118,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,100236118)
e1:SetTarget(c100236118.target)
e1:SetOperation(c100236118.activate)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100236218)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100236118.damtg)
e2:SetOperation(c100236118.damop)
c:RegisterEffect(e2)
end
function c100236118.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsType(TYPE_MONSTER)
end
function c100236118.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100236118.ctfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c100236118.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(c100236118.ctfilter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100236118,1))
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1038,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetCondition(c100236118.condition)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e2)
end
end
function c100236118.condition(e)
return e:GetHandler():GetCounter(0x1038)>0
end
function c100236118.damfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsType(TYPE_MONSTER)
end
function c100236118.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100236118.damfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100236118.damfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100236118.damfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100236118.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD_P)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c100236118.regop)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetOperation(c100236118.damop2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+EVENT_PHASE+PHASE_END)
e2:SetLabelObject(e1)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(100236118,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c100236118.regop(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst()
local ct=c:GetCounter(0x1038)
e:SetLabel(ct)
end
function c100236118.damop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
local ct=e:GetLabelObject():GetLabel()
if c:GetFlagEffect(100236118)>0 and ct>0 then
local atk=tc:GetBaseAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--創聖魔導王 エンディミオン
--
--Script by Djeeta
function c100308001.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableCounterPermit(0x1)
--destory
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100308001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,100308001)
e1:SetCost(c100308001.descost)
e1:SetTarget(c100308001.destg)
e1:SetOperation(c100308001.desop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100308001,1))
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:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100308001.negcon)
e2:SetTarget(c100308001.negtg)
e2:SetOperation(c100308001.negop)
c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100308001.ctcon)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c100308001.ctcon)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD_P)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetOperation(c100308001.regop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_BATTLE_DESTROYED)
e6:SetCondition(c100308001.thcon)
e6:SetTarget(c100308001.thtg)
e6:SetOperation(c100308001.thop)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end
function c100308001.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,6,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,6,REASON_COST)
end
function c100308001.cfilter(c)
return c:IsCanAddCounter(0x1,1)
end
function c100308001.destg(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)
and Duel.IsExistingMatchingCard(c100308001.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100308001.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ct=Duel.GetMatchingGroupCount(c100308001.cfilter,tp,LOCATION_ONFIELD,0,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(g)
local oc=Duel.Destroy(g,REASON_EFFECT)
if oc==0 then return end
Duel.BreakEffect()
e:GetHandler():AddCounter(0x1,oc)
end
end
function c100308001.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c100308001.thfilter(c)
return c:GetCounter(0x1)>0
end
function c100308001.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100308001.thfilter,tp,LOCATION_ONFIELD,0,1,nil) 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 c100308001.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c100308001.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=g:GetFirst()
local count=tc:GetCounter(0x1)
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and Duel.NegateActivation(ev)~=0
and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
if c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(100308001,2)) then
Duel.BreakEffect()
c:AddCounter(0x1,count)
end
end
end
function c100308001.ctcon(e)
return e:GetHandler():GetCounter(0x1)>0
end
function c100308001.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1)
e:SetLabel(ct)
end
function c100308001.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
return ct>0 and c:IsReason(REASON_BATTLE)
end
function c100308001.thfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function c100308001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100308001.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100308001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100308001.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--魔導耀士 デイブレイカー
--
--Scripted By-FW空鸽
function c100308040.initial_effect(c)
c:EnableCounterPermit(0x1)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SPELLCASTER),2,2)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100308040,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c100308040.ctcon1)
e1:SetTarget(c100308040.cttg)
e1:SetOperation(c100308040.ctop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100308040,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100308040)
e2:SetCondition(c100308040.ctcon2)
e2:SetTarget(c100308040.cttg)
e2:SetOperation(c100308040.ctop)
c:RegisterEffect(e2)
--attackup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c100308040.atkval)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100308040,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100308040+100)
e4:SetCost(c100308040.descost)
e4:SetTarget(c100308040.destg)
e4:SetOperation(c100308040.desop)
c:RegisterEffect(e4)
end
function c100308040.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100308040.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1)
end
function c100308040.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1,1)
end
end
function c100308040.cfilter(c,g)
return c:IsFaceup() and g:IsContains(c) and c:IsRace(RACE_SPELLCASTER)
end
function c100308040.ctcon2(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(c100308040.cfilter,1,nil,lg)
end
function c100308040.atkval(e,c)
return c:GetCounter(0x1)*300
end
function c100308040.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1,2,REASON_COST)
end
function c100308040.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100308040.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
--無限起動リヴァーストーム
--
--Scripted by Justfish
function c100412007.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100412007,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100412007)
e1:SetCost(c100412007.cost)
e1:SetTarget(c100412007.target)
e1:SetOperation(c100412007.operation)
c:RegisterEffect(e1)
--Attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100412007,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c100412007.xyzcon)
e2:SetTarget(c100412007.xyztg)
e2:SetOperation(c100412007.xyzop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100412007+100)
e3:SetCost(c100412007.spcost)
e3:SetTarget(c100412007.sptg)
e3:SetOperation(c100412007.spop)
c:RegisterEffect(e3)
end
function c100412007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100412007.filter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c100412007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100412007.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100412007.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100412007,2))
local g=Duel.SelectMatchingCard(tp,c100412007.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c100412007.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE)
end
function c100412007.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
end
function c100412007.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc)
end
end
function c100412007.cfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_MACHINE) and Duel.GetMZoneCount(tp,c)>0
end
function c100412007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100412007.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100412007.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100412007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100412007.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_DEFENSE)
end
end
--ウィッチクラフト・シュミッタ
--
--Scripted By-FW空鸽
function c100412016.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100412016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100412016)
e1:SetCondition(c100412016.spcon)
e1:SetCost(c100412016.spcost)
e1:SetTarget(c100412016.sptg)
e1:SetOperation(c100412016.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100412016,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100412016+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100412016.tgtg)
e2:SetOperation(c100412016.tgop)
c:RegisterEffect(e2)
end
function c100412016.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100412016.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c100412016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100412016.costfilter,tp,LOCATION_HAND,0,1,nil)
and e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
Duel.DiscardHand(tp,c100412016.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c100412016.spfilter(c,e,tp)
return c:IsSetCard(0x228) and not c:IsCode(100412016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100412016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100412016.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100412016.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,c100412016.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100412016.tgfilter(c)
return c:IsSetCard(0x228) and not c:IsCode(100412016) and c:IsAbleToGrave()
end
function c100412016.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100412016.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100412016.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100412016.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--呪眼の死徒 メドゥサ
--
--Scripted by Maru
function c100412028.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100412028,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c100412028.target)
e1:SetOperation(c100412028.operation)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100412028,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,100412028)
e2:SetCost(c100412028.rmcost)
e2:SetCondition(c100412028.rmcon)
e2:SetTarget(c100412028.rmtg)
e2:SetOperation(c100412028.rmop)
c:RegisterEffect(e2)
--banish self
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100412028,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c100412028.rmcon1)
e3:SetTarget(c100412028.rmtg1)
e3:SetOperation(c100412028.rmop1)
c:RegisterEffect(e3)
end
function c100412028.filter(c)
return c:IsSetCard(0x226) and not c:IsCode(100412028) and c:IsAbleToHand()
end
function c100412028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100412028.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100412028.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100412028.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100412028.operation(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 c100412028.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(100412028,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1)
end
function c100412028.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c100412028.rmcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:GetCount()>0 and eg:IsExists(Card.IsCode,1,nil,100412032)
end
function c100412028.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()~=tp and chkc:GetLocation()==LOCATION_GRAVE and c100412028.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100412028.rmfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c100412028.rmfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c100412028.rmop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c100412028.rmcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100412028)>0
end
function c100412028.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function c100412028.rmop1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--呪眼の眷属 バジリウス
--
--Scripted by Maru
function c100412030.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100412030)
e1:SetCondition(c100412030.spcon)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100412130,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100412130)
e2:SetTarget(c100412030.target)
e2:SetOperation(c100412030.operation)
c:RegisterEffect(e2)
end
function c100412030.filter(c)
return c:IsFaceup() and c:IsSetCard(0x226)
end
function c100412030.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100412030.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c100412030.tgfilter(c)
return c:IsSetCard(0x226) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c100412030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100412030.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100412030.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100412030.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
...@@ -25,8 +25,8 @@ function c100412032.initial_effect(c) ...@@ -25,8 +25,8 @@ function c100412032.initial_effect(c)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(aux.indoval) e4:SetValue(aux.indoval)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e3:Clone() local e5=e3:Clone()
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......
--呪眼領閾-パレイドリア-
--
--Scripted by Maru
function c100412033.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,100412033+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c100412033.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100412033.rfcon)
e2:SetTarget(c100412033.rftg)
e2:SetOperation(c100412033.rfop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c100412033.thcon)
e3:SetTarget(c100412033.thtg)
e3:SetOperation(c100412033.thop)
c:RegisterEffect(e3)
end
function c100412033.filter(c)
return c:IsSetCard(0x226) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100412033.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c100412033.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100412033,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c100412033.filter1(c)
return c:IsCode(100412032) and c:IsFaceup()
end
function c100412033.rfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100412033.filter1,tp,LOCATION_SZONE,0,1,nil)
end
function c100412033.rftg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk==0 then return d~=nil and d:IsControler(tp) and d:IsSetCard(0x226) end
end
function c100412033.rfop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetOperation(c100412033.damop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
end
function c100412033.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(1-ep,ev,false)
end
function c100412033.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_FZONE)
end
function c100412033.thfilter(c)
return c:IsSetCard(0x226) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100412033.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100412033.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100412033.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100412033.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100412033.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--喚忌の呪眼
--
--Scripted by Maru
function c100412034.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100412034+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100412034.sptg)
e1:SetOperation(c100412034.spop)
c:RegisterEffect(e1)
end
function c100412034.spfilter(c,e,tp)
return c:IsSetCard(0x226) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100412034.filter(c)
return c:IsCode(100412032) and c:IsFaceup()
end
function c100412034.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local loc=LOCATION_HAND+LOCATION_GRAVE
if Duel.IsExistingMatchingCard(c100412034.filter,tp,LOCATION_SZONE,0,1,nil) then
loc=loc+LOCATION_DECK
end
return Duel.IsExistingMatchingCard(c100412034.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c100412034.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local loc=LOCATION_HAND+LOCATION_GRAVE
if Duel.IsExistingMatchingCard(c100412034.filter,tp,LOCATION_SZONE,0,1,nil) then
loc=loc+LOCATION_DECK
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100412034.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--惨禍の呪眼
--
--Scripted by Maru
function c100412035.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100412035+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100412035.condition)
e1:SetTarget(c100412035.target)
e1:SetOperation(c100412035.activate)
c:RegisterEffect(e1)
end
function c100412035.filter(c)
return c:IsSetCard(0x226) and c:IsFaceup()
end
function c100412035.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100412035.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c100412035.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100412035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c100412035.desfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c100412035.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100412035.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100412035.filter1(c)
return c:IsCode(100412032) and c:IsFaceup()
end
function c100412035.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.IsExistingMatchingCard(c100412035.filter1,tp,LOCATION_SZONE,0,1,nil) then
Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)
else
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--静冠の呪眼
--
--Scripted by Maru
function c100412036.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100412036+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100412036.target)
e1:SetOperation(c100412036.activate)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetCode(EVENT_BATTLED)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c100412036.rmtg)
e2:SetOperation(c100412036.rmop)
c:RegisterEffect(e2)
--recycle
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c100412036.tgcon)
e3:SetTarget(c100412036.tgtg)
e3:SetOperation(c100412036.tgop)
c:RegisterEffect(e3)
end
function c100412036.costfilter(c)
return c:IsSetCard(0x226) and c:IsAbleToRemoveAsCost()
end
function c100412036.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.IsExistingMatchingCard(c100412036.costfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(100412036,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100412036.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetLabel(0)
end
end
function c100412036.activate(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():IsRelateToEffect(e) and e:GetLabel()==1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c100412036.check(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x226) and c:GetEquipGroup() and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,100412032)
end
function c100412036.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if chk==0 then return d~=nil and c100412036.check(a,tp) end
e:SetLabelObject(d)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,d,1,0,0)
end
function c100412036.rmop(e,tp,eg,ep,ev,re,r,rp)
local d=e:GetLabelObject()
if e:GetHandler():IsRelateToEffect(e) and d:IsRelateToBattle() then
Duel.Remove(d,POS_FACEUP,REASON_EFFECT)
end
end
function c100412036.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE)
end
function c100412036.filter(c)
return c:IsFaceup() and c:IsSetCard(0x226)
end
function c100412036.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c100412036.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100412036.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100412036,1))
local g=Duel.SelectTarget(tp,c100412036.filter,tp,LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c100412036.tgop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
--妬絶の呪眼
--
--Scripted by Maru
function c100412037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100412037+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100412037.condition)
e1:SetTarget(c100412037.target)
e1:SetOperation(c100412037.activate)
c:RegisterEffect(e1)
end
function c100412037.filter(c)
return c:IsSetCard(0x226) and c:IsFaceup()
end
function c100412037.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100412037.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c100412037.filter1(c)
return c:IsFaceup() and c:IsCode(100412032)
end
function c100412037.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local tg=1
if Duel.IsExistingMatchingCard(c100412037.filter1,tp,LOCATION_SZONE,0,1,nil) then
tg=2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,tg,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
end
function c100412037.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.SendtoHand(sg,nil,REASON_EFFECT)
end
--死配の呪眼
--
--Scripted by Maru
function c100412038.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c100412038.target)
e1:SetOperation(c100412038.activate)
c:RegisterEffect(e1)
--target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetLabelObject(e1)
e2:SetCondition(c100412038.tgcon)
e2:SetOperation(c100412038.tgop)
c:RegisterEffect(e2)
--setcode
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetValue(0x226)
e3:SetTarget(c100412038.distg)
c:RegisterEffect(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c100412038.descon)
e4:SetOperation(c100412038.desop)
c:RegisterEffect(e4)
end
function c100412038.filter(c,atk)
return c:IsSetCard(0x226) and c:IsFaceup() and c:GetAttack()>atk
end
function c100412038.filter1(c,tp)
return c:IsAttackPos() and c:IsControler(1-tp)
and Duel.IsExistingMatchingCard(c100412038.filter,tp,LOCATION_MZONE,0,1,nil,c:GetAttack())
end
function c100412038.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c100412038.filter1(chkc,tp) end
if chk==0 then return eg:IsExists(c100412038.filter1,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tc=eg:FilterSelect(tp,c100412038.filter1,1,1,nil,tp):GetFirst()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0)
end
function c100412038.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
end
end
function c100412038.tgcon(e,tp,eg,ep,ev,re,r,rp)
return re==e:GetLabelObject()
end
function c100412038.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):GetFirst()
if c:IsRelateToEffect(re) and tc:IsFaceup() and tc:IsRelateToEffect(re) then
c:SetCardTarget(tc)
end
end
function c100412038.filter2(c)
return c:IsCode(100412032) and c:IsFaceup()
end
function c100412038.distg(e,c)
return e:GetHandler():IsHasCardTarget(c) and Duel.IsExistingMatchingCard(c100412038.filter2,tp,LOCATION_SZONE,0,1,nil)
end
function c100412038.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end
local tc=c:GetFirstCardTarget()
return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY)
end
function c100412038.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--断罪の呪眼
--
--Scripted by Maru
function c100412039.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,100412039+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100412039.condition)
e1:SetTarget(c100412039.target)
e1:SetOperation(c100412039.activate)
c:RegisterEffect(e1)
end
function c100412039.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x226)
end
function c100412039.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c100412039.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100412039.filter(c)
return c:IsFaceup() and c:IsCode(100412032)
end
function c100412039.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.IsExistingMatchingCard(c100412039.filter,tp,LOCATION_SZONE,0,1,nil) then
e:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
else
e:SetProperty(0)
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 c100412039.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--無限起動ゴライアス
--
--Scripted by Justfish
function c100412100.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100412100.matfilter,1,1)
c:EnableReviveLimit()
--Attach
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100412100,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,100412100)
e1:SetCondition(c100412100.xyzcon)
e1:SetTarget(c100412100.xyztg)
e1:SetOperation(c100412100.xyzop)
c:RegisterEffect(e1)
--get effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetCondition(c100412100.condition)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c100412100.matfilter(c)
return c:IsLinkSetCard(0x227) and not c:IsLinkType(TYPE_LINK)
end
function c100412100.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c100412100.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c100412100.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100412100.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100412100.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100412100.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100412100.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and c:IsRelateToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c100412100.condition(e)
return e:GetHandler():GetOriginalRace()==RACE_MACHINE
end
--魔 --魔
-- --
--By Tanaka Kotoha --By Tanaka Kotoha
function c101008064.initial_effect(c) function c101008064.initial_effect(c)
...@@ -19,9 +19,10 @@ function c101008064.initial_effect(c) ...@@ -19,9 +19,10 @@ function c101008064.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTargetRange(0,1)
e3:SetCondition(c101008064.actcona) e3:SetCondition(c101008064.actcona)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--activate limit --activate limit
...@@ -36,9 +37,10 @@ function c101008064.initial_effect(c) ...@@ -36,9 +37,10 @@ function c101008064.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e5:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_FZONE) e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e5:SetTargetRange(1,0)
e5:SetCondition(c101008064.actconb) e5:SetCondition(c101008064.actconb)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--destroy --destroy
...@@ -63,7 +65,7 @@ function c101008064.actconb(e) ...@@ -63,7 +65,7 @@ function c101008064.actconb(e)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end end
function c101008064.actlimit(e,re,tp) function c101008064.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER)
end end
function c101008064.descon(e,tp,eg,ep,ev,re,r,rp) function c101008064.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
......
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