Commit 8141520c authored by Huangnan's avatar Huangnan

fix

parent ac9a2e1d
Pipeline #40403 failed with stages
in 3 minutes and 41 seconds
......@@ -183,7 +183,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
for i=1,ss do
if Duel.Recover(tp,400,REASON_EFFECT)~=0 then
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) then
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=tg:RandomSelect(tp,1)
if tc then
local preatk=tc:GetAttack()
......@@ -202,10 +202,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
if (preatk~=0 and tc:IsAttack(0)) or (predef~=0 and tc:IsDefense(0)) then Duel.Destroy(tc,REASON_EFFECT) end
end
else
Duel.Damage(1-tp,200,REASON_EFFECT)
end
else
Duel.Damage(1-tp,200,REASON_EFFECT)
end
end
end
......
......@@ -20,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(s.filter,tp,0xff,0,nil)
for tc in aux.Next(g) do
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
......@@ -83,7 +83,7 @@ function s.rsop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.op1(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.__add(Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil),Duel.GetOverlayGroup(tp,1,0))
local sg=Group.__add(Duel.GetMatchingGroup(s.filter,tp,0xff,0,nil),Duel.GetOverlayGroup(tp,1,0))
local g=sg:Filter(function(c)return c:GetFlagEffect(id)==0 end,nil)
if #g==0 then return end
local cp={}
......@@ -110,7 +110,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp)
Card.RegisterEffect=f
end
function s.op2(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.__add(Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil),Duel.GetOverlayGroup(tp,1,0))
local sg=Group.__add(Duel.GetMatchingGroup(s.filter,tp,0xff,0,nil),Duel.GetOverlayGroup(tp,1,0))
local g=sg:Filter(function(c)return c:GetFlagEffect(id+o)==0 end,nil)
if #g==0 then return end
local cp={}
......@@ -137,7 +137,7 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp)
Card.RegisterEffect=f
end
function s.op3(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.__add(Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil),Duel.GetOverlayGroup(tp,1,0))
local sg=Group.__add(Duel.GetMatchingGroup(s.filter,tp,0xff,0,nil),Duel.GetOverlayGroup(tp,1,0))
local g=sg:Filter(function(c)return c:GetFlagEffect(id+o*2)==0 end,nil)
if #g==0 then return end
local cp={}
......
......@@ -28,7 +28,7 @@ function c16400300.initial_effect(c)
c:RegisterEffect(e3)
end
function c16400300.thfilter(c)
return c:IsSetCard(0xce9) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
return c:IsSetCard(0xcce1) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c16400300.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16400300.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -22,14 +22,15 @@ function s.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xce9) and c:IsAttribute(ATTRIBUTE_LIGHT)
return c:IsFaceup() and c:IsSetCard(0xce9) and c:IsType(TYPE_MONSTER)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
......@@ -45,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) and c:IsSetCard(0xce9) and e:GetHandler():IsAbleToRemove()
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) and c:IsSetCard(0xce9) and e:GetHandler():IsAbleToRemove()
end
function s.rmfilter(c,tp,e)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(1-tp) and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e)
......
--光之战士
local m=16400780
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--光之国战线
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 e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--gain atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(function(e,c)
return not c:IsSetCard(0xce9)
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR))
e2:SetValue(500)
c:RegisterEffect(e2)
--decrease tribute
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetCondition(s.ntcon)
e3:SetTarget(s.nttg)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0xce9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
function s.nttg(e,c)
return c:IsLevelAbove(5) and c:IsSetCard(0xce9) and c:IsType(TYPE_MONSTER)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function s.cfilter(c)
return c:IsSetCard(0xce9) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and c:IsFaceupEx()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter1(c)
return c:IsSetCard(0xce9) and c:IsAbleToHand()
function s.filter(c)
return c:IsSetCard(0xce9) and c:IsType(TYPE_MONSTER)and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
end
......@@ -24,16 +24,16 @@ end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=0
local g=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)>2 then ct=ct+1 end
if g2:GetClassCount(Card.GetCode)>2 then ct=ct+1 end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local g2=Duel.GetMatchingGroup(s.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)>1 then ct=ct+1 end
if g2:GetClassCount(Card.GetCode)>1 then ct=ct+1 end
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,ct,REASON_COST+REASON_DISCARD)
local og=Duel.GetOperatedGroup()
e:SetLabel(og:GetCount())
end
function s.thfilter1(c)
return c:IsSetCard(0x36ec) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsFaceupEx() and c:IsSetCard(0x36ec) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thfilter2(c)
return c:IsFaceupEx() and c:IsSetCard(0x36ec) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......@@ -41,15 +41,15 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(s.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>2
or g2:GetClassCount(Card.GetCode)>2 end
if chk==0 then return g:GetClassCount(Card.GetCode)>1
or g2:GetClassCount(Card.GetCode)>1 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local b1=g:GetClassCount(Card.GetCode)>2
local b2=g2:GetClassCount(Card.GetCode)>2
local b1=g:GetClassCount(Card.GetCode)>1
local b2=g2:GetClassCount(Card.GetCode)>1
local et=0
if b1 then et=et+1 end
if b2 then et=et+1 end
......
......@@ -2,6 +2,7 @@
local m=33500090
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--search
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
......
......@@ -2,6 +2,7 @@
local m=33500092
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--tograve
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
......@@ -37,7 +37,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.sfliter(c)
return c.MoJin==true
return c.MoJin==true and c:IsType(TYPE_MONSTER)
end
function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -27,7 +27,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.sfliter(c)
return c.MoJin
return c.MoJin and c:IsType(TYPE_MONSTER)
end
function s.afilter(c)
......
......@@ -37,7 +37,7 @@ function s.initial_effect(c)
end
end
function s.sfliter(c)
return c.MoJin==true
return c.MoJin==true and c:IsType(TYPE_MONSTER)
end
function s.cfilter(c) --2025.8.23 雪
return Duel.GetFlagEffect(tp,id)>0 and c:IsAbleToRemoveAsCost()
......
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