Commit 5b64f020 authored by nekrozar's avatar nekrozar

fix Misfortune

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=6669
■元々の攻撃力が0のモンスターを対象として発動する事はできません。
parent f5a78205
......@@ -20,12 +20,15 @@ function c1036974.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1036974.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>0
end
function c1036974.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c1036974.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1036974.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
local g=Duel.SelectTarget(tp,c1036974.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetBaseAttack()/2)
end
function c1036974.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
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