Commit a217e3bb authored by Huangnan's avatar Huangnan

fix

parent 1bb8075a
Pipeline #39978 failed with stages
in 3 minutes and 46 seconds
......@@ -35,49 +35,27 @@ function cm.initial_effect(c)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
if not cm.check then
cm.check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetOperation(cm.chainop)
Duel.RegisterEffect(e1,0)
local _CheckFusionMaterial=Card.CheckFusionMaterial
local _SelectFusionMaterial=Duel.SelectFusionMaterial
if not aux.checkxyzfusionhack then
aux.checkxyzfusionhack=true
_hack_fusion_check=Card.CheckFusionMaterial
function Card.CheckFusionMaterial(card,Group_fus,Card_g,int_chkf,not_mat)
local tp=card:GetControler()
local exg=Duel.GetMatchingGroup(cm.filter0,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil,card)
exg:Sub(Group_fus)
if #exg>0 and Duel.GetFlagEffect(tp,18700544)>0 then
local hg=Group.__add(Group_fus,exg)
return _CheckFusionMaterial(card,hg,Card_g,int_chkf,not_mat)
local exg_temp=Duel.GetMatchingGroup(cm.getexc,int_chkf,0,LOCATION_MZONE+LOCATION_GRAVE,nil)
local exg=Group.CreateGroup()
if exg_temp:GetCount()>0 then
exg:Merge(exg_temp)
end
return _CheckFusionMaterial(card,Group_fus,Card_g,int_chkf,not_mat)
end
function Duel.SelectFusionMaterial(tp,card,mg,gc_nil,chkf)
if Duel.GetFlagEffect(tp,18700544)>0 then
local exg=Duel.GetMatchingGroup(cm.filter0,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil,card)
mg:Merge(exg)
if exg:GetCount()>0 then
Group_fus:Merge(exg)
end
return _SelectFusionMaterial(tp,card,mg,gc_nil,chkf)
return _hack_fusion_check(card,Group_fus,Card_g,int_chkf,not_mat)
end
end
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandlerPlayer()==tp then
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.getexc(c)
return c:GetFlagEffect(18700544)>0 and c:IsFaceup()
end
function cm.filter0(c,fc)
return c:IsCanBeFusionMaterial(fc)
and c:GetFlagEffect(18700544)>0
and c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE)
end
function cm.thfilter2(c)
return c:IsType(TYPE_MONSTER)
......@@ -132,7 +110,6 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local tc=Duel.SelectMatchingCard(tp,cm.effilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil):GetFirst()
Duel.HintSelection(Group.FromCards(tc))
tc:RegisterFlagEffect(m,RESET_PHASE+PHASE_END,0,1)
end
end
......@@ -60,8 +60,8 @@ function cm.teop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local b1=not g:GetFirst():IsForbidden()
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,1)},
{true,aux.Stringid(m,2)})
{b1,aux.Stringid(m,2)},
{true,aux.Stringid(m,1)})
if op==1 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
......
......@@ -4,16 +4,17 @@ function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,cm.mfilter0,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),2,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.fuscon)
e1:SetCost(cm.rmcost)
e1:SetOperation(cm.fusop)
e1:SetCountLimit(1,o)
c:RegisterEffect(e1)
-- ②效果
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
......@@ -23,7 +24,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.tgfilter)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......@@ -32,15 +32,15 @@ function cm.initial_effect(c)
e3:SetTarget(cm.tgfilter)
e3:SetValue(1)
c:RegisterEffect(e3)
-- ③效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,o+1)
e4:SetCountLimit(1,m+1)
e4:SetTarget(cm.exctg)
e4:SetOperation(cm.excop)
c:RegisterEffect(e4)
......@@ -96,20 +96,22 @@ end
function cm.tgfilter(e,c)
return c:IsRace(RACE_AQUA) and c:IsLevelBelow(9)
end
function cm.exfilter(c)
return c:IsRace(RACE_AQUA) and c:IsFaceup()
end
function cm.exctg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct1=Duel.GetMatchingGroupCount(Card.IsRace,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil,RACE_AQUA)
local ct1=Duel.GetMatchingGroupCount(cm.exfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)
local ct=math.max(1,ct1)
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,1-tp,LOCATION_ONFIELD)
end
-- ③效果处理
function cm.excop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
--深红诞地之心
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -76,6 +76,7 @@ function s.cond3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
tp=e:GetOwnerPlayer()
local b1=Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil)
if chk==0 then
......@@ -116,7 +117,7 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function s.spfilter1(c,tp)
function s.spfilter1(c,tp)
return c:IsCode(id) and c:GetActivateEffect():IsActivatable(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.spfilter2(c,e,tp)
......
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