Commit 5cac8ad5 authored by nanahira's avatar nanahira

catchup

parent 496a6724
...@@ -58,7 +58,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetRank()==4 return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetRank()==4
and (c:IsControler(tp) or c:IsAbleToChangeControler()) and c:IsCanOverlay()
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:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end
......
...@@ -38,7 +38,7 @@ function cm.xmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.xmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(cm.xmfilter,1,nil) return e:GetHandler():GetOverlayGroup():IsExists(cm.xmfilter,1,nil)
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsType(TYPE_TOKEN) return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanOverlay()
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:IsLocation(LOCATION_MZONE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end
......
...@@ -92,7 +92,7 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return c:IsCanOverlay()
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end
......
...@@ -69,7 +69,7 @@ function cm.ccost(costf) ...@@ -69,7 +69,7 @@ function cm.ccost(costf)
end end
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsType(TYPE_TOKEN) return c:IsCanOverlay()
end end
function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end
......
...@@ -89,7 +89,7 @@ function cm.rm(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,7 +89,7 @@ function cm.rm(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function cm.drfilter(c,e,tp) function cm.drfilter(c,e,tp)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsImmuneToEffect(e) and c~=e:GetHandler() return c:IsCanOverlay() and not c:IsImmuneToEffect(e) and c~=e:GetHandler()
end end
function cm.desfilter(c,e,tp) function cm.desfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() and c:IsRace(RACE_SEASERPENT) and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() and c:IsRace(RACE_SEASERPENT) and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e,tp)
......
...@@ -53,5 +53,5 @@ function cm.exop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,5 +53,5 @@ function cm.exop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.drfilter(c,e) function cm.drfilter(c,e)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsImmuneToEffect(e) returnc:IsCanOverlay() and not c:IsImmuneToEffect(e)
end end
...@@ -37,7 +37,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsFaceup() and c:GetFlagEffect(m)==0 and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return c:IsFaceup() and c:GetFlagEffect(m)==0 and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) c:IsCanOverlay()
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,7 +26,7 @@ function cm.mfilter(c) ...@@ -26,7 +26,7 @@ function cm.mfilter(c)
return c:IsRace(RACE_FAIRY) return c:IsRace(RACE_FAIRY)
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsCanOverlay()
end end
function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end
......
...@@ -38,7 +38,7 @@ function cm.xyzop(e,tp,chk) ...@@ -38,7 +38,7 @@ function cm.xyzop(e,tp,chk)
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD)
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsType(TYPE_TOKEN) return c:IsCanOverlay()
end end
function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc,tp) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc,tp) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) 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