Commit b45ef922 authored by REIKAI's avatar REIKAI 💬

fix

parent 0aff1644
Pipeline #23948 passed with stages
in 25 minutes and 50 seconds
......@@ -32,7 +32,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)]]--
end
function cm.costfilter(c)
return c:IsSetCard(0x3fa6) and c:IsDiscardable()
return c:IsSetCard(0x3fa6) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
......
......@@ -11,6 +11,14 @@ function c17242203.initial_effect(c)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetCondition(c17242203.spcon)
c:RegisterEffect(e1)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -21,18 +21,10 @@ function c50221425.initial_effect(c)
e2:SetTarget(c50221425.distg)
e2:SetOperation(c50221425.disop)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(50221425,0))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EVENT_SPSUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c50221425.xmdiscon)
e3:SetCost(c50221425.discost)
e3:SetTarget(c50221425.distg)
e3:SetOperation(c50221425.disop)
c:RegisterEffect(e3)
end
function c50221425.skipcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -64,9 +56,7 @@ function c50221425.discon(e,tp,eg,ep,ev,re,r,rp)
end
function c50221425.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local sg=Duel.SelectMatchingCard(tp,Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,0,1,1,nil,tp,1,REASON_COST)
sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c50221425.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -25,18 +25,10 @@ function c50221430.initial_effect(c)
e2:SetTarget(c50221430.distg)
e2:SetOperation(c50221430.disop)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(50221430,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c50221430.xmdiscon)
e3:SetCost(c50221430.discost)
e3:SetTarget(c50221430.distg)
e3:SetOperation(c50221430.disop)
c:RegisterEffect(e3)
--material check
local e4=Effect.CreateEffect(c)
......@@ -97,33 +89,33 @@ function c50221430.adop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c50221430.xmdiscon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(aux.TRUE,1,nil,tp) and Duel.IsChainNegatable(ev) and e:GetHandler():IsSetCard(0xcb5)
end
function c50221430.discon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(aux.TRUE,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c50221430.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local sg=Duel.SelectMatchingCard(tp,Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,0,1,1,nil,tp,1,REASON_COST)
sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c50221430.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c50221430.disop(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -27,7 +27,7 @@ function c50223285.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,50223287)
e3:SetCountLimit(1,50223287)
e3:SetTarget(c50223285.tg3)
e3:SetOperation(c50223285.op3)
c:RegisterEffect(e3)
......@@ -57,6 +57,7 @@ function c50223285.tg2f(c)
end
function c50223285.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50223285.tg2f,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,LOCATION_GRAVE)
end
function c50223285.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -2,7 +2,7 @@
function c9310049.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......
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