Commit 3498fff8 authored by wind2009's avatar wind2009

Fix キラーチューン・プレイリスト

parent 6cf342be
Pipeline #40094 passed with stages
in 2 minutes and 8 seconds
...@@ -41,14 +41,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,14 +41,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
local e1=Effect.CreateEffect(e:GetHandler()) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
e1:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(s.splimit) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_TUNER) return not c:IsType(TYPE_TUNER)
......
...@@ -4,9 +4,11 @@ function s.initial_effect(c) ...@@ -4,9 +4,11 @@ function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(2,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
...@@ -30,24 +32,36 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,24 +32,36 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 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() local tc=g:GetFirst()
Duel.ClearTargetCard() Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
e:SetLabelObject(tc)
local te=tc.killer_tune_be_material_effect local te=tc.killer_tune_be_material_effect
e:SetLabelObject(te)
local tg=te:GetTarget() local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
Duel.ClearOperationInfo(0) Duel.ClearOperationInfo(0)
g:GetFirst():CreateEffectRelation(e) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local tc=e:GetLabelObject()
if not te then return end if tc and tc:IsRelateToChain() then
local tc=te:GetHandler() local te=tc.killer_tune_be_material_effect
if not tc:IsRelateToChain() then return end local op=te:GetOperation()
e:SetLabelObject(te:GetLabelObject()) if op then op(e,tp,eg,ep,ev,re,r,rp) end
local op=te:GetOperation() if aux.NecroValleyFilter()(tc) then
if op then op(e,tp,eg,ep,ev,re,r,rp) end Duel.BreakEffect()
if aux.NecroValleyFilter()(tc) then Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.SendtoHand(tc,nil,REASON_EFFECT) end
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 not c:IsType(TYPE_TUNER)
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