Commit 9c11de53 authored by Tachibana's avatar Tachibana

ndyd

parent 882345f9
...@@ -35,10 +35,10 @@ function cm.rmfilter(c,link) ...@@ -35,10 +35,10 @@ function cm.rmfilter(c,link)
return c:IsType(TYPE_MONSTER) and c:IsLink(link) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsLink(link) and c:IsAbleToRemove()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,tp) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end end
......
...@@ -49,9 +49,9 @@ function cm.remop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,9 +49,9 @@ function cm.remop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE) e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,0)
e2:SetValue(cm.val) e2:SetValue(cm.val)
e2:SetReset(RESET_PHASE+PHASE_END,2) e2:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function cm.val(e,re,dam,r,rp,rc) function cm.val(e,re,dam,r,rp,rc)
......
...@@ -61,8 +61,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,8 +61,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.filterss(c)
return c:IsFaceup() and c:IsSetCard(0x561)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(cm.thfilter,tp,0,LOCATION_GRAVE,nil,tp)>0 return Duel.GetMatchingGroupCount(cm.thfilter,tp,0,LOCATION_GRAVE,nil,tp)>0 and Duel.GetMatchingGroupCount(cm.filterss,tp,LOCATION_MZONE,0,nil)>0
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
......
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