Commit 5d8d78b0 authored by Amiya's avatar Amiya

修复

parent 540734db
Pipeline #42624 passed with stages
in 4 minutes and 24 seconds
--キラーチューン・プレイリスト
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.filter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsFaceupEx() and c:IsSetCard(0x1d5) and c:IsType(TYPE_MONSTER)) then return false end
local te=c.killer_tune_be_material_effect
if not te then return c:IsAbleToHand() end
local tg=te:GetTarget()
return c:IsAbleToHand() or tg(e,tp,eg,ep,ev,re,r,rp,0,nil,c)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local cc=e:GetLabelObject()
if cc and cc.killer_tune_be_material_effect then
local ce=cc.killer_tune_be_material_effect
local tg=ce:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
else
return chkc:IsFaceupEx() and chkc:IsControler(tp) and chkc:IsSetCard(0x1d5) and chkc:IsType(TYPE_MONSTER) and chkc:IsAbleToHand()
end
end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
e:SetLabelObject(tc)
local te=tc.killer_tune_be_material_effect
if te then
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
Duel.ClearOperationInfo(0)
e:SetCategory(0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:IsRelateToChain() then
local te=tc.killer_tune_be_material_effect
if te then
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
if aux.NecroValleyFilter()(tc) then
Duel.BreakEffect()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetOriginalType()&TYPE_TUNER==0
end
--キラーチューン・ラウドネスウォー
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.Tuner(nil),1,99)
c:EnableReviveLimit()
--cannot be destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.target)
e1:SetValue(1)
c:RegisterEffect(e1)
--cannot be target
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.cpcon)
e3:SetTarget(s.cptg)
e3:SetOperation(s.cpop)
c:RegisterEffect(e3)
--double tuner
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(21142671)
c:RegisterEffect(e4)
end
function s.target(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_TUNER)
end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.pfilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x1d5) and c:IsAbleToRemoveAsCost()) then return false end
local te=c.killer_tune_be_material_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,nil,c)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
local te=tc.killer_tune_be_material_effect
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.ClearTargetCard()
e:SetLabelObject(te)
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
Duel.ClearOperationInfo(0)
e:SetCategory(0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
No preview for this file type
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