Skip to content

Commit 5c577bc

Browse files
authored
Added new card scripts
1 parent 5fdf4c3 commit 5c577bc

File tree

5 files changed

+361
-0
lines changed

5 files changed

+361
-0
lines changed

pre-release/c101208033.lua

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
--ブレインコントローラー
2+
--Brain Controller
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 "Brain Control" from your Deck to your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.thtg)
15+
e1:SetOperation(s.thop)
16+
c:RegisterEffect(e1)
17+
local e2=e1:Clone()
18+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e2)
20+
--Change the Level of 1 face-up monster on the field
21+
local e3=Effect.CreateEffect(c)
22+
e3:SetDescription(aux.Stringid(id,1))
23+
e3:SetCategory(CATEGORY_LVCHANGE)
24+
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
25+
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
26+
e3:SetCode(EVENT_PAY_LPCOST)
27+
e3:SetRange(LOCATION_MZONE)
28+
e3:SetCountLimit(1,{id,1})
29+
e3:SetCondition(function(e,tp,eg,ep) return ep==tp end)
30+
e3:SetTarget(s.lvtg)
31+
e3:SetOperation(s.lvop)
32+
c:RegisterEffect(e3)
33+
--Special Summon this card to your opponent's field in Defense Position
34+
local e4=Effect.CreateEffect(c)
35+
e4:SetDescription(aux.Stringid(id,2))
36+
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
37+
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
38+
e4:SetProperty(EFFECT_FLAG_DELAY)
39+
e4:SetCode(EVENT_BE_MATERIAL)
40+
e4:SetCountLimit(1,{id,2})
41+
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end)
42+
e4:SetTarget(s.sptg)
43+
e4:SetOperation(s.spop)
44+
c:RegisterEffect(e4)
45+
end
46+
s.listed_names={87910978} --"Brain Control"
47+
function s.thfilter(c)
48+
return c:IsCode(87910978) and c:IsAbleToHand()
49+
end
50+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
51+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
52+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
53+
end
54+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
55+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
56+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
57+
if #g>0 then
58+
Duel.SendtoHand(g,nil,REASON_EFFECT)
59+
Duel.ConfirmCards(1-tp,g)
60+
end
61+
end
62+
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
63+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:HasLevel() and chkc:IsFaceup() end
64+
if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
65+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
66+
local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK)
68+
local lv=Duel.AnnounceLevel(tp,1,8,g:GetFirst():GetLevel())
69+
Duel.SetTargetParam(lv)
70+
Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,lv)
71+
end
72+
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
73+
local tc=Duel.GetFirstTarget()
74+
local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
75+
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
76+
--It becomes the declared Level
77+
local e1=Effect.CreateEffect(e:GetHandler())
78+
e1:SetType(EFFECT_TYPE_SINGLE)
79+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
80+
e1:SetCode(EFFECT_CHANGE_LEVEL)
81+
e1:SetValue(lv)
82+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
83+
tc:RegisterEffect(e1)
84+
end
85+
end
86+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
87+
local c=e:GetHandler()
88+
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
89+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) end
90+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
91+
end
92+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
93+
local c=e:GetHandler()
94+
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) then
95+
c:NegateEffects(c)
96+
end
97+
Duel.SpecialSummonComplete()
98+
end

pre-release/c101208034.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--ボンバー・プレイス
2+
--Bomber Place
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate one of these effects
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY)
10+
e1:SetType(EFFECT_TYPE_QUICK_O)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetRange(LOCATION_MZONE)
13+
e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN)
14+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
15+
e1:SetCost(aux.PayLPCost(600))
16+
e1:SetTarget(s.efftg)
17+
e1:SetOperation(s.effop)
18+
c:RegisterEffect(e1)
19+
end
20+
function s.oppfilter(c,tp)
21+
return c:HasLevel() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.lvrklnkfilter,tp,0,LOCATION_MZONE,1,c,c:GetLevel())
22+
end
23+
function s.lvrklnkfilter(c,lv)
24+
return c:IsFaceup() and (c:IsLevel(lv) or c:IsRank(lv) or c:IsLink(lv))
25+
end
26+
function s.selffilter(c,tp)
27+
return c:HasLevel() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.columnfilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel(),c:GetColumnGroup())
28+
end
29+
function s.columnfilter(c,lv,columng)
30+
return columng:IsContains(c) and s.lvrklnkfilter(c,lv)
31+
end
32+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
33+
local b1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelBelow,6),tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetLevel)==6
34+
and Duel.IsExistingMatchingCard(s.oppfilter,tp,0,LOCATION_MZONE,1,nil,tp)
35+
local b2=Duel.IsExistingMatchingCard(s.selffilter,tp,LOCATION_MZONE,0,1,nil,tp)
36+
if chk==0 then return b1 or b2 end
37+
local op=Duel.SelectEffect(tp,
38+
{b1,aux.Stringid(id,1)},
39+
{b2,aux.Stringid(id,2)})
40+
e:SetLabel(op)
41+
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
42+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,0)
43+
end
44+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
45+
local op=e:GetLabel()
46+
if op==1 then
47+
--Choose 1 face-up monster your opponent controls that has a Level, and destroy all other monsters they control with an equal Level/Rank/Link Rating
48+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) --"Select your opponent's card"
49+
local sc=Duel.SelectMatchingCard(tp,s.oppfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst()
50+
if sc then
51+
Duel.HintSelection(sc)
52+
local g=Duel.GetMatchingGroup(s.lvrklnkfilter,tp,0,LOCATION_MZONE,sc,sc:GetLevel())
53+
if #g>0 then
54+
Duel.Destroy(g,REASON_EFFECT)
55+
end
56+
end
57+
elseif op==2 then
58+
--Choose 1 face-up monster you control that has a Level, and destroy all your opponent's monsters in its column with an equal Level/Rank/Link Rating
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) --"Select your card"
60+
local sc=Duel.SelectMatchingCard(tp,s.selffilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
61+
if sc then
62+
Duel.HintSelection(sc)
63+
local g=Duel.GetMatchingGroup(s.columnfilter,tp,0,LOCATION_MZONE,nil,sc:GetLevel(),sc:GetColumnGroup())
64+
if #g>0 then
65+
Duel.Destroy(g,REASON_EFFECT)
66+
end
67+
end
68+
end
69+
end

pre-release/c101208068.lua

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
--夙めてはしろ 二人ではしろ
2+
--Do it Early, Do it Together
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Your opponent banishes 7 cards from their Extra Deck and/or the top of their Deck, face-down
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_REMOVE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
13+
e1:SetCondition(s.rmcon)
14+
e1:SetCost(s.rmcost)
15+
e1:SetTarget(s.rmtg)
16+
e1:SetOperation(s.rmop)
17+
c:RegisterEffect(e1)
18+
end
19+
s.listed_names={id}
20+
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
21+
return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,id),tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil)
22+
end
23+
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
24+
local g=Duel.GetDecktopGroup(tp,7)
25+
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7 end
26+
Duel.DisableShuffleCheck()
27+
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
28+
end
29+
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
30+
if chk==0 then
31+
local p=1-tp
32+
local dg=Duel.GetDecktopGroup(p,7)
33+
local exg=Duel.GetFieldGroup(p,LOCATION_EXTRA,0)
34+
return (dg+exg):IsExists(Card.IsAbleToRemove,7,nil,p,POS_FACEDOWN,REASON_EFFECT)
35+
end
36+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,1-tp,LOCATION_DECK|LOCATION_EXTRA)
37+
end
38+
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
39+
local p=1-tp
40+
local rg=nil
41+
local exg=Duel.GetMatchingGroup(Card.IsAbleToRemove,p,LOCATION_EXTRA,0,nil,p,POS_FACEDOWN,REASON_EFFECT)
42+
if #exg>0 then
43+
local min=math.max(0,7-Duel.GetFieldGroupCount(p,LOCATION_DECK,0))
44+
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE)
45+
rg=exg:Select(p,min,7,nil)
46+
rg:Merge(Duel.GetDecktopGroup(p,7-#rg))
47+
else
48+
rg=Duel.GetDecktopGroup(p,7)
49+
end
50+
if #rg>0 then
51+
Duel.DisableShuffleCheck()
52+
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT,nil,p)
53+
end
54+
end

pre-release/c101208069.lua

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
--七星天流抜刀術-「破軍」
2+
--Seven Star Sky Style Battojutsu - "Hagun"
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Equip 1 Level 7 monster with the same Type, but a different name, to 1 face-up monster you control, from your hand or Deck as an Equip Spell
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
15+
e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end)
16+
e1:SetTarget(s.eqtg)
17+
e1:SetOperation(s.eqop)
18+
c:RegisterEffect(e1)
19+
--Add this card to your hand
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,1))
22+
e2:SetCategory(CATEGORY_TOHAND)
23+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
24+
e2:SetCode(EVENT_BATTLE_DESTROYED)
25+
e2:SetRange(LOCATION_GRAVE)
26+
e2:SetCondition(s.thcon)
27+
e2:SetTarget(s.thtg)
28+
e2:SetOperation(s.thop)
29+
c:RegisterEffect(e2)
30+
end
31+
function s.tgfilter(c,tp)
32+
return c:IsFaceup() and Duel.IsExistingMatchingCard(s.eqpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp,c:GetRace(),c:GetCode())
33+
end
34+
function s.eqpfilter(c,tp,rac,code)
35+
return c:IsLevel(7) and c:IsRace(rac) and not c:IsCode(code) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
36+
end
37+
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
38+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,tp) end
39+
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
40+
if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end
41+
if chk==0 then return ft>0 and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
42+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
43+
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
44+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
45+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_SZONE)
46+
end
47+
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
48+
local tc=Duel.GetFirstTarget()
49+
if not (tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end
50+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
51+
local ec=Duel.SelectMatchingCard(tp,s.eqpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp,tc:GetRace(),tc:GetCode()):GetFirst()
52+
if ec and Duel.Equip(tp,ec,tc) then
53+
--The equipped monster gains 700 ATK
54+
local e1=Effect.CreateEffect(ec)
55+
e1:SetType(EFFECT_TYPE_EQUIP)
56+
e1:SetCode(EFFECT_UPDATE_ATTACK)
57+
e1:SetValue(700)
58+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
59+
ec:RegisterEffect(e1)
60+
--Equip limit
61+
local e2=Effect.CreateEffect(ec)
62+
e2:SetType(EFFECT_TYPE_SINGLE)
63+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
64+
e2:SetCode(EFFECT_EQUIP_LIMIT)
65+
e2:SetValue(function(e,c) return c==tc end)
66+
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
67+
ec:RegisterEffect(e2)
68+
--Return that Equip Card to the hand during the End Phase
69+
aux.DelayedOperation(ec,PHASE_END,id,e,tp,function() Duel.SendtoHand(ec,nil,REASON_EFFECT) end,nil,0,1,aux.Stringid(id,2))
70+
end
71+
end
72+
function s.thconfilter(c,tp)
73+
return c:IsPreviousControler(1-tp) and (c:GetPreviousLevelOnField()>=8 or c:GetPreviousRankOnField()>=8)
74+
end
75+
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
76+
return eg:IsExists(s.thconfilter,1,nil,tp)
77+
end
78+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
79+
local c=e:GetHandler()
80+
if chk==0 then return c:IsAbleToHand() end
81+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0)
82+
end
83+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
84+
local c=e:GetHandler()
85+
if c:IsRelateToEffect(e) then
86+
Duel.SendtoHand(c,nil,REASON_EFFECT)
87+
end
88+
end

pre-release/c101208080.lua

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
--アブダクション
2+
--Abduction
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Banish 1 monster from your Deck or Extra Deck and take control of opponent's monster
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_CONTROL)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
14+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
15+
e1:SetTarget(s.rmtg)
16+
e1:SetOperation(s.rmop)
17+
c:RegisterEffect(e1)
18+
end
19+
function s.ctfilter(c,tp)
20+
if not (c:IsFaceup() and c:IsAbleToChangeControler()) then return false end
21+
local original_lvrklnk=(c:HasLevel() and c:GetOriginalLevel())
22+
or (c:HasRank() and c:GetOriginalRank())
23+
or (c:IsLinkMonster() and c:GetLink())
24+
return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c:GetOriginalRace(),c:GetOriginalAttribute(),c,original_lvrklnk)
25+
end
26+
function s.rmfilter(c,race,attr,tc,lvrklnk)
27+
return c:IsAbleToRemove() and c:IsOriginalRace(race) and c:IsOriginalAttribute(attr)
28+
and ((tc:HasLevel() and c:IsOriginalLevel(lvrklnk))
29+
or (tc:HasRank() and c:IsOriginalRank(lvrklnk))
30+
or (tc:IsLinkMonster() and c:IsLink(lvrklnk)))
31+
end
32+
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
33+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0
34+
and Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
35+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
36+
local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
37+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA)
38+
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
39+
end
40+
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
41+
local tc=Duel.GetFirstTarget()
42+
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
43+
local original_lvrklnk=(tc:HasLevel() and tc:GetOriginalLevel())
44+
or (tc:HasRank() and tc:GetOriginalRank())
45+
or (tc:IsLinkMonster() and tc:GetLink())
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
47+
local rc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetOriginalRace(),tc:GetOriginalAttribute(),tc,original_lvrklnk):GetFirst()
48+
if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and rc:IsLocation(LOCATION_REMOVED)
49+
and Duel.GetControl(tc,tp) and rc:IsOriginalCodeRule(tc:GetOriginalCodeRule()) then
50+
tc:NegateEffects(e:GetHandler(),RESET_CONTROL)
51+
end
52+
end

0 commit comments

Comments
 (0)