Commit b58c6090 authored by Huangnan's avatar Huangnan

fix

parent 6415bd04
Pipeline #33285 failed with stages
in 34 minutes and 47 seconds
No preview for this file type
--非统一魔法世界论
function c1000413.initial_effect(c)
c:SetUniqueOnField(1,0,1000413)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c1000413.con)
e1:SetCountLimit(1,1000413)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
......@@ -33,7 +31,6 @@ function c1000413.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(aux.exccon)
e4:SetCost(c1000413.thcost)
e4:SetTarget(c1000413.thtg)
e4:SetOperation(c1000413.thop)
......@@ -46,15 +43,17 @@ function c1000413.con(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0)
return g:IsExists(c1000413.cfilter,1,nil)
end
--修改判定函数
function c1000413.cfilter1(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c1000413.con1(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0)
return not g:IsExists(c1000413.cfilter,1,nil)
function c1000413.con1(e,tp)
return true
end
function c1000413.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end
local g=Duel.GetMatchingGroup(c1000413.cfilter1,tp,LOCATION_MZONE,0,nil)
return g:GetCount()==0
end
function c1000413.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -20,7 +20,6 @@ function c1000421.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon)
e3:SetCountLimit(1,1000421)
e3:SetCost(c1000421.thcost)
e3:SetTarget(c1000421.thtg)
......@@ -28,15 +27,16 @@ function c1000421.initial_effect(c)
c:RegisterEffect(e3)
end
function c1000421.targert(e,c)
return c:IsSetCard(0xa201) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0xa201) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
and not c:IsLocation(LOCATION_GRAVE) --防止无限循环
end
function c1000421.desfilter(c)
function c1000421.tdfilter(c)
return c:IsAbleToDeckAsCost()
end
function c1000421.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000421.desfilter,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1000421.desfilter,tp,LOCATION_HAND,0,2,2,nil)
local g=Duel.SelectMatchingCard(tp,c1000421.tdfilter,tp,LOCATION_HAND,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c1000421.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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