Commit 1519d984 authored by wyykak's avatar wyykak

fix 86379530 with magic

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 638402c6
Pipeline #10133 passed with stage
in 53 seconds
......@@ -34,7 +34,7 @@ function c86379530.initial_effect(c)
e4:SetOperation(c86379530.thop)
c:RegisterEffect(e4)
end
--
function c86379530.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local pg=e:GetLabelObject()
......@@ -55,21 +55,29 @@ end
function c86379530.pubtg(e,c)
return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(86379531)~=0
end
--
function c86379530.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sc=eg:GetFirst()
while sc do
if sc:IsType(TYPE_MONSTER) and sc:IsLocation(LOCATION_HAND) and (sc:IsSummonable(false,nil) or sc:IsMSetable(false,nil)) and Duel.CheckSummonedCount(sc) then
Duel.Hint(HINT_CARD,0,86379530)
if sc:IsSummonable(true,nil) and (not sc:IsMSetable(true,nil)
or Duel.SelectPosition(sc:GetControler(),sc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then
Duel.Summon(sc:GetControler(),sc,true,nil)
else
Duel.MSet(sc:GetControler(),sc,true,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(function(e_,tp_,eg_,ep_,ev_,re_,r_,rp_)
e1:Reset()
local sc=eg:GetFirst()
while sc do
Debug.Message(sc:IsSummonable(false,nil))
Debug.Message(Duel.CheckSummonedCount(sc))
if sc:IsType(TYPE_MONSTER) and sc:IsLocation(LOCATION_HAND) and sc:IsControler(tp_) and (sc:IsSummonable(false,nil) or sc:IsMSetable(false,nil)) and Duel.CheckSummonedCount(sc) then
Duel.Hint(HINT_CARD,0,86379530)
if sc:IsSummonable(false,nil) and (not sc:IsMSetable(false,nil)
or Duel.SelectPosition(sc:GetControler(),sc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then
Duel.Summon(sc:GetControler(),sc,false,nil)
else
Duel.MSet(sc:GetControler(),sc,false,nil)
end
end
Duel.IncreaseSummonedCount(sc)
sc=eg:GetNext()
end
sc=eg:GetNext()
end
end)
Duel.RegisterEffect(e1,Duel.GetTurnPlayer())
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