Commit b08a549f authored by mercury233's avatar mercury233

rm

parent c88bdc16
#The first line is used for comment
!setname 0x507a 焰圣骑士 焔聖騎士
!setname 0x1162 大钢琴之七音服 グランドレミコード
!setname 0x28f 防火 ファイアウォール
!setname 0x290 Gold Pride
......
--閃刀姫-アザレア
--Script by 奥克斯
function c100200228.initial_effect(c)
c:SetSPSummonOnce(100200228)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK),2,2)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.linklimit)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c100200228.destg1)
e1:SetOperation(c100200228.desop1)
c:RegisterEffect(e1)
--bp destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200228,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCountLimit(1)
e2:SetCost(c100200228.descost)
e2:SetTarget(c100200228.destg2)
e2:SetOperation(c100200228.desop2)
c:RegisterEffect(e2)
end
function c100200228.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100200228.desop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0
and c:IsRelateToEffect(e)
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)<=3 then
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function c100200228.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c100200228.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200228.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100200228.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100200228.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c100200228.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--竜魔導騎士ブラック・マジシャン
--Dark Magician the Magical Knight of Dragons
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddFusionProcCodeFun(c,46986414,s.mfilter,1,true,true)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.damcon)
e2:SetTarget(s.damtg)
e2:SetOperation(s.damop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.mfilter(c)
return c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON+RACE_WARRIOR)
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local rc=tc:GetReasonCard()
return #eg==1 and rc:IsControler(tp) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=eg:GetFirst()
if chk==0 then return bc:GetBaseAttack()>0 end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bc:GetBaseAttack())
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local bc=Duel.GetFirstTarget()
if bc:IsRelateToEffect(e) then
Duel.Damage(1-tp,bc:GetBaseAttack(),REASON_EFFECT)
end
end
function s.spfilter1(c,e,tp)
return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,c,e,tp)
end
function s.spfilter2(c,e,tp)
return c:IsCode(66889139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,g1:GetFirst(),e,tp)
g1:Merge(g2)
if #g1==2 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
--アサルト・シンクロン
--Script by 黑光
function c100294003.initial_effect(c)
--special summon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100294003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100294003)
e1:SetTarget(c100294003.sptg)
e1:SetOperation(c100294003.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100294003,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100294003+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100294003.target)
e2:SetOperation(c100294003.activate)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c100294003.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,700)
end
function c100294003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.Damage(tp,700,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c100294003.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
function c100294003.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c100294003.spfilter(c,e,tp)
return c:IsControler(tp) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100294003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c100294003.spfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg
if #eg==1 then
tg=eg:Clone()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tg=eg:FilterSelect(tp,c100294003.spfilter,1,1,nil,e,tp)
end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
end
function c100294003.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
local s,id,o=GetID()
function s.initial_effect(c)
aux.EnableExtraDeckSummonCountLimit()
--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:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.filter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.xyzfilter(c,mg)
return c:IsSetCard(0x48) and c:IsXyzSummonable(mg,2,2)
end
function s.gcheck(g,exg)
return exg:IsExists(Card.IsXyzSummonable,1,nil,g)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local exg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and exg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=mg:SelectSubGroup(tp,s.gcheck,false,2,2,exg)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,2,0,0)
end
function s.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.filter2,nil,e,tp)
if g:GetCount()==2 then
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
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=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
Duel.AdjustAll()
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)==2 then
local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
xyz:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1)
Duel.XyzSummon(tp,xyz,g)
end
end
end
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.checkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0
end
function s.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA) and c:GetFlagEffect(id)==0
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.cfilter,1,nil,tp) then
aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1
end
if eg:IsExists(s.cfilter,1,nil,1-tp) then
aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1
end
end
--覇王黒竜オッドアイズ・リベリオン・エクシーズ・ドラゴン
--Script by 奥克斯
function c100294005.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsXyzType,TYPE_PENDULUM),7,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--can not be xyz material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetCondition(c100294005.xyzcon)
e0:SetValue(1)
c:RegisterEffect(e0)
--pzone specialsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,100294005)
e1:SetTarget(c100294005.sptg)
e1:SetOperation(c100294005.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100294005,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100294005+100)
e2:SetCost(c100294005.descost)
e2:SetTarget(c100294005.destg)
e2:SetOperation(c100294005.desop)
c:RegisterEffect(e2)
--pendulum move
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c100294005.pencon)
e3:SetTarget(c100294005.pentg)
e3:SetOperation(c100294005.penop)
c:RegisterEffect(e3)
end
c100294005.pendulum_level=7
function c100294005.xyzcon(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c100294005.mfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanOverlay()
end
function c100294005.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 c100294005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if c:IsType(TYPE_XYZ)
and Duel.GetMatchingGroupCount(aux.NecroValleyFilter(c100294005.mfilter),tp,LOCATION_GRAVE,0,nil)>0
and Duel.SelectYesNo(tp,aux.Stringid(100294005,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100294005.mfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Overlay(c,g)
end
end
function c100294005.descost(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 c100294005.filter(c)
return c:IsFaceup() and c:IsAttackBelow(3000)
end
function c100294005.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c100294005.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100294005.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100294005.filter,tp,0,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100294005.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if #tg>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function c100294005.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c100294005.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c100294005.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--ヴァレット・コーダー
--Script by mercury233
--not fully implemented
local s,id,o=GetID()
function s.initial_effect(c)
--hand link
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetValue(s.matval1)
c:RegisterEffect(e1)
--link race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(id)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
--extra hand link
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK))
e3:SetCountLimit(1,id+o)
e3:SetValue(s.matval2)
c:RegisterEffect(e3)
end
function s.mfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_CYBERSE)
end
function s.exmfilter(c)
return c:IsLocation(LOCATION_HAND) and c:IsCode(id)
end
function s.matval1(e,lc,mg,c,tp)
if not lc:IsSetCard(0x101) then return false,nil end
return true,not mg or mg:IsExists(s.mfilter,1,nil) and not mg:IsExists(s.exmfilter,1,nil)
end
function s.exmatcheck(c,lc,tp)
if not c:IsLocation(LOCATION_HAND) then return false end
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
local related,valid=f(te,lc,nil,c,tp)
if related and not te:GetHandler():IsCode(id) then return false end
end
return true
end
function s.matval2(e,lc,mg,c,tp)
if not lc:IsSetCard(0x10f) then return false,nil end
return true,not mg or mg:IsContains(e:GetHandler()) and not mg:IsExists(s.exmatcheck,1,nil,lc,tp)
end
--紅恋の麗傑-ブラダマンテ
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetCost(s.eqcost)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(s.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
e2:SetLabelObject(e3)
end
function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.tgfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function s.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),tc)
end
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetEquipGroup():GetCount()==0 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return e:GetLabel()==1 and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and rp==1-tp
and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsControler(1-tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=e:GetLabelObject()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and bc:IsAbleToChangeControler() end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.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 bc=Duel.GetFirstTarget()
if bc:IsRelateToEffect(e) and bc:IsRelateToBattle() and bc:IsControler(1-tp)
and Duel.Equip(tp,bc,c,false) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
bc:RegisterEffect(e1)
end
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
--武装再生
--Script by 奥克斯
function c100297001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100297001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100297001.target)
e1:SetOperation(c100297001.activate)
c:RegisterEffect(e1)
end
function c100297001.filter(c,tp)
if not c:IsType(TYPE_EQUIP) then return false end
return c:IsSSetable(true)
or Duel.IsExistingMatchingCard(c100297001.eqfilter,tp,LOCATION_MZONE,0,1,nil,c,tp)
end
function c100297001.eqfilter(c,ec,tp)
if c:IsFacedown() then return false end
return not ec:IsForbidden() and ec:CheckUniqueOnField(tp) and ec:CheckEquipTarget(c)
end
function c100297001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then
return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup()
else
return chkc:IsLocation(LOCATION_GRAVE) and c100297001.filter(chkc,tp)
end
end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=ft-1 end
local b1=aux.dscon()
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
local b2=Duel.GetCurrentPhase()~=PHASE_DAMAGE and ft>0
and Duel.IsExistingTarget(c100297001.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,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(100297001,0),aux.Stringid(100297001,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(100297001,0))
else
op=Duel.SelectOption(tp,aux.Stringid(100297001,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_ATKCHANGE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil,tp)
else
e:SetCategory(CATEGORY_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100297001.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
end
function c100297001.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
else
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local b1=tc:IsSSetable(true) and ft>0
local b2=Duel.IsExistingMatchingCard(c100297001.eqfilter,tp,LOCATION_MZONE,0,1,nil,tc,tp)
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(100297001,2),aux.Stringid(100297001,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(100297001,2))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(100297001,3))+1
else return end
if op==0 then
Duel.SSet(tp,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tgc=Duel.SelectMatchingCard(tp,c100297001.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tc,tp):GetFirst()
if not tgc then return end
Duel.Equip(tp,tc,tgc)
end
end
end
--プレイング・マンティス
--Script by 奥克斯
function c100297002.initial_effect(c)
--token 1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1,100297002)
e1:SetCondition(c100297002.tkcon)
e1:SetTarget(c100297002.tktg)
e1:SetOperation(c100297002.tkop)
c:RegisterEffect(e1)
--return to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297002,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1)
e2:SetCondition(c100297002.thcon)
e2:SetCost(c100297002.thcost)
e2:SetTarget(c100297002.thtg)
e2:SetOperation(c100297002.thop)
c:RegisterEffect(e2)
--token 2
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100297002+100)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100297002.tktg)
e3:SetOperation(c100297002.tkop)
c:RegisterEffect(e3)
end
function c100297002.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c100297002.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100297102,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_INSECT,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c100297002.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,100297102,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_INSECT,ATTRIBUTE_WIND) then
local token=Duel.CreateToken(tp,100297102)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100297002.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c100297002.cfilter(c)
return c:IsAbleToGraveAsCost() and c:GetSequence()<5
end
function c100297002.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100297002.cfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100297002.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c100297002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c100297002.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsControler(1-tp) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--ガード・マンティス
--Script by 奥克斯
function c100297003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100297003)
e1:SetCost(c100297003.spcost)
e1:SetTarget(c100297003.sptg)
e1:SetOperation(c100297003.spop)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297003,1))
e2:SetCategory(CATEGORY_POSITION)
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,100297003+100)
e2:SetCondition(c100297003.poscon)
e2:SetTarget(c100297003.postg)
e2:SetOperation(c100297003.posop)
c:RegisterEffect(e2)
end
function c100297003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c100297003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100297003.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_DEFENSE)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c100297003.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
function c100297003.splimit(e,c)
return not c:IsRace(RACE_INSECT)
end
function c100297003.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c100297003.pfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
and c:IsCanChangePosition()
end
function c100297003.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100297003.pfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100297003.pfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c100297003.pfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c100297003.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
\ No newline at end of file
--金科玉条
--Script by 奥克斯
function c100297004.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:SetCountLimit(1,100297004+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100297004.target)
e1:SetOperation(c100297004.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c100297004.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c100297004.desop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c100297004.filter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c100297004.spfilter(c,e,tp,code1,code2)
return not c:IsCode(code1,code2) and c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100297004.gcheck(g,e,tp)
if #g~=2 then return false end
local a=g:GetFirst()
local d=g:GetNext()
return Duel.IsExistingMatchingCard(c100297004.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,a:GetCode(),d:GetCode())
end
function c100297004.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c100297004.filter,tp,LOCATION_DECK,0,nil)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=ft-1 end
if chk==0 then return ft>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:CheckSubGroup(c100297004.gcheck,2,2,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100297004.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c100297004.filter,tp,LOCATION_DECK,0,nil)
if ft>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:SelectSubGroup(tp,c100297004.gcheck,false,2,2,e,tp)
if not sg then return end
local ac=sg:GetFirst()
local bc=sg:GetNext()
if Duel.MoveToField(ac,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
and Duel.MoveToField(bc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
ac:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
bc:RegisterEffect(e2)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100297004.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp,ac:GetCode(),bc:GetCode())
if #rg==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=rg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100297004.eqlimit)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
end
function c100297004.eqlimit(e,c)
return e:GetOwner()==c
end
function c100297004.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c100297004.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--表裏一体
--Script by 奥克斯
function c100297005.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,100297005)
e1:SetTarget(c100297005.target)
e1:SetOperation(c100297005.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100297005+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100297005.tdtg)
e2:SetOperation(c100297005.tdop)
c:RegisterEffect(e2)
end
function c100297005.costfilter(c,e,tp)
return (c:IsControler(tp) or c:IsFaceup())
and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:GetOriginalLevel()>0
and Duel.IsExistingMatchingCard(c100297005.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,c,e,tp)
end
function c100297005.spfilter(c,tc,e,tp)
if c:GetOriginalAttribute()==tc:GetOriginalAttribute() then return end
local b1=c:IsLocation(LOCATION_HAND) and Duel.GetMZoneCount(tp,tc)>0
local b2=c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
and c:GetOriginalRace()==tc:GetOriginalRace()
and c:GetOriginalLevel()==tc:GetOriginalLevel()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2)
end
function c100297005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.CheckReleaseGroup(tp,c100297005.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,c100297005.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
end
function c100297005.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100297005.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100297005.tdfilter(c,e)
return c:IsCanBeEffectTarget(e) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToDeck()
end
function c100297005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100297005.tdfilter(chkc) end
local g=Duel.GetMatchingGroup(c100297005.tdfilter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:CheckSubGroup(aux.dabcheck,2,2) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,2,2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100297005.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==2 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--陰の光
--Script by 奥克斯
function c100297006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100297006)
e1:SetCost(c100297006.cost1)
e1:SetTarget(c100297006.target)
e1:SetOperation(c100297006.activate)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297006,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100297006+100)
e2:SetCondition(c100297006.sumcon)
e2:SetCost(c100297006.cost2)
e2:SetTarget(c100297006.sumtg)
e2:SetOperation(c100297006.sumop)
c:RegisterEffect(e2)
end
function c100297006.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100297006.filter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
and c:GetOriginalLevel()>0
and Duel.IsExistingMatchingCard(c100297006.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c100297006.spfilter(c,e,tp,tc)
local b1=c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return c:IsAttribute(ATTRIBUTE_LIGHT)
and c:GetOriginalRace()==tc:GetOriginalRace()
and c:GetOriginalLevel()==tc:GetOriginalLevel()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2)
end
function c100297006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100297006.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100297006.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100297006.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c100297006.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100297006.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100297006.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100297006)==0
end
function c100297006.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c100297006.cost1(e,tp,eg,ep,ev,re,r,rp,0) and c:IsAbleToRemove() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
c100297006.cost1(e,tp,eg,ep,ev,re,r,rp,1)
end
function c100297006.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
end
function c100297006.sumop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(100297006,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,100297006,RESET_PHASE+PHASE_END,0,1)
end
--エレメントの加護
--Script by 奥克斯
function c100297007.initial_effect(c)
aux.AddSetNameMonsterList(c,0x3008)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c100297007.condition)
e1:SetCost(c100297007.cost)
e1:SetTarget(c100297007.target)
e1:SetOperation(c100297007.activate)
c:RegisterEffect(e1)
--special summon
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:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,100297007)
e2:SetCondition(c100297007.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100297007.sptg)
e2:SetOperation(c100297007.spop)
c:RegisterEffect(e2)
end
function c100297007.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c100297007.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsAbleToRemoveAsCost()
end
function c100297007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100297007.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100297007.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
if Duel.Remove(g,0,REASON_COST+REASON_TEMPORARY)~=0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetOperation(c100297007.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c100297007.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c100297007.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 c100297007.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
function c100297007.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.AND(Card.IsFaceup,Card.IsCode),tp,LOCATION_ONFIELD,0,nil,74711057)
return #g>0
end
function c100297007.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0x3008) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c100297007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c100297007.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if chk==0 then return ft>0 and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c100297007.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100297007.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if ft==0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if #sg==0 then return end
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
--BF-下弦のサルンガ
--Script by 奥克斯
function c100297008.initial_effect(c)
--spsummon
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,100297008+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100297008.spcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,100297008+100+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c100297008.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100297008.destg)
e2:SetOperation(c100297008.desop)
c:RegisterEffect(e2)
end
function c100297008.filter(c)
return c:IsAttackAbove(2000) and c:IsFaceup()
end
function c100297008.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100297008.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c100297008.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_SYNCHRO)
end
function c100297008.descon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100297008.cfilter,tp,LOCATION_MZONE,0,nil)
return #g>0
end
function c100297008.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100297008.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
\ No newline at end of file
--薔薇占術師
--Script by 奥克斯
function c100297009.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297009,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,100297009)
e1:SetCost(c100297009.drcost)
e1:SetTarget(c100297009.drtg)
e1:SetOperation(c100297009.drop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297009,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100297009)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100297009.thtg)
e2:SetOperation(c100297009.thop)
c:RegisterEffect(e2)
end
function c100297009.drcost(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 c100297009.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 c100297009.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c100297009.thfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function c100297009.tgfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToGrave()
end
function c100297009.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100297009.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100297009.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100297009.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100297009.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsLocation(LOCATION_HAND) and tc:GetOriginalLevel()>=7
and Duel.IsExistingMatchingCard(c100297009.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100297009,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c100297009.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
--ファイナル・クロス
--Script by 奥克斯
function c100297010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100297010+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100297010.atkcon)
e1:SetTarget(c100297010.atktg)
e1:SetOperation(c100297010.atkop)
c:RegisterEffect(e1)
if not c100297010.global_check then
c100297010.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetCondition(c100297010.checkcon)
ge1:SetOperation(c100297010.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c100297010.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
end
function c100297010.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsType,nil,TYPE_SYNCHRO)
local tc=g:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetControler(),100297010)==0 then
Duel.RegisterFlagEffect(tc:GetControler(),100297010,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,100297010)>0 and Duel.GetFlagEffect(1,100297010)>0 then
break
end
tc=g:GetNext()
end
end
function c100297010.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,100297010)
return Duel.GetTurnPlayer()==tp and ct>0
end
function c100297010.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c100297010.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100297010.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100297010.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100297010.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsOriginalSetCard(0x66,0x1017,0xa3) then
Duel.SetTargetParam(1)
end
end
function c100297010.atkfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:GetAttack()>0
end
function c100297010.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if num>0 and Duel.IsExistingMatchingCard(c100297010.atkfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100297010,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local ag=Duel.SelectMatchingCard(tp,c100297010.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.HintSelection(ag)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(ag:GetFirst():GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
--ネコーン
--Script by 奥克斯
function c100297011.initial_effect(c)
--Search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100297011)
e1:SetTarget(c100297011.thtg1)
e1:SetOperation(c100297011.thop1)
c:RegisterEffect(e1)
--deck to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100297011+100)
e2:SetCondition(c100297011.thcon2)
e2:SetTarget(c100297011.thtg2)
e2:SetOperation(c100297011.thop2)
c:RegisterEffect(e2)
end
function c100297011.thfilter1(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c100297011.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_FZONE,0,nil)
if chk==0 then return #g==0 and Duel.IsExistingMatchingCard(c100297011.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100297011.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c100297011.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function c100297011.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100297011.thfilter2(c,tp)
return c:IsType(TYPE_FIELD) and Duel.IsExistingMatchingCard(c100297011.codefilter,tp,LOCATION_DECK,0,1,nil,c)
end
function c100297011.codefilter(c,tc)
return c:IsCode(tc:GetCode()) and c:IsAbleToHand()
end
function c100297011.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100297011.thfilter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100297011.thfilter2,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100297011.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100297011.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c100297011.codefilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--フォトン・ジャンパー
--Script by 奥克斯
function c100297012.initial_effect(c)
--attack announce specialsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297012,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:SetCountLimit(1,100297012)
e1:SetCondition(c100297012.spcon)
e1:SetTarget(c100297012.sptg)
e1:SetOperation(c100297012.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100297012+100)
e2:SetTarget(c100297012.thtg)
e2:SetOperation(c100297012.thop)
c:RegisterEffect(e2)
end
function c100297012.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c100297012.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 c100297012.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()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c100297012.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1)
Duel.RegisterEffect(e1,tp)
end
function c100297012.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
function c100297012.thfilter(c)
return c:IsSetCard(0x55,0x7b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100297012.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100297012.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100297012.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100297012.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 奥克斯
function c100297013.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:SetCondition(c100297013.sprcon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297013,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100297013)
e2:SetCost(c100297013.spcost)
e2:SetTarget(c100297013.sptg)
e2:SetOperation(c100297013.spop)
c:RegisterEffect(e2)
end
function c100297013.sprcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c100297013.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c100297013.spfilter(c,e,tp)
return c:IsCode(100297014) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100297013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100297013.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c100297013.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100297013.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ft=Duel.GetMZoneCount(tp)
local g=Duel.GetMatchingGroup(c100297013.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if ft<=0 or #g==0 then return end
if ft>3 then ft=3 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
for tc in aux.Next(sg) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(c100297013.xyzlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c100297013.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c100297013.xyzlimit(e,c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_DARK)
end
\ No newline at end of file
--ベビー・スパイダー
--Script by 奥克斯
function c100297014.initial_effect(c)
--level up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297014,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100297014)
e1:SetCost(c100297014.lvcost)
e1:SetTarget(c100297014.lvtg)
e1:SetOperation(c100297014.lvop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100297014+100)
e2:SetCost(c100297014.spcost)
e2:SetTarget(c100297014.sptg)
e2:SetOperation(c100297014.spop)
c:RegisterEffect(e2)
end
function c100297014.cfilter(c,tp)
local g=Duel.GetMatchingGroup(c100297014.lvfilter,tp,LOCATION_MZONE,0,c)
return c:IsLevelAbove(1) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsControler(tp) or c:IsFaceup())
and #g>0
end
function c100297014.lvfilter(c)
return c:IsLevelAbove(1) and c:IsFaceup() and c:IsCode(100297014)
end
function c100297014.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100297014.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100297014.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
e:SetLabel(g:GetFirst():GetPreviousLevelOnField())
end
function c100297014.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100297014.lvfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 end
end
function c100297014.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local val=e:GetLabel()
local g=Duel.GetMatchingGroup(c100297014.lvfilter,tp,LOCATION_MZONE,0,nil)
if val==0 or #g==0 then return end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c100297014.ovfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end
function c100297014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100297014.ovfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.Remove(c,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local tc=Duel.SelectMatchingCard(tp,c100297014.ovfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
tc:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100297014.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100297014.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100297014.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100297014.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100297014.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100297014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--DDDD超次元統皇ゼロ・パラドックス
--Script by 奥克斯
function c100297015.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--pendulum taking
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,100297015)
e1:SetTarget(c100297015.pltg)
e1:SetOperation(c100297015.plop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c100297015.spcon)
e2:SetTarget(c100297015.sptg)
e2:SetOperation(c100297015.spop)
c:RegisterEffect(e2)
--atk 6000
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100297015,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c100297015.atkcon)
e3:SetTarget(c100297015.atktg)
e3:SetOperation(c100297015.atkop)
c:RegisterEffect(e3)
end
function c100297015.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_PZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100297015.plop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0 then
c:CompleteProcedure()
if not tc:IsRelateToEffect(e) then return end
if not Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then return end
local fid=c:GetFieldID()
tc:RegisterFlagEffect(100297015,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCountLimit(1)
e1:SetLabel(fid,Duel.GetTurnCount())
e1:SetLabelObject(tc)
e1:SetCondition(c100297015.descon)
e1:SetOperation(c100297015.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c100297015.descon(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=ct and tc:GetFlagEffectLabel(100297015)==fid
end
function c100297015.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c100297015.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsFaceup()
end
function c100297015.spcon(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if #pg==0 then return false end
local pval=pg:GetSum(Card.GetLeftScale)
local g=eg:Filter(c100297015.cfilter,nil,tp)
local lv=g:GetSum(Card.GetLevel)
return #g>0 and lv>0 and pval>lv
end
function c100297015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100297015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 then return end
c:CompleteProcedure()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.SelectYesNo(tp,aux.Stringid(100297015,1)) then
Duel.BreakEffect()
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c100297015.lefilter(c,tp,re)
return re and re:IsActiveType(TYPE_SPELL) and c:IsReason(REASON_EFFECT)
and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x10af)
end
function c100297015.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100297015.lefilter,1,nil,tp,re) and not eg:IsContains(e:GetHandler())
end
function c100297015.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c100297015.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetAttack()~=6000 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(6000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--アディショナル・ミラー・レベル7
--Script by 奥克斯
function c100297016.initial_effect(c)
aux.EnableExtraDeckSummonCountLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c100297016.condition)
e1:SetCost(c100297016.cost)
e1:SetTarget(c100297016.target)
e1:SetOperation(c100297016.activate)
c:RegisterEffect(e1)
end
function c100297016.filter1(c,tp)
return c:IsFaceup() and c:IsLevel(7) and c:IsControler(tp)
end
function c100297016.filter2(c,e,tp)
return c:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c100297016.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp,c:GetCode())
end
function c100297016.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100297016.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100297016.filter1,1,nil,tp)
end
function c100297016.cfilter(c,tp)
return c:IsCode(100297016) and c:IsAbleToGraveAsCost()
end
function c100297016.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100297016.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100297016.cfilter,tp,LOCATION_DECK,0,2,2,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c100297016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:Filter(c100297016.filter1,nil,tp):Filter(c100297016.filter2,nil,e,tp)
if chkc then return mg:IsContains(chkc) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and #mg>0 end
local g=mg
if #mg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=mg:Select(tp,1,1,nil)
end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c100297016.activate(e,tp,eg,ep,ev,re,r,rp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100297016.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c100297016.checkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100297016.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,2,nil,e,tp,tc:GetCode())
if #g~=2 then return end
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local atk=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack)
if atk==0 then return end
Duel.BreakEffect()
Duel.Damage(tp,atk,REASON_EFFECT)
end
end
function c100297016.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0
end
function c100297016.ckfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c100297016.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c100297016.ckfilter,1,nil,tp) then
aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1
end
if eg:IsExists(c100297016.ckfilter,1,nil,1-tp) then
aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1
end
end
\ No newline at end of file
--シンクロ・ゾーン
--Script by 奥克斯
function c100297017.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--attack limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c100297017.tglimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297017,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100297017)
e2:SetCondition(c100297017.spcon)
e2:SetTarget(c100297017.sptg)
e2:SetOperation(c100297017.spop)
c:RegisterEffect(e2)
--synchro summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100297017,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1,100297017+100)
e3:SetCondition(c100297017.sccon)
e3:SetCost(c100297017.sccost)
e3:SetTarget(c100297017.sctg)
e3:SetOperation(c100297017.scop)
c:RegisterEffect(e3)
end
function c100297017.tglimit(e,c)
return not c:IsType(TYPE_SYNCHRO)
end
function c100297017.cfilter(c,tp)
return not c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
end
function c100297017.spfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100297017.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100297017.cfilter,1,nil,tp)
end
function c100297017.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:Filter(c100297017.cfilter,nil,tp):Filter(c100297017.spfilter,nil,e,tp)
if chkc then return mg:IsContains(chkc) end
if chk==0 then return #mg>0 end
local g=mg
if #mg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=mg:Select(tp,1,1,nil)
end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100297017.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c100297017.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c100297017.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) end
Duel.SendtoGrave(c,REASON_COST)
end
function c100297017.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100297017.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
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(),nil)
end
end
--武の賢者-アーカス
--Script by 奥克斯
function c100297018.initial_effect(c)
--SpecialSummon Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100297018)
e1:SetCost(c100297018.spcost)
e1:SetTarget(c100297018.sptg)
e1:SetOperation(c100297018.spop)
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_MZONE)
e2:SetCountLimit(1,100297018+100)
e2:SetTarget(c100297018.reptg)
e2:SetValue(c100297018.repval)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100297018,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100297018+200)
e3:SetCondition(c100297018.thcon)
e3:SetTarget(c100297018.thtg)
e3:SetOperation(c100297018.thop)
c:RegisterEffect(e3)
end
function c100297018.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c100297018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100297018.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c100297018.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c100297018.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 c100297018.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 c100297018.repfilter(c,tp)
return not c:IsReason(REASON_REPLACE) and c:IsType(TYPE_LINK)
and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100297018.rmfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c100297018.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100297018.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c100297018.rmfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100297018.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
function c100297018.repval(e,c)
return c100297018.repfilter(c,e:GetHandlerPlayer())
end
function c100297018.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100297018.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c100297018.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100297018.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100297018.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100297018.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100297018.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--智の賢者-ヒンメル
--Script by 奥克斯
function c100297019.initial_effect(c)
--SpecialSummon Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100297019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100297019)
e1:SetCost(c100297019.spcost)
e1:SetTarget(c100297019.sptg)
e1:SetOperation(c100297019.spop)
c:RegisterEffect(e1)
--Disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100297019,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100297019+100)
e2:SetCondition(c100297019.discon)
e2:SetCost(c100297019.discost)
e2:SetTarget(c100297019.distg)
e2:SetOperation(c100297019.disop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100297019,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100297019+200)
e3:SetCondition(c100297019.thcon)
e3:SetTarget(c100297019.thtg)
e3:SetOperation(c100297019.thop)
c:RegisterEffect(e3)
end
function c100297019.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c100297019.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100297019.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c100297019.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c100297019.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 c100297019.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 c100297019.tfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c100297019.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c: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 Duel.IsChainDisablable(ev) and rp==1-tp and tg and tg:IsExists(c100297019.tfilter,1,nil,tp)
end
function c100297019.rmfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function c100297019.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100297019.rmfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100297019.rmfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100297019.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c100297019.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c100297019.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100297019.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c100297019.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100297019.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100297019.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100297019.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100297019.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
--ナドゥム・リウムハート
--ナドゥム・リウムハート
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
......
--ナドゥム・ヒアレス
--ナドゥム・ヒアレス
--Script by 奥克斯
local s,id,o=GetID()
function s.initial_effect(c)
......
--ナドゥム・ミーク
--ナドゥム・ミーク
--Script by 奥克斯
local s,id,o=GetID()
function s.initial_effect(c)
......
--ヴィシヤス一アストラウド
--ヴィシャス=アストラウド
--Script by 奥克斯
local s,id,o=GetID()
function s.initial_effect(c)
......@@ -6,6 +6,12 @@ function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,56099748,s.matfilter,1,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
......
--ナドゥム・プライムハート
--ナドゥム・プライムハート
--Script by 奥克斯
local s,id,o=GetID()
function s.initial_effect(c)
......@@ -6,70 +6,77 @@ function s.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),nil,nil,aux.Tuner(nil),1,99)
c:EnableReviveLimit()
--synchro summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(s.regcon)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
--special summon
--mat check
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.matcheck)
c:RegisterEffect(e1)
--synchro summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.regcon)
e2:SetOperation(s.regop)
e2:SetLabelObject(e1)
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+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
function s.matcheck(e,c)
local c=e:GetHandler()
local g=c:GetMaterial()
if #g==0 then return end
local ct=g:FilterCount(Card.IsType,nil,TYPE_TUNER)
local check=0
if g:IsExists(s.filter,1,nil) then
check=1
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
--multi attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabel(ct)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetLabel(check)
e2:SetCondition(s.ckcon)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
e:SetLabel(ct,check)
end
function s.filter(c)
return c:IsType(TYPE_TUNER) and c:IsSetCard(0x291)
end
function s.atkval(e,c)
return e:GetLabel()-1
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.ckcon(e)
return e:GetLabel()>0
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct,check=e:GetLabelObject():GetLabel()
if ct>1 then
--multi attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct-1)
c:RegisterEffect(e1)
end
if check>0 then
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
return c:IsPreviousPosition(POS_FACEUP) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.spfilter(c,e,tp)
local b1=c:IsCode(56099748)
......@@ -88,6 +95,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if ft==0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if #sg==0 then return end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
end
--サイバネット・ロールバック
--Cynet Rollback
--coded by Lyris
local s,id,o=GetID()
......
--クシャトリラ·アクストラ
--クシャトリラアクストラ
--Script by 奥克斯
local s,id,o=GetID()
function s.initial_effect(c)
......
......@@ -60,7 +60,7 @@ function s.atkval(e,c)
end
function s.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and bit.band(c:GetPreviousTypeOnField(),TYPE_TUNER)~=0
and bit.band(c:GetPreviousTypeOnField(),TYPE_TUNER)~=0 and not c:IsType(TYPE_TOKEN)
and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function s.tgfilter(c,e,tp)
......@@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
end
......@@ -61,12 +61,11 @@ function c101112062.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c101112062.thcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local a,d=Duel.GetBattleMonster(tp)
if not a then return false end
return a and ec and a:IsSetCard(0x18d) and a:IsRelateToBattle()
local a=Duel.GetBattleMonster(tp)
return a and ec and a:IsSetCard(0x18d)
end
function c101112062.thfilter(c)
return not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED+STATUS_BATTLE_RESULT) and c:IsAbleToHand()
return c:IsAbleToHand()
end
function c101112062.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c101112062.thfilter(chkc) end
......@@ -97,7 +96,7 @@ function c101112062.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(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
......@@ -105,17 +104,7 @@ function c101112062.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
if Duel.SpecialSummonComplete()==0 then return end
if Duel.Equip(tp,c,tc) then
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101112062.eqlimit)
c:RegisterEffect(e1)
if c:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
end
end
function c101112062.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
--ソーンヴァレル・ドラゴン
function c29296344.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c29296344.mfilter,2,2,c29296344.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,29296344)
e1:SetCost(c29296344.cost)
e1:SetTarget(c29296344.target)
e1:SetOperation(c29296344.operation)
c:RegisterEffect(e1)
end
function c29296344.mfilter(c)
return c:IsLinkRace(RACE_DRAGON) or c:IsHasEffect(100294006)
end
function c29296344.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x102)
end
function c29296344.cost(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 c29296344.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c29296344.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29296344.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_LINK) then
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),tc:GetLink())
if ct>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c29296344.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(29296344,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c29296344.splimit)
Duel.RegisterEffect(e1,tp)
end
function c29296344.splimit(e,c,tp,sumtp,sumpos)
return c:IsType(TYPE_LINK) and c:IsLinkBelow(2) and c:IsLocation(LOCATION_EXTRA)
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