Commit a8cf8e66 authored by 未闻皂名's avatar 未闻皂名

2021/9/8 修复bug

parent 78489080
...@@ -11,6 +11,7 @@ function cm.initial_effect(c) ...@@ -11,6 +11,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
...@@ -20,6 +21,9 @@ end ...@@ -20,6 +21,9 @@ end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand() return c:IsCode(list[1]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.DiscardDeck(tp,1,REASON_COST) Duel.DiscardDeck(tp,1,REASON_COST)
......
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