Commit 5ba7cfc5 authored by Nemo Ma's avatar Nemo Ma

fix

parent 405140c3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local m=60000008 local m=60000008
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="光道引导向の未来" cm.name="光道引导向の未来"
function cm.initial_effect(c)
--discard deck --discard deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -22,11 +23,11 @@ cm.name="光道引导向の未来" ...@@ -22,11 +23,11 @@ cm.name="光道引导向の未来"
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.distarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.distarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.IsPlayerCanDiscardDeck(1-tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,PLAYER_ALL,2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,PLAYER_ALL,2)
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,2,REASON_EFFECT) Duel.DiscardDeck(tp,2,REASON_EFFECT)
Duel.DiscardDeck(1-tp,2,REASON_EFFECT) Duel.DiscardDeck(1-tp,2,REASON_EFFECT)
end end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp) function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -16,7 +16,7 @@ function c9911076.cfilter(c) ...@@ -16,7 +16,7 @@ function c9911076.cfilter(c)
end end
function c9911076.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9911076.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
local ct=Duel.GetMatchingGroupCount(c9911076.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroup(c9911076.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
......
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