Commit dd88ae12 authored by 聖園ミカ's avatar 聖園ミカ 🐟

54188

parent 05768e53
Pipeline #30906 canceled with stages
in 5 minutes and 17 seconds
--圣夜钟声·佐城雪美 --圣夜钟声·佐城雪美
function c81021005.initial_effect(c) local m=81021005
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,c81021005.matfilter,1,1) aux.AddLinkProcedure(c,cm.matfilter,1,1)
--Cost Change --Cost Change
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
...@@ -10,17 +13,17 @@ function c81021005.initial_effect(c) ...@@ -10,17 +13,17 @@ function c81021005.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetRange(LOCATION_MZONE) e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(1,0) e0:SetTargetRange(1,0)
e0:SetValue(c81021005.costchange) e0:SetValue(cm.costchange)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,81021005) e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c81021005.thcost) e1:SetCost(cm.thcost)
e1:SetTarget(c81021005.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(c81021005.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tograve --tograve
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -29,68 +32,68 @@ function c81021005.initial_effect(c) ...@@ -29,68 +32,68 @@ function c81021005.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_PAY_LPCOST) e2:SetCode(EVENT_PAY_LPCOST)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81021905) e2:SetCountLimit(1,m+900)
e2:SetCondition(c81021005.tgcon) e2:SetCondition(cm.tgcon)
e2:SetTarget(c81021005.tdtg) e2:SetTarget(cm.tdtg)
e2:SetOperation(c81021005.tdop) e2:SetOperation(cm.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c81021005.matfilter(c) function cm.matfilter(c)
return c:IsLinkType(TYPE_RITUAL) and c:IsLinkType(TYPE_PENDULUM) return c:IsLinkType(TYPE_RITUAL) and c:IsLinkType(TYPE_PENDULUM)
end end
function c81021005.atkfilter(c) function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x818) return c:IsFaceup() and c:IsSetCard(0x818)
end end
function c81021005.costchange(e,re,rp,val) function cm.costchange(e,re,rp,val)
local rc=re:GetHandler() local rc=re:GetHandler()
local dov=Duel.GetMatchingGroupCount(c81021005.atkfilter,0,LOCATION_MZONE,0,nil)*200 local dov=Duel.GetMatchingGroupCount(cm.atkfilter,0,LOCATION_MZONE,0,nil)*200
if re and re:GetHandler():IsSetCard(0x818) and re:IsHasType(0x7f0) then if re and re:GetHandler():IsSetCard(0x818) and re:IsActivated() then
return val-dov return math.max(0,val-dov)
else else
return val return val
end end
end end
function c81021005.costfilter(c) function cm.costfilter(c)
return bit.band(c:GetType(),0x81)==0x81 and c:IsFaceup() and c:IsAbleToDeckAsCost() return bit.band(c:GetType(),0x81)==0x81 and c:IsFaceup() and c:IsAbleToDeckAsCost()
end end
function c81021005.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81021005.costfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c81021005.costfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function c81021005.thfilter1(c,tp) function cm.thfilter1(c,tp)
return c:IsSetCard(0x818) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x818) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c81021005.thfilter2,tp,LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,c)
end end
function c81021005.thfilter2(c) function cm.thfilter2(c)
return c:IsSetCard(0x818) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0x818) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end end
function c81021005.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81021005.thfilter1,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end end
function c81021005.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c81021005.thfilter1,tp,LOCATION_DECK,0,1,1,nil,tp) local g1=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK,0,1,1,nil,tp)
if g1:GetCount()>0 then if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c81021005.thfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst()) local g2=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst())
g1:Merge(g2) g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
end end
end end
function c81021005.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
end end
function c81021005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end end
function c81021005.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
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