Commit 7a07b8cb authored by Huangnan's avatar Huangnan

fix

parent cfa0c088
Pipeline #39359 failed with stages
in 4 minutes and 34 seconds
No preview for this file type
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
end end
function cm.tfilter(c,e,tp) function cm.tfilter(c,e,tp)
if not c.srre_back_side then return false end if not c.srre_back_side then return false end
local tcim={Duel.ReadCard(tc.srre_back_side,CARDDATA_CODE,CARDDATA_SETCODE,CARDDATA_TYPE,CARDDATA_ATTACK,CARDDATA_DEFENSE,CARDDATA_LEVEL,CARDDATA_RACE,CARDDATA_ATTRIBUTE)} local tcim={Duel.ReadCard(c.srre_back_side,CARDDATA_CODE,CARDDATA_SETCODE,CARDDATA_TYPE,CARDDATA_ATTACK,CARDDATA_DEFENSE,CARDDATA_LEVEL,CARDDATA_RACE,CARDDATA_ATTRIBUTE)}
return srre.check_set_seHakaShiroJyou(c) and not c:IsPublic() and Duel.IsPlayerCanSpecialSummonMonster(tp,table.unpack(tcim)) return srre.check_set_seHakaShiroJyou(c) and not c:IsPublic() and Duel.IsPlayerCanSpecialSummonMonster(tp,table.unpack(tcim))
end end
function cm.tgfilter(c) function cm.tgfilter(c)
...@@ -27,7 +27,7 @@ function cm.thfilter1(c,e,tp) ...@@ -27,7 +27,7 @@ function cm.thfilter1(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummonable(nil,mg) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummonable(nil,mg) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=( Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,20,nil) ) local b1=( Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,20,nil,RACE_ZOMBIE) )
local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_EXTRA,0,1,nil) local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_EXTRA,0,1,nil)
local b3=Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) local b3=Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
......
--第三之幻真兽“玲狱宠妃”赫尔古瓦尔
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400134,12400135)
c:SetUniqueOnField(1,0,id)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--Overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,3))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+10000)
e2:SetTarget(s.ovtg)
e2:SetOperation(s.ovop)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
e:SetLabel(1)
else
e:SetLabel(0)
end
end
function s.mofilter(c)
return c:IsFaceup() and c:IsCode(12400134)
end
function s.thfilter(c,check)
if not c:IsType(TYPE_SPELL+TYPE_TRAP) then return false end
return c:IsSetCard(0xc2a2) and not c:IsCode(12400134) and (c:IsAbleToHand() or (check and c:IsSSetable()))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local check=false
if e:GetLabel()==1 or Duel.IsExistingMatchingCard(s.mofilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then check=true end
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,check) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local check=false
if e:GetLabel()==1 or Duel.IsExistingMatchingCard(s.mofilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then check=true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,check)
if #sg>0 then
local tc=sg:GetFirst()
if tc:IsAbleToHand() and (not (check and tc:IsSSetable()) or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(12400135) and c:IsType(TYPE_XYZ)
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.ovfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=Duel.SelectTarget(tp,s.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if #g>0 then Duel.Overlay(tc,g) end
Duel.Overlay(tc,c)
end
end
\ No newline at end of file
...@@ -47,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
else else
mg:RemoveCard(tc) mg:RemoveCard(tc)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=s.RitualCheckAdditional(tc,tc:GetLevel(),"Greater") aux.GCheckAdditional=s.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,s.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater") local mat=mg:SelectSubGroup(tp,s.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
...@@ -68,6 +68,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,6 +68,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
aux.RCheckAdditional=nil aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil aux.RGCheckAdditional=nil
end end
function s.IsCanBeRitualMaterial(c,rc)
return (c:IsCanBeRitualMaterial(rc) or true)
end
function s.lvget(c,rc) function s.lvget(c,rc)
if c:GetRitualLevel(rc)>0 then if c:GetRitualLevel(rc)>0 then
return c:GetRitualLevel(rc) return c:GetRitualLevel(rc)
...@@ -75,9 +78,6 @@ function s.lvget(c,rc) ...@@ -75,9 +78,6 @@ function s.lvget(c,rc)
return 1 return 1
end end
end end
function s.IsCanBeRitualMaterial(c,rc)
return (c:IsCanBeRitualMaterial(rc) or true)
end
function s.RitualCheckGreater(g,c,lv) function s.RitualCheckGreater(g,c,lv)
Duel.SetSelectedCard(g) Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(s.lvget,lv,c) return g:CheckWithSumGreater(s.lvget,lv,c)
......
...@@ -63,7 +63,6 @@ function cm.spcon(e,c) ...@@ -63,7 +63,6 @@ function cm.spcon(e,c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
g=mg:SelectSubGroup(tp,cm.mzfilter,false,1,1,tp) g=mg:SelectSubGroup(tp,cm.mzfilter,false,1,1,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