Commit 977c8840 authored by 花桃白音's avatar 花桃白音

Duel summon with s/t bug#0004

parent 723b187f
No preview for this file type
...@@ -4,7 +4,7 @@ function c4204001.initial_effect(c) ...@@ -4,7 +4,7 @@ function c4204001.initial_effect(c)
aux.AddCodeList(c,4204000) aux.AddCodeList(c,4204000)
--change name --change name
aux.EnableChangeCode(c,4204000,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE) aux.EnableChangeCode(c,4204000,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE)
--summon with s/t --[[summon with s/t
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
...@@ -14,7 +14,7 @@ function c4204001.initial_effect(c) ...@@ -14,7 +14,7 @@ function c4204001.initial_effect(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and not c:IsStatus(STATUS_ACTIVATE_DISABLED) return c:IsFaceup() and c:IsType(TYPE_SPELL) and not c:IsStatus(STATUS_ACTIVATE_DISABLED)
end)) end))
e1:SetValue(POS_FACEUP_ATTACK) e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1) c:RegisterEffect(e1)]]
--disable spsummon --disable spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -52,31 +52,4 @@ function c4204001.initial_effect(c) ...@@ -52,31 +52,4 @@ function c4204001.initial_effect(c)
return not e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end) return not e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end)
e4:SetTargetRange(LOCATION_HAND,0) e4:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--set
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCost(function(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)
e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4204001.stfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4204001.stfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c4204001.stfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end)
e5:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end)
c:RegisterEffect(e5)
end end
function c4204001.stfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
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