Commit 79c2ae56 authored by Satty's avatar Satty

fix

parent 7a07b8cb
Pipeline #39366 failed with stages
in 3 minutes and 53 seconds
......@@ -55,6 +55,7 @@ end
function s.e1tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.e1filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.e1filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.e1filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
......@@ -80,8 +81,11 @@ function s.e1op(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_MZONE,0)
Duel.RegisterEffect(e1,tp)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa2a2)
end
function s.e2con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSetCard,nil,tp,0xa2a2)
return eg:IsExists(s.atkfilter,nil,tp,0xa2a2)
end
function s.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -89,7 +93,7 @@ function s.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,eg,1,0,500)
end
function s.e2op(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsSetCard,nil,tp,0xa2a2)
local g=eg:Filter(s.atkfilter,nil)
g:AddCard(e:GetHandler())
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -34,7 +34,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_LEAVE_GRAVE+CATEGORY_GRAVE_ACTION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m+1)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
......
......@@ -15,7 +15,7 @@ function s.addsetcode(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetValue(0xaca2)
c:RegisterEffect(e1)
......@@ -40,8 +40,11 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return te and te:GetHandler():IsSetCard(0xaca2) and p==tp and rp==1-tp
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
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