Commit 14c74b93 authored by mercury233's avatar mercury233

new cards SR05

parent 4aba9415
--パーシアスの神域
function c15449853.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e2:SetValue(56433456)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
e3:SetValue(300)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--cannot be target/indestructable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e5:SetTarget(aux.TargetBoolFunction(Card.IsPosition,POS_FACEDOWN))
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e6)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_SZONE)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCountLimit(1)
e7:SetTarget(c15449853.tdtg)
e7:SetOperation(c15449853.tdop)
c:RegisterEffect(e7)
end
function c15449853.tdfilter(c,e)
return (c:IsRace(RACE_FAIRY) or c:IsType(TYPE_COUNTER)) and c:IsAbleToDeck() and (not e or c:IsCanBeEffectTarget(e))
end
function c15449853.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c15449853.tdfilter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:GetClassCount(Card.GetCode)>=3 end
local tg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
tg:Merge(sg)
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
until tg:GetCount()==3
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,tg:GetCount(),0,0)
end
function c15449853.tdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()==0 then return end
local ct=Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
if ct>0 then Duel.SortDecktop(tp,tp,ct) end
end
--天空聖騎士アークパーシアス
function c16261341.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetOperation(c16261341.chop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetOperation(c16261341.chop2)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16261341,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetCode(EVENT_CHAIN_END)
e3:SetCondition(c16261341.spcon1)
e3:SetCost(c16261341.spcost)
e3:SetTarget(c16261341.sptg)
e3:SetOperation(c16261341.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_CHAIN_NEGATED)
e4:SetCondition(c16261341.spcon2)
c:RegisterEffect(e4)
e1:SetLabelObject(e3)
e2:SetLabelObject(e3)
--pierce
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
--search
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(16261341,1))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_BATTLE_DAMAGE)
e6:SetCondition(c16261341.thcon)
e6:SetTarget(c16261341.thtg)
e6:SetOperation(c16261341.thop)
c:RegisterEffect(e6)
end
function c16261341.chop1(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(0)
end
function c16261341.chop2(e,tp,eg,ep,ev,re,r,rp)
if rp~=tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_COUNTER) then return end
e:GetLabelObject():SetLabel(1)
end
function c16261341.spcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetLabel()==1
end
function c16261341.spcon2(e,tp,eg,ep,ev,re,r,rp,chk)
local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER)
return dp==tp
end
function c16261341.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c16261341.mzfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5
end
function c16261341.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(c16261341.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if chk==0 then return ft>-2 and rg:GetCount()>1 and (ft>0 or rg:IsExists(c16261341.mzfilter,ct,nil)) end
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=rg:Select(tp,2,2,nil)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=rg:FilterSelect(tp,c16261341.mzfilter,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=rg:FilterSelect(tp,c16261341.mzfilter,2,2,nil)
end
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c16261341.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16261341.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16261341.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c16261341.thfilter(c)
return (c:IsSetCard(0x10a) or c:IsType(TYPE_COUNTER)) and c:IsAbleToHand()
end
function c16261341.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16261341.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16261341.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16261341.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
--イーバ
function c40177746.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40177746,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,40177746)
e1:SetTarget(c40177746.thtg)
e1:SetOperation(c40177746.thop)
c:RegisterEffect(e1)
end
function c40177746.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
end
function c40177746.filter(c)
return c:IsLevelBelow(2) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(40177746) and c:IsAbleToHand()
end
function c40177746.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40177746.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c40177746.filter,tp,LOCATION_DECK,0,1,nil) end
local dg=Duel.GetMatchingGroup(c40177746.filter,tp,LOCATION_DECK,0,nil)
local ct=math.min(2,dg:GetClassCount(Card.GetCode))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c40177746.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,ct,e:GetHandler())
local rc=Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetTargetParam(rc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,rc,tp,LOCATION_DECK)
end
function c40177746.thop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(c40177746.filter,tp,LOCATION_DECK,0,nil)
local ct=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if dg:GetClassCount(Card.GetCode)==0 or dg:GetClassCount(Card.GetCode)<ct then return end
local g=Group.CreateGroup()
for i=1,ct do
local tc=dg:Select(tp,1,1,nil):GetFirst()
g:AddCard(tc)
dg:Remove(Card.IsCode,nil,tc:GetCode())
end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
--輪廻のパーシアス
function c42444868.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c42444868.condition)
e1:SetCost(c42444868.cost)
e1:SetTarget(c42444868.target)
e1:SetOperation(c42444868.activate)
c:RegisterEffect(e1)
end
function c42444868.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c42444868.cfilter(c)
return c:IsType(TYPE_COUNTER) and not c:IsPublic()
end
function c42444868.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c42444868.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler())
and (Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler())
or Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE))
and Duel.CheckLPCost(tp,1000) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c42444868.cfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=cg:GetFirst()
Duel.ConfirmCards(1-tp,cg)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_HAND)
e2:SetOperation(c42444868.clearop)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
e2:SetLabel(Duel.GetCurrentChain())
e2:SetLabelObject(e1)
tc:RegisterEffect(e2)
if not Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
Duel.PayLPCost(tp,1000)
end
function c42444868.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():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
end
function c42444868.spfilter(c,e,tp)
return c:IsSetCard(0x10a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c42444868.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
local g=Duel.GetMatchingGroup(c42444868.spfilter,tp,loc,0,nil,e,tp)
if loc~=0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(42444868,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c42444868.clearop(e,tp,eg,ep,ev,re,r,rp)
if ev~=e:GetLabel() then return end
e:GetLabelObject():Reset()
e:Reset()
end
--天空賢者ミネルヴァ
function c53666449.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c53666449.atkcon)
e1:SetOperation(c53666449.atkop)
c:RegisterEffect(e1)
end
function c53666449.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_COUNTER)
end
function c53666449.thfilter(c,code)
return c:IsType(TYPE_COUNTER) and not c:IsCode(code) and c:IsAbleToHand()
end
function c53666449.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local rc=re:GetHandler()
if not rc then return end
local code=rc:GetCode()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c53666449.thfilter),tp,LOCATION_GRAVE,0,nil,code)
if Duel.IsEnvironment(56433456) and g:GetCount()>0 then
Duel.Hint(HINT_CARD,0,53666449)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--力天使ヴァルキリア
function c89055154.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c89055154.chop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c89055154.chop2)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(89055154,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,89055154)
e3:SetCondition(c89055154.thcon)
e3:SetTarget(c89055154.thtg)
e3:SetOperation(c89055154.thop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c89055154.chop1(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(0)
end
function c89055154.chop2(e,tp,eg,ep,ev,re,r,rp)
local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER)
if dp==tp then
e:SetLabel(1)
end
end
function c89055154.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()~=0
end
function c89055154.thfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c89055154.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c89055154.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c89055154.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
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