Commit 9c965598 authored by Nemo Ma's avatar Nemo Ma

fix

parent e4f4bb5c
......@@ -133,5 +133,11 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsControler(1-tp) and atk1<=atk and (atk1>=0 or c:IsLocation(LOCATION_MZONE))
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
return Duel.ChangeChainOperation(ev,cm.repop)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(0)
end
\ No newline at end of file
......@@ -23,8 +23,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
cm.SetCard_01_YaoHu=true
function cm.isYaoHu(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YaoHu
end
function cm.filter(c)
return c.SetCard_01_YaoHu and c:IsAbleToHand()
return cm.isYaoHu(c:GetCode()) and c:IsAbleToHand()
end
function cm.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -39,7 +43,7 @@ function cm.shop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.repfilter1(c,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c.SetCard_01_YaoHu
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and cm.isYaoHu(c:GetCode())
end
function cm.repfilter2(c,tp)
return c:IsOnField() and c:IsType(TYPE_MONSTER) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
......
......@@ -30,8 +30,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
cm.SetCard_01_YaoHu=true
function cm.isYaoHu(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YaoHu
end
function cm.filter(c)
return c.SetCard_01_YaoHu and not (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
return cm.isYaoHu(c:GetCode()) and not (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -28,8 +28,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
cm.SetCard_01_YaoHu=true
function cm.isYaoHu(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YaoHu
end
function cm.filter(c)
return c.SetCard_01_YaoHu and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand()
return cm.isYaoHu(c:GetCode()) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -29,8 +29,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
cm.SetCard_01_YaoHu=true
function cm.isYaoHu(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YaoHu
end
function cm.filter(c)
return c.SetCard_01_YaoHu and not c:IsCode(m) and c:IsAbleToDeck()
return cm.isYaoHu(c:GetCode()) and not c:IsCode(m) and c:IsAbleToDeck()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
......
......@@ -29,8 +29,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
cm.SetCard_01_YaoHu=true
function cm.isYaoHu(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YaoHu
end
function cm.filter(c)
return c.SetCard_01_YaoHu and c:IsFaceup() and not c:IsCode(m) and c:IsAbleToGrave()
return cm.isYaoHu(c:GetCode()) and c:IsFaceup() and not c:IsCode(m) and c:IsAbleToGrave()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end
......
......@@ -18,11 +18,15 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
cm.SetCard_01_YaoHu=true
function cm.isYaoHu(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YaoHu
end
function cm.filter(c)
return c.SetCard_01_YaoHu and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
return cm.isYaoHu(c:GetCode()) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function cm.atkfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c.SetCard_01_YaoHu
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and cm.isYaoHu(c:GetCode())
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,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