Commit 3608b4c6 authored by Nemo Ma's avatar Nemo Ma

upd

parent 5472a85e
......@@ -1693,6 +1693,13 @@
10122018 0
10122019 0
10122020 0
#「炼击帝」系列 - 煌武院悠阳
130006034 0
130006035 0
130006036 0
130006037 0
130006038 0
130006039 0
#Tears are now in Japari Park Again!
572850 1
4928565 0
......@@ -1709,6 +1716,22 @@
60362066 0
74920585 0
77103950 1
#230723
11451701 0
79029550 0
82204264 0
82209088 0
82209090 0
82209146 0
88880012 0
91010023 0
9911075 1
11799915 1
29063597 1
60002185 1
71401002 1
88888014 1
53796130 2
#230716
10133006 0
82209039 1
......@@ -1731,7 +1754,6 @@
82228630 0
98920550 0
33330413 1
82209090 1
88880249 1
#230625
10113025 0
......@@ -2050,7 +2072,6 @@
30008806 0
31400104 0
33701454 0
40009629 0
40010822 0
60000134 0
77770004 0
......@@ -2780,7 +2801,6 @@
188849 0
33720061 0
33720058 0
40010230 0
64800128 0
99988026 0
99988029 0
......@@ -6046,6 +6066,8 @@
82221014 0
90351999 0
#WILDEST
60002192 0
130006110 0
67200810 0
67200812 0
67200814 0
......@@ -8416,7 +8438,6 @@
40009599 1
40009617 1
40009621 1
40009629 0
40009631 1
40009665 1
40009669 0
......
No preview for this file type
--青刃哀歌 美树沙耶加
function c1000801.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,45672)
e1:SetCondition(c1000801.actcon)
e1:SetTarget(c1000801.actg)
e1:SetOperation(c1000801.actop)
c:RegisterEffect(e1)
--spcitalsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,45672)
e2:SetCondition(c1000801.spcon)
e2:SetTarget(c1000801.sptg)
e2:SetOperation(c1000801.spop)
c:RegisterEffect(e2)
--ritual material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
e3:SetValue(c1000801.mtval)
c:RegisterEffect(e3)
end
function c1000801.mtval(e,c)
return c:IsSetCard(0x3204)
end
function c1000801.actcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and ev>=800 and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c1000801.tgfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c1000801.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c1000801.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c1000801.actop(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:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(aux.Stringid(1000801,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(c1000801.desop)
c:RegisterEffect(e1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1000801.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c1000801.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c1000801.spfilter(c,tp)
return c:IsSetCard(0x3204) and c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_RITUAL
end
function c1000801.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1000801.spfilter,1,nil,tp)
end
function c1000801.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1000801.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(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1000801.atktg)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c1000801.atktg(e,c)
return c:IsSetCard(0x3204)
end
--正义伙伴 美树沙耶加
function c1000802.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_RITUAL),4,3)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000802,0))
e1:SetCategory(CATEGORY_ANNOUNCE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,7201)
e1:SetCost(c1000802.alicost)
e1:SetOperation(c1000802.aliop)
c:RegisterEffect(e1)
--equipquick
local e2=e1:Clone()
e1:SetDescription(aux.Stringid(1000802,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c1000802.alicon)
c:RegisterEffect(e2)
--gravespcial
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon)
e3:SetCost(c1000802.cost)
e3:SetTarget(c1000802.target)
e3:SetOperation(c1000802.activate)
c:RegisterEffect(e3)
end
function c1000802.alicon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3204)
end
function c1000802.alicost(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 c1000802.aliop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--upatk
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 e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c1000802.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c1000802.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c1000802.atktg(e,c)
return c:IsCode(1000802)
end
function c1000802.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),c,nil,2,REASON_COST)
end
function c1000802.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
end
function c1000802.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
if tc:IsSetCard(0x3204) then
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
Duel.Damage(tp,1000,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
end
\ No newline at end of file
--三段斩击 美树沙耶加
function c1000806.initial_effect(c)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7220)
e1:SetCost(c1000806.cost)
e1:SetOperation(c1000806.rmop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c1000806.dmcon)
e2:SetOperation(c1000806.regop)
c:RegisterEffect(e2)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e3)
--damage reduce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e4:SetCondition(c1000806.rdcon)
e4:SetOperation(c1000806.rdop)
c:RegisterEffect(e4)
end
function c1000806.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000806.rmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000806,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCountLimit(1)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1000806.indtg)
e1:SetValue(c1000806.indval)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1000806.indfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3204)
end
function c1000806.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c1000806.indfilter,1,nil,tp) end
return true
end
function c1000806.indval(e,c)
return c1000806.indfilter(c,e:GetHandlerPlayer())
end
function c1000806.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000806.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000806,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetTarget(c1000806.thtg)
e1:SetOperation(c1000806.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_BATTLE_DAMAGE)
c:RegisterEffect(e2)
end
function c1000806.filter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c1000806.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000806.filter,tp,LOCATION_DECK,0,3,nil) end
local g=Duel.GetMatchingGroup(c1000806.filter,tp,LOCATION_DECK,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500)
end
function c1000806.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1000806.filter,tp,LOCATION_DECK,0,3,3,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local ct=Duel.SendtoGrave(g,nil,2,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,1000806)
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
function c1000806.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==1-tp and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1000806.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,1000)
end
\ No newline at end of file
--剑刃风暴 美树沙耶加
function c1000807.initial_effect(c)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7221)
e1:SetCost(c1000807.cost)
e1:SetOperation(c1000807.rmop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1000807,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c1000807.dmcon)
e2:SetTarget(c1000807.sptg)
e2:SetOperation(c1000807.spop)
c:RegisterEffect(e2)
--def down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetTarget(c1000807.target)
e3:SetOperation(c1000807.operation)
c:RegisterEffect(e3)
end
function c1000807.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000807.rmop(e,tp,eg,ep,ev,re,r,rp)
--update_attck
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000807,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1000807.atktg)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--pierce
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c1000807.atktg)
Duel.RegisterEffect(e2,tp)
end
function c1000807.atktg(e,c)
return c:IsSetCard(0x3204)
end
function c1000807.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c1000807.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000807,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c1000807.val)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end
end
function c1000807.val(e,c)
if c:IsType(TYPE_XYZ) then return c:GetRank()*-100
else
return c:GetLevel()*-100
end
end
function c1000807.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000807.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x3204) and not c:IsCode(1000807)
end
function c1000807.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1000807.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 c1000807.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1000807.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
\ No newline at end of file
--闪光突击 美树沙耶加
function c1000808.initial_effect(c)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1000808)
e1:SetCost(c1000808.cost)
e1:SetTarget(c1000808.thtg)
e1:SetOperation(c1000808.thop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c1000808.dmcon)
e2:SetOperation(c1000808.spop)
c:RegisterEffect(e2)
--double
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c1000808.rdcon)
e3:SetOperation(c1000808.rdop)
c:RegisterEffect(e3)
end
function c1000808.rdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep==1-tp and tc:IsControler(tp) and tc:IsSetCard(0x3204)
end
function c1000808.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*1.5)
end
function c1000808.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000808.thfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and not c:IsCode(1000808) and c:IsAbleToHand()
end
function c1000808.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000808.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1000808.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1000808.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c1000808.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c1000808.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0x3204)
end
function c1000808.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000808.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000808,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetTarget(c1000808.thtg)
e1:SetOperation(c1000808.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_BATTLE_DAMAGE)
c:RegisterEffect(e2)
end
\ No newline at end of file
--无限剑制 美树沙耶加
function c1000809.initial_effect(c)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7223)
e1:SetCost(c1000809.cost)
e1:SetTarget(c1000809.thtg)
e1:SetOperation(c1000809.thop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c1000809.dmcon)
e2:SetTarget(c1000809.thttg)
e2:SetOperation(c1000809.thaop)
c:RegisterEffect(e2)
end
function c1000809.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000809.rfilter(c)
return c:IsSetCard(0x3204) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand()
end
function c1000809.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000809.rfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1000809.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1000809.rfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
function c1000809.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000809.qhfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1000809.hhfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c1000809.thttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c1000809.hhfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>=5 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c1000809.thaop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1000809.qhfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)<5 then return end
local rg=Group.CreateGroup()
Duel.BreakEffect()
for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
rg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
end
local ct=Duel.SendtoHand(rg,nil,2,REASON_EFFECT)
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
Duel.ConfirmCards(1-tp,rg)
end
\ No newline at end of file
--女妖旋律 美树沙耶加
function c1000810.initial_effect(c)
c:EnableReviveLimit()
--SPECIALSUMMON
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7224)
e1:SetCost(c1000810.cost)
e1:SetTarget(c1000810.target)
e1:SetOperation(c1000810.thaop)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e2:SetCondition(c1000810.condition)
e2:SetCost(c1000810.decost)
e2:SetTarget(c1000810.detarget)
e2:SetOperation(c1000810.deoperation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
--SPECIALSUMMON2
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,7224)
e5:SetCondition(aux.exccon)
e5:SetCost(c1000810.fucost)
e5:SetTarget(c1000810.futarget)
e5:SetOperation(c1000810.futhaop)
c:RegisterEffect(e5)
end
function c1000810.cosfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3204) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToDeckAsCost()
end
function c1000810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000810.filter(c,e,tp,m)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x3204) and not c:IsCode(1000810)
end
function c1000810.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1000810.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c1000810.thaop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1000810.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
function c1000810.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c1000810.decost(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 c1000810.detarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c1000810.deoperation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c1000810.fucost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1000810.futarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c1000810.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c1000810.futhaop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1000810.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
--痛觉消除 狂化美树沙耶加
function c1000811.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_RITUAL),4,3)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000811,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,7225)
e1:SetCost(c1000811.descost)
e1:SetTarget(c1000811.eqtg)
e1:SetOperation(c1000811.eqop)
c:RegisterEffect(e1)
--equipquick
local e2=e1:Clone()
e1:SetDescription(aux.Stringid(1000811,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c1000811.detcon)
c:RegisterEffect(e2)
--Destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c1000811.desreptg)
e3:SetOperation(c1000811.desrepop)
c:RegisterEffect(e3)
--gravespcial
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,7225)
e4:SetCondition(aux.exccon)
e4:SetCost(c1000811.tgcost)
e4:SetTarget(c1000811.tgtarget)
e4:SetOperation(c1000811.tgactivate)
c:RegisterEffect(e4)
--destroy2
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetCondition(c1000811.condition2)
e5:SetTarget(c1000811.target2)
e5:SetOperation(c1000811.operation2)
c:RegisterEffect(e5)
if not c1000811.global_check then
c1000811.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c1000811.check)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ATTACK_DISABLED)
ge2:SetOperation(c1000811.check2)
Duel.RegisterEffect(ge2,0)
end
end
function c1000811.check(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local ct=tc:GetFlagEffectLabel(1000811)
if ct then
tc:SetFlagEffectLabel(1000811,ct+1)
else
tc:RegisterFlagEffect(1000811,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,1)
end
end
function c1000811.check2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local ct=tc:GetFlagEffectLabel(1000811)
if ct then
tc:SetFlagEffectLabel(1000811,ct-1)
end
end
function c1000811.detcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3204)
end
function c1000811.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 c1000811.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToChangeControler()
end
function c1000811.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c1000811.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c1000811.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c1000811.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c1000811.eqlimit(e,c)
return e:GetOwner()==c
end
function c1000811.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown()
or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c1000811.eqlimit)
tc:RegisterEffect(e1)
local atk=tc:GetTextAttack()
if atk>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
end
function c1000811.repfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function c1000811.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=c:GetEquipGroup()
return not c:IsReason(REASON_REPLACE) and g:IsExists(c1000811.repfilter,1,nil)
end
if Duel.SelectYesNo(tp,aux.Stringid(10100013,0)) then
local g=c:GetEquipGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,c1000811.repfilter,1,1,nil)
Duel.SetTargetCard(sg)
return true
else return false end
end
function c1000811.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Destroy(tg,REASON_EFFECT+REASON_REPLACE)
end
function c1000811.afilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and not c:IsCode(1000811) and c:IsAbleToDeckOrExtraAsCost()
end
function c1000811.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost()
and Duel.IsExistingMatchingCard(c1000811.afilter,tp,LOCATION_GRAVE,0,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1000811.afilter,tp,LOCATION_GRAVE,0,4,4,nil)
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c1000811.bfilter(c,e,tp)
return c:IsCode(1000827) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c1000811.tgtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1000811.bfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000811.tgactivate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1000811.bfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
end
function c1000811.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() and not Duel.GetAttackTarget():IsAttackPos()
end
function c1000811.filter2(c)
local ct=c:GetFlagEffectLabel(1000811)
return (not ct or ct==0) and c:IsDestructable()
end
function c1000811.condition2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c1000811.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c1000811.filter2,tp,LOCATION_MZONE,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c1000811.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1000811.filter2,tp,LOCATION_MZONE,0,e:GetHandler())
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
--罗蕾莱的旋律
function c1000812.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000812,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,7226)
e1:SetTarget(c1000812.target)
e1:SetOperation(c1000812.activate)
c:RegisterEffect(e1)
--Activatequick
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(1000812,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1000812.spcon)
e2:SetCost(c1000812.cost)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,7226)
e3:SetCondition(aux.exccon)
e3:SetCost(c1000812.tgcost)
e3:SetTarget(c1000812.tgtarget)
e3:SetOperation(c1000812.tgactivate)
c:RegisterEffect(e3)
end
function c1000812.spcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1000812.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 c1000812.filter(c,e,tp,m)
if not c:IsSetCard(0x3204) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil)
end
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c1000812.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(c1000812.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c1000812.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1000812.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc:IsCode(21105106) then
tc:ritual_custom_operation(mg)
local mat=tc:GetMaterial()
Duel.ReleaseRitualMaterial(mat)
else
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000812,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c1000812.efilter)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c1000812.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c1000812.cfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function c1000812.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost()
and Duel.IsExistingMatchingCard(c1000812.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1000812.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c1000812.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) and c:IsAbleToGrave()
end
function c1000812.tgtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c1000812.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c1000812.filter2,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c1000812.filter2,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c1000812.tgactivate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--恋慕的人鱼魔女 美树沙耶加
function c1000813.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x5204),3,true)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,7227)
e1:SetCost(c1000813.thcost)
e1:SetTarget(c1000813.sptg)
e1:SetOperation(c1000813.spop)
c:RegisterEffect(e1)
--cannot be battle target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(c1000813.aatkcon)
e3:SetValue(c1000813.val)
e3:SetOwnerPlayer(tp)
c:RegisterEffect(e3)
--disable spsummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(c1000813.sumlimit)
c:RegisterEffect(e4)
end
function c1000813.cfilter(c)
return c:IsSetCard(0x3204) and c:IsAbleToGraveAsCost()
end
function c1000813.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000813.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1000813.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c1000813.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>=1
and Duel.IsPlayerCanSpecialSummonMonster(tp,1000804,0,0x4011,2000,2000,1,RACE_AQUA,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c1000813.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,1000804,0,0x4011,2000,2000,4,RACE_AQUA,ATTRIBUTE_WATER) then
local token1=Duel.CreateToken(tp,1000804)
Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP)
local token2=Duel.CreateToken(tp,1000804)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
function c1000813.val(e,re)
return c:IsType(TYPE_MONSTER) and e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c1000813.aatkcon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,1000804)
end
function c1000813.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--少女的谢幕
function c1000814.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000814,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,7228)
e1:SetTarget(c1000814.target)
e1:SetOperation(c1000814.activate)
c:RegisterEffect(e1)
--Activatequick
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(1000814,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1000814.spcon)
e2:SetCost(c1000814.cost)
c:RegisterEffect(e2)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,7228)
e3:SetCondition(c1000814.sppcon)
e3:SetCost(c1000814.fucost)
e3:SetTarget(c1000814.futarget)
e3:SetOperation(c1000814.fuactivate)
c:RegisterEffect(e3)
end
function c1000814.spcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1000814.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 c1000814.ritual_filter(c)
return c:IsSetCard(0x3204) and bit.band(c:GetType(),0x81)==0x81
end
function c1000814.filter(c,e,tp,m1,m2)
if not c:IsSetCard(0x3204) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil)
end
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c1000814.mfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c1000814.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c1000814.mfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(c1000814.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c1000814.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c1000814.mfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1000814.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2)
local tc=tg:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
local mg2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoDeck(mg2,nil,2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000814,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1200)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c1000814.sppcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end
function c1000814.fucost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1000814.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c1000814.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsCode(1000827) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1000814.futarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c1000814.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1000814.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000814.fuactivate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1000814.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c1000814.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1000814.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoDeck(mat1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
else
local cg1=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil)
and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ShuffleHand(tp)
end
end
end
\ No newline at end of file
--追想的变奏
function c1000815.initial_effect(c)
c:EnableCounterPermit(0x3b,LOCATION_SZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1000815)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1000815.cntcon)
e2:SetOperation(c1000815.addc)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3204))
e3:SetValue(c1000815.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--counter
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetTarget(c1000815.cottg)
e5:SetOperation(c1000815.cotop)
c:RegisterEffect(e5)
--avoid battle damage
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CHANGE_DAMAGE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(1,0)
e6:SetValue(0)
e6:SetCondition(c1000815.dcon)
c:RegisterEffect(e6)
--spcalsumm
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetCountLimit(1)
e7:SetCondition(c1000815.dcon)
e7:SetTarget(c1000815.target)
e7:SetOperation(c1000815.thop)
c:RegisterEffect(e7)
--
end
function c1000815.cnfilter(c,tp)
return c:GetOwner()==1-tp
end
function c1000815.cntcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1000815.cnfilter,1,nil,tp)
end
function c1000815.addc(e,c)
e:GetHandler():AddCounter(0x3b,1)
end
function c1000815.atkval(e,c)
return e:GetHandler():GetCounter(0x3b)*100
end
function c1000815.cottg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():GetCounter(0x3b)>0 end
local dam=e:GetHandler():GetCounter(0x3b)*100
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam)
end
function c1000815.cotop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c1000815.dcon(e)
return e:GetHandler():GetCounter(0x3b)>=10
end
function c1000815.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x3204) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1000815.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1000815.filter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1000815.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c1000815.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1000815.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000815,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(1000815,1))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(1000815,1))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
tc:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
end
end
\ No newline at end of file
--痛觉的止符
function c1000816.initial_effect(c)
c:EnableCounterPermit(0x3b,LOCATION_SZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1000816.cntcon)
e2:SetOperation(c1000816.addc)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3204))
e3:SetValue(c1000816.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--counter
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_DAMAGE)
e5:SetRange(LOCATION_SZONE)
e5:SetTarget(c1000816.cottg)
e5:SetOperation(c1000816.cotop)
c:RegisterEffect(e5)
--act in hand
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e6:SetCondition(c1000816.handcon)
c:RegisterEffect(e6)
end
function c1000816.cntcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and ev>=1000 and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c1000816.addc(e,c)
e:GetHandler():AddCounter(0x3b,1)
end
function c1000816.atkval(e,c)
return e:GetHandler():GetCounter(0x3b)*50
end
function c1000816.cottg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():GetCounter(0x3b)>0 end
local dam=e:GetHandler():GetCounter(0x3b)*100
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam)
end
function c1000816.cotop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c1000816.cfilter(c)
return c:IsSetCard(0x3204) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c1000816.handcon(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
return g:IsExists(c1000816.cfilter,1,nil)
end
\ No newline at end of file
--奇迹与魔法,都是存在的
function c1000817.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1000817.cost)
e1:SetTarget(c1000817.target)
e1:SetOperation(c1000817.activate)
c:RegisterEffect(e1)
end
function c1000817.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) 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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c1000817.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3204))
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
Duel.RegisterEffect(e3,tp)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c1000817.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c1000817.filter1(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1000817.filter2(c)
return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand()
end
function c1000817.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000817.filter1,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c1000817.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c1000817.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.GetMatchingGroup(c1000817.filter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c1000817.filter2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
end
\ No newline at end of file
--悲叹的罗蕾莱
function c1000819.initial_effect(c)
--FUSION
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,51105)
e1:SetTarget(c1000819.tg)
e1:SetOperation(c1000819.op)
c:RegisterEffect(e1)
end
function c1000819.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c1000819.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c1000819.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x5204) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1000819.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c1000819.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c1000819.filter0,nil)
local mg2=Duel.GetMatchingGroup(c1000819.filter3,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c1000819.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1000819.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000819.op(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c1000819.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c1000819.filter3,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c1000819.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1000819.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-2000)
end
end
\ No newline at end of file
--沙耶香的必杀之剑
function c1000820.initial_effect(c)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29019)
e1:SetCost(c1000820.cost)
e1:SetOperation(c1000820.rmop)
c:RegisterEffect(e1)
--battle
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1000820.val)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
e4:SetTarget(c1000820.sptg)
e4:SetOperation(c1000820.spop)
c:RegisterEffect(e4)
end
function c1000820.cfilter(c)
return c:IsSetCard(0x3204) and c:IsAbleToGrave()
end
function c1000820.cfilter3(c)
return c:IsFaceup() and c:IsDestructable()
end
function c1000820.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1000820.cfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(c1000820.cfilter3,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1000820.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c1000820.cfilter3,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c1000820.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)~=0 then
if tc:IsType(TYPE_XYZ) then
Duel.Damage(1-tp,tc:GetRank()*200,REASON_EFFECT)
else
Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT)
end
end
end
function c1000820.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000820.rmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000820,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c1000820.actcon)
e1:SetOperation(c1000820.actop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BE_BATTLE_TARGET)
Duel.RegisterEffect(e2,tp)
end
function c1000820.actcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
return tc and tc:IsControler(tp) and tc:IsSetCard(0x3204)
end
function c1000820.actop(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_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1000820.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3204)*300
end
\ No newline at end of file
--降阶魔法·朽绳之力
function c9950319.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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DESTROY)
e1:SetTarget(c9950319.target)
e1:SetOperation(c9950319.activate)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9950319,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9950319)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9950319.mattg)
e2:SetOperation(c9950319.matop)
c:RegisterEffect(e2)
end
function c9950319.filter1(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c9950319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()-1)
end
function c9950319.filter2(c,e,tp,mc,rk)
if c:GetOriginalCode()==6165656 and not mc:IsCode(48995978) then return false end
return c:IsRank(rk) and mc:IsCanBeXyzMaterial(c)
and c:IsSetCard(0x5ba2) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c9950319.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c9950319.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingTarget(c9950319.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9950319.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA)
end
function c9950319.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9950319.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()-1)
local sc=g:GetFirst()
if sc then
Duel.BreakEffect()
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c9950319.matfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5ba2) and c:IsType(TYPE_XYZ)
end
function c9950319.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9950319.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9950319.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9950319.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c9950319.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
\ No newline at end of file
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