Skip to content

Commit f5986af

Browse files
committed
fix darklord uprising not being able to sent as cost a monster on the field with a full field
1 parent 9b5c359 commit f5986af

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

official/c54527349.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,24 @@ function s.initial_effect(c)
1515
c:RegisterEffect(e1)
1616
end
1717
s.listed_series={SET_DARKLORD}
18-
function s.fextra(exc)
19-
return function(e,tp,mg)
20-
return nil,s.costcardcheck(exc)
18+
function s.matfilter(exc)
19+
return function(c)
20+
return c~=exc and c:IsAbleToGrave()
2121
end
2222
end
2323
function s.costcardcheck(exc)
2424
return function(tp,sg,fc)
25-
return not (exc and sg:IsContains(exc))
25+
return Duel.GetLocationCountFromEx(tp,tp,sg+exc,fc)>0
26+
end
27+
end
28+
function s.fextra(exc)
29+
return function(e,tp,mg)
30+
return nil,s.costcardcheck(exc)
2631
end
2732
end
2833
function s.costfilter(c,e,tp,eg,ep,ev,re,r,rp)
2934
if not (c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()) then return false end
30-
local params={fusfilter=aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),extrafil=s.fextra(c)}
35+
local params={fusfilter=aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),matfilter=s.matfilter(c),extrafil=s.fextra(c),chkf=PLAYER_NONE}
3136
return Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0)
3237
end
3338
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
@@ -50,12 +55,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
5055
end
5156
function s.spop(e,tp,eg,ep,ev,re,r,rp,chk)
5257
local cost_card=e:GetLabelObject()
53-
local params={}
54-
if cost_card then
55-
params={fusfilter=aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),extrafil=s.fextra(cost_card),stage2=s.stage2}
56-
else
57-
params={fusfilter=aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK)}
58-
end
58+
local params={fusfilter=aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),stage2=cost_card and s.stage2 or nil}
5959
Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp,1)
6060
end
6161
function s.stage2(e,tc,tp,sg,chk)
@@ -67,4 +67,4 @@ function s.stage2(e,tc,tp,sg,chk)
6767
end
6868
e:SetLabelObject(nil)
6969
end
70-
end
70+
end

0 commit comments

Comments
 (0)