Commit 1403a18a authored by mercury233's avatar mercury233

rm

parent b95855b5
#created by ...
#main
100413001
100413002
100413003
100413004
100413005
100413006
100413010
100413011
100413012
100413013
100413014
100413015
100413016
100413017
100413018
100413019
100413020
100413021
100413023
100413024
100413025
100413026
100413027
100413028
100413029
100413030
100413031
100413032
100413034
100413035
100413036
100413037
100413038
100413039
#extra
100413007
100413008
100413009
100413022
100413033
!side
#The first line is used for comment #The first line is used for comment
!setname 0x132 斩机
!setname 0x133 半龙女仆
!setname 0x134 王战
!setname 0x235 @火灵天星 !setname 0x235 @火灵天星
--斬機シグマ
--Scripted by DJ
function c100413001.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,100413001)
e1:SetCondition(c100413001.spcon)
e1:SetTarget(c100413001.sptg)
e1:SetOperation(c100413001.spop)
c:RegisterEffect(e1)
--nontuner
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_NONTUNER)
e2:SetValue(c100413001.tnval)
c:RegisterEffect(e2)
end
function c100413001.cfilter(c)
return c:GetSequence()>=5
end
function c100413001.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c100413001.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100413001.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 c100413001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c100413001.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c100413001.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
function c100413001.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler()) and c:IsSetCard(0x132)
end
--斬機ナブラ
--Scripted by DJ
function c100413002.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413002)
e1:SetCost(c100413002.cost)
e1:SetTarget(c100413002.target)
e1:SetOperation(c100413002.operation)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100413002+100)
e2:SetCondition(c100413002.dacon)
e2:SetTarget(c100413002.datg)
e2:SetOperation(c100413002.daop)
c:RegisterEffect(e2)
end
function c100413002.costfilter(c,tp)
return c:IsRace(RACE_CYBERSE) and Duel.GetMZoneCount(tp,c,tp)>0
end
function c100413002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100413002.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100413002.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100413002.filter(c,e,tp)
return c:IsSetCard(0x132) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413002.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100413002.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100413002.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100413002.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c100413002.dafilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and c:GetSequence()>=5
end
function c100413002.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100413002.dafilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100413002.dafilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100413002.dafilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100413002.daop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
--斬機アディオン
--Scripted by DJ
function c100413003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100413003)
e1:SetTarget(c100413003.sptg)
e1:SetOperation(c100413003.spop)
c:RegisterEffect(e1)
end
function c100413003.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100413003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
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_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
tc:RegisterEffect(e1)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c100413003.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c100413003.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
--斬機サブトラ
--Scripted by DJ
function c100413004.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100413004)
e1:SetTarget(c100413004.sptg)
e1:SetOperation(c100413004.spop)
c:RegisterEffect(e1)
end
function c100413004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100413004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
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_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-1000)
tc:RegisterEffect(e1)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c100413004.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c100413004.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
--斬機マルチプライヤー
--Scripted by DJ
function c100413005.initial_effect(c)
--level
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100413005)
e1:SetTarget(c100413005.target)
e1:SetOperation(c100413005.operation)
c:RegisterEffect(e1)
--double attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100413005+100)
e2:SetTarget(c100413005.datg)
e2:SetOperation(c100413005.daop)
c:RegisterEffect(e2)
end
function c100413005.filter(c)
return c:IsFaceup() and c:IsLevel(4) and c:IsRace(RACE_CYBERSE)
end
function c100413005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100413005.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100413005.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100413005.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100413005.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c100413005.dafilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:GetSequence()>=5
end
function c100413005.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100413005.dafilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100413005.dafilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100413005.dafilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100413005.daop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(atk*2)
tc:RegisterEffect(e1)
end
end
--斬機ディヴィジョン
--Scripted by DJ
function c100413006.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100413006)
e1:SetCost(c100413006.cost)
e1:SetTarget(c100413006.target)
e1:SetOperation(c100413006.operation)
c:RegisterEffect(e1)
--half attack
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100413006+100)
e2:SetTarget(c100413006.atktg)
e2:SetOperation(c100413006.atkop)
c:RegisterEffect(e2)
end
function c100413006.costfilter(c,tp)
return c:IsRace(RACE_CYBERSE) and Duel.GetMZoneCount(tp,c,tp)>0 and c:GetSequence()>=5
end
function c100413006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100413006.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100413006.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100413006.filter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413006.fselect(g)
return g:GetClassCount(Card.GetLocation)==g:GetCount()
end
function c100413006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413006.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100413006.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100413006.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c100413006.fselect,false,1,ft)
if sg and sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100413006.atktg(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_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c100413006.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(atk/2)
tc:RegisterEffect(e1)
end
end
--炎斬機マグマ
--Scripted by DJ
function c100413007.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destory
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100413007)
e1:SetCondition(aux.bdcon)
e1:SetTarget(c100413007.destg)
e1:SetOperation(c100413007.desop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,100413007+100)
e2:SetCondition(c100413007.thcon)
e2:SetTarget(c100413007.thtg)
e2:SetOperation(c100413007.thop)
c:RegisterEffect(e2)
end
function c100413007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c100413007.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:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function c100413007.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
end
function c100413007.thfilter(c)
return c:IsSetCard(0x132) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100413007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413007.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100413007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100413007.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--炎斬機ファイナルシグマ
--Scripted by DJ
function c100413008.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100413008.imcon)
e1:SetValue(c100413008.efilter)
c:RegisterEffect(e1)
--double battle damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c100413008.damcon)
e2:SetOperation(c100413008.damop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,100413008)
e3:SetCondition(c100413008.thcon)
e3:SetTarget(c100413008.thtg)
e3:SetOperation(c100413008.thop)
c:RegisterEffect(e3)
end
function c100413008.imcon(e)
return e:GetHandler():GetSequence()>4
end
function c100413008.efilter(e,te)
return not te:GetOwner():IsSetCard(0x132)
end
function c100413008.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetSequence()>4
end
function c100413008.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
function c100413008.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
end
function c100413008.thfilter(c)
return c:IsSetCard(0x132) and c:IsAbleToHand()
end
function c100413008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100413008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100413008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100413008.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--塊斬機ラプラシアン
--Scripted by DJ
function c100413009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,3)
c:EnableReviveLimit()
--xyz effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413009,4))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100413009)
e1:SetCost(c100413009.ctcost)
e1:SetCondition(c100413009.effcon)
e1:SetTarget(c100413009.efftg)
e1:SetOperation(c100413009.effop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c100413009.desreptg)
e2:SetValue(c100413009.desrepval)
e2:SetOperation(c100413009.desrepop)
c:RegisterEffect(e2)
end
function c100413009.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c100413009.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rt=3
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) then rt=rt-1 end
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c100413009.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil)
local b2=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
local b3=Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return b1 or b2 or b3 end
local ct=e:GetLabel()
local sel=0
local off=0
repeat
local ops={}
local opval={}
off=1
if b1 then
ops[off]=aux.Stringid(100413009,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(100413009,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(100413009,2)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
sel=sel+1
b1=false
elseif opval[op]==2 then
sel=sel+2
b2=false
else
sel=sel+4
b3=false
end
ct=ct-1
until ct==0 or off<3
e:SetLabel(sel)
if bit.band(sel,1)~=0 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND)
end
if bit.band(sel,2)~=0 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end
if bit.band(sel,3)~=0 then
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
end
function c100413009.tgfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c100413009.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if bit.band(sel,1)~=0 then
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
if bit.band(sel,2)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
if bit.band(sel,4)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100413009.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c100413009.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsSetCard(0x132)
end
function c100413009.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c100413009.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c100413009.desrepval(e,c)
return c100413009.repfilter(c,e:GetHandlerPlayer())
end
function c100413009.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,1-tp,100413009)
end
--斬機方程式
--Scripted by DJ
function c100413010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100413010+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100413010.target)
e1:SetOperation(c100413010.activate)
c:RegisterEffect(e1)
end
function c100413010.filter(c,e,tp)
return c:IsSetCard(0x132) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100413010.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100413010.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100413010.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100413010.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
--斬機刀ナユタ
--Scripted by DJ
function c100413011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c100413011.target)
e1:SetOperation(c100413011.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100413011)
e2:SetCost(c100413011.atkcost)
e2:SetCondition(c100413011.atkcon)
e2:SetTarget(c100413011.atktg)
e2:SetOperation(c100413011.atkop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,100413011+100)
e3:SetCondition(c100413011.thcon)
e3:SetTarget(c100413011.thtg)
e3:SetOperation(c100413011.thop)
c:RegisterEffect(e3)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c100413011.eqlimit)
c:RegisterEffect(e4)
end
function c100413011.eqlimit(e,c)
return c:IsRace(RACE_CYBERSE)
end
function c100413011.filter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE)
end
function c100413011.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(c100413011.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100413011.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c100413011.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c100413011.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
return ec and tc and tc:IsFaceup() and tc:IsControler(1-tp)
end
function c100413011.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c100413011.atkfilter(c)
return c:IsSetCard(0x132) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost()
end
function c100413011.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c100413011.atkfilter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100413011.atkfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetAttack())
end
function c100413011.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ec=e:GetHandler():GetEquipTarget()
local atk=e:GetLabel()
if ec:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ec:RegisterEffect(e1)
end
end
function c100413011.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function c100413011.thfilter(c)
return c:IsSetCard(0x132) and not c:IsCode(100413011) and c:IsAbleToHand()
end
function c100413011.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100413011.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100413011.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100413011.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100413011.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--斬機超階乗
--Scripted by nekrozar
function c100413012.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,100413012+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100413012.target)
e1:SetOperation(c100413012.activate)
c:RegisterEffect(e1)
end
function c100413012.spfilter1(c,e,tp)
return c:IsSetCard(0x132) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e)
end
function c100413012.fselect1(g,tp)
return Duel.IsExistingMatchingCard(c100413012.synfilter,tp,LOCATION_EXTRA,0,1,nil,g) and aux.dncheck(g)
end
function c100413012.synfilter(c,g)
return c:IsSetCard(0x132) and c:IsSynchroSummonable(nil,g,g:GetCount()-1,g:GetCount()-1)
end
function c100413012.fselect2(g,tp)
return Duel.IsExistingMatchingCard(c100413012.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g) and aux.dncheck(g)
end
function c100413012.xyzfilter(c,g)
return c:IsSetCard(0x132) and c:IsXyzSummonable(g,g:GetCount(),g:GetCount())
end
function c100413012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
local g=Duel.GetMatchingGroup(c100413012.spfilter1,tp,LOCATION_GRAVE,0,nil,e,tp)
local b1=g:CheckSubGroup(c100413012.fselect1,1,ft,tp)
local b2=g:CheckSubGroup(c100413012.fselect2,1,ft,tp)
if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and (b1 or b2) end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(100413012,0),aux.Stringid(100413012,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(100413012,0))
else
op=Duel.SelectOption(tp,aux.Stringid(100413012,1))+1
end
e:SetLabel(op)
local sg=nil
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:SelectSubGroup(tp,c100413012.fselect1,false,1,ft,tp)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:SelectSubGroup(tp,c100413012.fselect2,false,1,ft,tp)
end
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0)
end
function c100413012.spfilter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413012.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c100413012.spfilter2,nil,e,tp)
local tc=g:GetFirst()
while tc 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_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
if op==0 then
local e3=e1:Clone()
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e3,true)
end
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
local og=Duel.GetOperatedGroup()
if op==0 then
local tg=Duel.GetMatchingGroup(c100413012.synfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==g:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og,og:GetCount()-1,og:GetCount()-1)
end
else
local tg=Duel.GetMatchingGroup(c100413012.xyzfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==g:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.XyzSummon(tp,rg:GetFirst(),og,og:GetCount(),og:GetCount())
end
end
end
--斬機帰納法
--Scripted by DJ
function c100413013.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c100413013.condition)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c100413013.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
--destory
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100413013)
e3:SetCondition(c100413013.descon)
e3:SetCost(c100413013.cost)
e3:SetTarget(c100413013.destg)
e3:SetOperation(c100413013.desop)
c:RegisterEffect(e3)
end
function c100413013.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c100413013.atktg(e,c)
return c:IsRace(RACE_CYBERSE)
end
function c100413013.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x132) and c:IsType(TYPE_MONSTER)
end
function c100413013.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100413013.cfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end
function c100413013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c100413013.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100413013.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
--ドラゴンメイド・ナサリー
--Scripted by nekrozar
function c100413014.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413014,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100413014)
e1:SetTarget(c100413014.sptg1)
e1:SetOperation(c100413014.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100413014,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100413114)
e3:SetTarget(c100413014.sptg2)
e3:SetOperation(c100413014.spop2)
c:RegisterEffect(e3)
end
function c100413014.spfilter1(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelBelow(4) and not c:IsCode(100413014) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100413014.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100413014.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100413014.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100413014.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100413014.spfilter2(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevel(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413014.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100413014.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100413014.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100413014.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--ドラゴンメイド・エルデ
--Scripted by nekrozar
function c100413015.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1,100413015)
e1:SetCost(c100413015.spcost1)
e1:SetTarget(c100413015.sptg1)
e1:SetOperation(c100413015.spop1)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100413015.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100413015,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100413115)
e3:SetTarget(c100413015.sptg2)
e3:SetOperation(c100413015.spop2)
c:RegisterEffect(e3)
end
function c100413015.spcost1(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 c100413015.spfilter1(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413015.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100413015.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100413015.spop1(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100413015.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100413015.indfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c100413015.indcon(e)
return Duel.IsExistingMatchingCard(c100413015.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c100413015.spfilter2(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413015.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100413015.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100413015.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100413015.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--ドラゴンメイド・ラドリー
--Scripted by nekrozar
function c100413016.initial_effect(c)
--deckdes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100413016,0))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100413016)
e1:SetTarget(c100413016.ddtg)
e1:SetOperation(c100413016.ddop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100413016,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100413116)
e3:SetTarget(c100413016.sptg)
e3:SetOperation(c100413016.spop)
c:RegisterEffect(e3)
end
function c100413016.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c100413016.ddop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
function c100413016.spfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevel(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100413016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100413016.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100413016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100413016.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment