Commit 637232f3 authored by mercury233's avatar mercury233

fix

parent 1a7e25e7
...@@ -17,17 +17,18 @@ function c101102087.initial_effect(c) ...@@ -17,17 +17,18 @@ function c101102087.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101102087.ctval) e2:SetValue(c101102087.ctval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--draw card --negate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,101102087) e3:SetCountLimit(1,101102087)
e3:SetCondition(c101102087.drcon) e3:SetCondition(c101102087.negcon)
e3:SetCost(c101102087.drcost) e3:SetCost(c101102087.negcost)
e3:SetTarget(c101102087.drtg) e3:SetTarget(c101102087.negtg)
e3:SetOperation(c101102087.drop) e3:SetOperation(c101102087.negop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -47,27 +48,27 @@ end ...@@ -47,27 +48,27 @@ end
function c101102087.ctval(e,re,rp) function c101102087.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_MONSTER)>0 return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_MONSTER)>0
end end
function c101102087.drcon(e,tp,eg,ep,ev,re,r,rp) function c101102087.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler() return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev)
end end
function c101102087.cfilter(c) function c101102087.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101102087.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101102087.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102087.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetTargetParam(2) if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end end
function c101102087.drop(e,tp,eg,ep,ev,re,r,rp) function c101102087.negop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Draw(p,d,REASON_EFFECT) Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end end
function c101102087.thcon(e,tp,eg,ep,ev,re,r,rp) function c101102087.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -17,18 +17,17 @@ function c101102088.initial_effect(c) ...@@ -17,18 +17,17 @@ function c101102088.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101102088.ctval) e2:SetValue(c101102088.ctval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--negate --draw card
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) e3:SetCategory(CATEGORY_DRAW)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,101102088) e3:SetCountLimit(1,101102088)
e3:SetCondition(c101102088.negcon) e3:SetCondition(c101102088.drcon)
e3:SetCost(c101102088.negcost) e3:SetCost(c101102088.drcost)
e3:SetTarget(c101102088.negtg) e3:SetTarget(c101102088.drtg)
e3:SetOperation(c101102088.negop) e3:SetOperation(c101102088.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -48,29 +47,25 @@ end ...@@ -48,29 +47,25 @@ end
function c101102088.ctval(e,re,rp) function c101102088.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_SPELL)>0 return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_SPELL)>0
end end
function c101102088.negcon(e,tp,eg,ep,ev,re,r,rp) function c101102088.drcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler() return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end end
function c101102088.cfilter(c) function c101102088.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101102088.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101102088.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102088.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetTargetPlayer(tp)
if re:GetHandler():IsRelateToEffect(re) then Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
end end
function c101102088.negop(e,tp,eg,ep,ev,re,r,rp) function c101102088.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end
end end
function c101102088.thcon(e,tp,eg,ep,ev,re,r,rp) function c101102088.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -62,8 +62,9 @@ function c101102089.rmcostfilter(c,e) ...@@ -62,8 +62,9 @@ function c101102089.rmcostfilter(c,e)
end end
function c101102089.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101102089.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e) end if chk==0 then return Duel.IsExistingMatchingCard(c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e)
Duel.Remove(g,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101102089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) 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