Commit e28fb506 authored by mercury233's avatar mercury233

update scripts

parent 042feedf
...@@ -70,7 +70,8 @@ function c100200147.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,8 @@ function c100200147.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100200147.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c100200147.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
if not Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) then return end local tc=g:GetFirst()
if not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then return end
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--魔境のパラディオン
--Script by nekrozar
function c101005006.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101005006)
e1:SetCondition(c101005006.spcon)
e1:SetValue(c101005006.spval)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005006,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,101005106)
e2:SetCondition(c101005006.descon)
e2:SetTarget(c101005006.destg)
e2:SetOperation(c101005006.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101005006.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101005006.spval(e,c)
return 0,Duel.GetLinkedZone(c:GetControler())
end
function c101005006.descon(e,tp,eg,ep,ev,re,r,rp)
local lg1=Duel.GetLinkedGroup(tp,1,1)
local lg2=Duel.GetLinkedGroup(1-tp,1,1)
lg1:Merge(lg2)
return lg1 and lg1:IsContains(e:GetHandler())
end
function c101005006.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x217)
end
function c101005006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101005006.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c101005006.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c101005006.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--神樹のパラディオン
--Script by nekrozar
function c101005007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101005007)
e1:SetCondition(c101005007.spcon)
e1:SetValue(c101005007.spval)
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+LOCATION_GRAVE)
e2:SetCountLimit(1,101005107)
e2:SetTarget(c101005007.reptg)
e2:SetValue(c101005007.repval)
e2:SetOperation(c101005007.repop)
c:RegisterEffect(e2)
end
function c101005007.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101005007.spval(e,c)
return 0,Duel.GetLinkedZone(c:GetControler())
end
function c101005007.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0x217) and not c:IsReason(REASON_REPLACE)
end
function c101005007.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c101005007.repfilter,1,c,tp) and c:IsAbleToRemove() end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c101005007.repval(e,c)
return c101005007.repfilter(c,e:GetHandlerPlayer())
end
function c101005007.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
--百獣のパラディオン
--Script by nekrozar
function c101005008.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101005008)
e1:SetCondition(c101005008.spcon)
e1:SetValue(c101005008.spval)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005008,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101005108)
e2:SetCondition(c101005008.condition)
e2:SetTarget(c101005008.target)
e2:SetOperation(c101005008.operation)
c:RegisterEffect(e2)
end
function c101005008.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101005008.spval(e,c)
return 0,Duel.GetLinkedZone(c:GetControler())
end
function c101005008.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c101005008.filter(c)
return c:IsFaceup() and c:IsSetCard(0x217) and c:IsType(TYPE_LINK) and not c:IsHasEffect(EFFECT_PIERCE)
end
function c101005008.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c101005008.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005008.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101005008.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--星辰のパラディオン
--Script by nekrozar
function c101005009.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101005009)
e1:SetCondition(c101005009.spcon)
e1:SetValue(c101005009.spval)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005009,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,101005109)
e2:SetCondition(c101005009.thcon)
e2:SetTarget(c101005009.thtg)
e2:SetOperation(c101005009.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101005009.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101005009.spval(e,c)
return 0,Duel.GetLinkedZone(c:GetControler())
end
function c101005009.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg1=Duel.GetLinkedGroup(tp,1,1)
local lg2=Duel.GetLinkedGroup(1-tp,1,1)
lg1:Merge(lg2)
return lg1 and lg1:IsContains(e:GetHandler())
end
function c101005009.thfilter(c)
return c:IsSetCard(0x217) and not c:IsCode(101005009) and c:IsAbleToHand()
end
function c101005009.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005009.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005009.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101005009.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101005009.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 nekrozar
function c101005010.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101005010)
e1:SetCondition(c101005010.spcon)
e1:SetValue(c101005010.spval)
c:RegisterEffect(e1)
--double damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005010,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101005110)
e2:SetCondition(c101005010.dbcon)
e2:SetTarget(c101005010.dbtg)
e2:SetOperation(c101005010.dbop)
c:RegisterEffect(e2)
end
function c101005010.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101005010.spval(e,c)
return 0,Duel.GetLinkedZone(c:GetControler())
end
function c101005010.dbcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c101005010.dbfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:GetFlagEffect(101005010)==0
end
function c101005010.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101005010.dbfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005010.dbfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005010.dbfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101005010.dbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c101005010.ftarget)
e1:SetLabel(tc:GetFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
tc:RegisterFlagEffect(101005010,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c101005010.damcon)
e1:SetOperation(c101005010.damop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c101005010.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
function c101005010.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
end
function c101005010.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
...@@ -29,7 +29,7 @@ function c101005031.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function c101005031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==c and d and d:IsAbleToHand() end if chk==0 then return Duel.GetAttacker()==c and d and d:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,d,1,0,0)
end end
function c101005031.thop(e,tp,eg,ep,ev,re,r,rp) function c101005031.thop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
......
--マギアス・パラディオン
--Script by nekrozar
function c101005042.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c101005042.matfilter,1,1)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101005042.atkval)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101005042.antg)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005042,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,101005042)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101005042.thcon)
e3:SetTarget(c101005042.thtg)
e3:SetOperation(c101005042.thop)
c:RegisterEffect(e3)
end
function c101005042.matfilter(c)
return c:IsLinkSetCard(0x217) and not c:IsLinkCode(101005042)
end
function c101005042.atkval(e,c)
local g=e:GetHandler():GetLinkedGroup():Filter(Card.IsFaceup,nil)
return g:GetSum(Card.GetBaseAttack)
end
function c101005042.antg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c101005042.cfilter(c,lg)
return c:IsType(TYPE_EFFECT) and lg:IsContains(c)
end
function c101005042.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c101005042.cfilter,1,nil,lg)
end
function c101005042.thfilter(c)
return c:IsSetCard(0x217) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101005042.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005042.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101005042.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101005042.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 nekrozar
function c101005043.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c101005043.lcheck)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101005043.atkval)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101005043.antg)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005043,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,101005043)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101005043.thcon)
e3:SetTarget(c101005043.thtg)
e3:SetOperation(c101005043.thop)
c:RegisterEffect(e3)
end
function c101005043.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x217)
end
function c101005043.atkval(e,c)
local g=e:GetHandler():GetLinkedGroup():Filter(Card.IsFaceup,nil)
return g:GetSum(Card.GetBaseAttack)
end
function c101005043.antg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c101005043.cfilter(c,lg)
return c:IsType(TYPE_EFFECT) and lg:IsContains(c)
end
function c101005043.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c101005043.cfilter,1,nil,lg)
end
function c101005043.thfilter(c)
return c:IsSetCard(0x217) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101005043.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005043.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101005043.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101005043.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
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
--Script by nekrozar --Script by nekrozar
function c101005044.initial_effect(c) function c101005044.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c101005044.lcheck) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,c101005044.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--リユナイト・パラディオン
--Script by nekrozar
function c101005054.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(500)
e2:SetTarget(c101005054.atktg)
c:RegisterEffect(e2)
--extra attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005054,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c101005054.eatg)
e3:SetOperation(c101005054.eaop)
c:RegisterEffect(e3)
end
function c101005054.atktg(e,c)
return c:IsSetCard(0x217) and c:IsType(TYPE_LINK)
end
function c101005054.eafilter(c)
return c:IsFaceup() and c:IsSetCard(0x217) and c:IsType(TYPE_LINK)
end
function c101005054.eatg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005054.eafilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005054.eafilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101005054.eafilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101005054.eaop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c101005054.ftarget)
e2:SetLabel(tc:GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c101005054.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
--オーバード・パラディオン
--Script by nekrozar
function c101005055.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101005055+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101005055.target)
e1:SetOperation(c101005055.activate)
c:RegisterEffect(e1)
end
function c101005055.filter(c)
return c:IsFaceup() and c:IsSetCard(0x217)
end
function c101005055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005055.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005055.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005055.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c101005055.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c101005055.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c101005055.efilter(e,re)
return e:GetHandler()~=re:GetOwner()
end
--クルセイド・パラディオン
--Script by nekrozar
function c101005071.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101005071+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101005071.target)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c101005071.atcon)
e2:SetValue(c101005071.atlimit)
c:RegisterEffect(e2)
end
function c101005071.spfilter1(c,e,tp)
return (c:IsSetCard(0xfe) or c:IsSetCard(0x217)) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c101005071.spfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalCode())
end
function c101005071.spfilter2(c,e,tp,code)
return (c:IsSetCard(0xfe) or c:IsSetCard(0x217)) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005071.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.CheckReleaseGroup(tp,c101005071.spfilter1,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101005071,0)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(c101005071.activate)
local rg=Duel.SelectReleaseGroup(tp,c101005071.spfilter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetOriginalCode())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c101005071.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101005071.spfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,code)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101005071.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x217) and c:IsType(TYPE_LINK)
end
function c101005071.atcon(e)
return Duel.IsExistingMatchingCard(c101005071.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c101005071.atlimit(e,c)
return c:IsFacedown() or not c:IsType(TYPE_LINK)
end
...@@ -7,8 +7,6 @@ function c101005074.initial_effect(c) ...@@ -7,8 +7,6 @@ function c101005074.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101005074.eftg1)
e1:SetOperation(c101005074.efop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -16,33 +14,12 @@ function c101005074.initial_effect(c) ...@@ -16,33 +14,12 @@ function c101005074.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,101005074)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetLabel(2) e2:SetTarget(c101005074.eftg)
e2:SetTarget(c101005074.eftg2)
e2:SetOperation(c101005074.efop) e2:SetOperation(c101005074.efop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101005074.select(e,tp,b1,b2)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(101005074,1),aux.Stringid(101005074,2))+1
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(101005074,1))+1
else op=Duel.SelectOption(tp,aux.Stringid(101005074,2))+2 end
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101005074.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else
e:SetCategory(CATEGORY_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
e:GetHandler():RegisterFlagEffect(101005074,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c101005074.spfilter(c,e,tp) function c101005074.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -52,41 +29,37 @@ end ...@@ -52,41 +29,37 @@ end
function c101005074.eqfilter2(c,tc,tp) function c101005074.eqfilter2(c,tc,tp)
return c:IsSetCard(0x29) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0x29) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c101005074.eftg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005074.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
if e:GetLabel()==0 then return false if e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101005074.spfilter(chkc,e,tp)
elseif e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101005074.spfilter(chkc,e,tp)
else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005074.eqfilter1(chkc,tp) end else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005074.eqfilter1(chkc,tp) end
end end
if chk==0 then return true end
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101005074.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101005074.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,nil,tp) local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
if (not b1 and not b2) or not Duel.SelectYesNo(tp,aux.Stringid(101005074,0)) then if chk==0 then return b1 or b2 end
e:SetProperty(0) local op=0
e:SetCategory(0) if b1 and b2 then
e:SetLabel(0) op=Duel.SelectOption(tp,aux.Stringid(101005074,1),aux.Stringid(101005074,2))
return elseif b1 then
end op=Duel.SelectOption(tp,aux.Stringid(101005074,1))
e:SetProperty(EFFECT_FLAG_CARD_TARGET) else op=Duel.SelectOption(tp,aux.Stringid(101005074,2))+1 end
c101005074.select(e,tp,b1,b2) e:SetLabel(op)
end if op==0 then
function c101005074.eftg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
if chkc then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if e:GetLabel()==0 then return false local g=Duel.SelectTarget(tp,c101005074.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
elseif e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101005074.spfilter(chkc,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005074.eqfilter1(chkc,tp) end else
e:SetCategory(CATEGORY_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end end
local b1 = Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101005074.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2 = Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
if chk==0 then return e:GetHandler():GetFlagEffect(101005074)==0 and (b1 or b2) end
c101005074.select(e,tp,b1,b2)
end end
function c101005074.efop(e,tp,eg,ep,ev,re,r,rp) function c101005074.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then if e:GetLabel()==0 then
return
elseif e:GetLabel()==1 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -28,7 +28,7 @@ function c101005100.initial_effect(c) ...@@ -28,7 +28,7 @@ function c101005100.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101005100,1)) e4:SetDescription(aux.Stringid(101005100,1))
e4:SetCategory(CATEGORY_DRAW) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,101005152) e4:SetCountLimit(1,101005152)
......
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