Commit 1519d984 authored by wyykak's avatar wyykak

fix 86379530 with magic

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 638402c6
...@@ -34,7 +34,7 @@ function c86379530.initial_effect(c) ...@@ -34,7 +34,7 @@ function c86379530.initial_effect(c)
e4:SetOperation(c86379530.thop) e4:SetOperation(c86379530.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
--
function c86379530.drop(e,tp,eg,ep,ev,re,r,rp) function c86379530.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local pg=e:GetLabelObject() local pg=e:GetLabelObject()
...@@ -55,21 +55,29 @@ end ...@@ -55,21 +55,29 @@ end
function c86379530.pubtg(e,c) function c86379530.pubtg(e,c)
return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(86379531)~=0 return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(86379531)~=0
end end
--
function c86379530.thop(e,tp,eg,ep,ev,re,r,rp) function c86379530.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
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() local sc=eg:GetFirst()
while sc do 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 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) Duel.Hint(HINT_CARD,0,86379530)
if sc:IsSummonable(true,nil) and (not sc:IsMSetable(true,nil) 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 or Duel.SelectPosition(sc:GetControler(),sc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then
Duel.Summon(sc:GetControler(),sc,true,nil) Duel.Summon(sc:GetControler(),sc,false,nil)
else else
Duel.MSet(sc:GetControler(),sc,true,nil) Duel.MSet(sc:GetControler(),sc,false,nil)
end end
Duel.IncreaseSummonedCount(sc)
end end
sc=eg:GetNext() sc=eg:GetNext()
end end
end)
Duel.RegisterEffect(e1,Duel.GetTurnPlayer())
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