Skip to content

Commit 2a2a76e

Browse files
authored
"Zefrasaber, Swordmaster of the Nekroz" fix
Should exclude itself when considering what can be Tributed for the Ritual Summon, but only for the activation check.
1 parent 84a9c7a commit 2a2a76e

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

c84388461.lua

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--剣聖の影霊衣-セフィラセイバー
2+
--Zefrasaber, Swordmaster of the Nekroz
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
Pendulum.AddProcedure(c)
6+
--You cannot Pendulum Summon monsters, except "Nekroz" and "Zefra" monsters, this effect cannot be negated
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_FIELD)
9+
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
10+
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
11+
e0:SetRange(LOCATION_PZONE)
12+
e0:SetTargetRange(1,0)
13+
e0:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_NEKROZ,SET_ZEFRA}) end)
14+
c:RegisterEffect(e0)
15+
local ritual_target_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) and ritual_c~=c end,forcedselection=s.forcedselection}
16+
local ritual_operation_params={handler=c,lvtype=RITPROC_EQUAL,filter=function(ritual_c) return ritual_c:IsSetCard(SET_NEKROZ) end}
17+
--Tribute monsters from your hand or field, then Ritual Summon 1 "Nekroz" Ritual Monster from your hand whose Level exactly equals the total Levels of those monsters
18+
local e1=Effect.CreateEffect(c)
19+
e1:SetDescription(aux.Stringid(id,0))
20+
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
21+
e1:SetType(EFFECT_TYPE_IGNITION)
22+
e1:SetRange(LOCATION_HAND|LOCATION_MZONE)
23+
e1:SetCountLimit(1,id)
24+
e1:SetCost(Cost.SelfTribute)
25+
e1:SetTarget(Ritual.Target(ritual_target_params))
26+
e1:SetOperation(Ritual.Operation(ritual_operation_params))
27+
c:RegisterEffect(e1)
28+
end
29+
s.listed_series={SET_NEKROZ,SET_ZEFRA}
30+
function s.forcedselection(e,tp,g,sc)
31+
local c=e:GetHandler()
32+
return not g:IsContains(c),g:IsContains(c)
33+
end

c90887783.lua

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--竜の交感
2+
--Draconnection
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
--Reveal 1 Dragon-Type monster in your hand, add 1 Dragon-Type monster with the same Level from your Deck to your hand, then shuffle the revealed monster into the Deck
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetTarget(s.target)
12+
e1:SetOperation(s.activate)
13+
c:RegisterEffect(e1)
14+
end
15+
function s.revfilter(c,tp)
16+
return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() and not c:IsPublic()
17+
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel())
18+
end
19+
function s.thfilter(c,lv)
20+
return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and c:IsAbleToHand()
21+
end
22+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
23+
if chk==0 then return Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,tp) end
24+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
25+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
26+
end
27+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
28+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
29+
local rc=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
30+
if not rc then return end
31+
Duel.ConfirmCards(1-tp,rc)
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
33+
local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetLevel()):GetFirst()
34+
if not sc then return end
35+
Duel.BreakEffect()
36+
if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then
37+
Duel.ConfirmCards(1-tp,sc)
38+
Duel.BreakEffect()
39+
Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
40+
end
41+
end

0 commit comments

Comments
 (0)