Skip to content

Commit e5dbe98

Browse files
authored
Various card script fixes
- Ectoplasmer: Should look at the Tributed card's printed ATK + the turn player selects what monster will be Tributed but the controller of this card performs the Tributing. - Indomitable Gladiator Beast: The ATK boost shouldn't be applied if your opponent controls the targeted monster on resolution or if it's no longer a "Gladiator Beast" monster + highlight the cards selected to be returned to the Deck for the cost of its 2nd effect. - Madolche Teacher Glassouffle: Her 2nd effect shouldn't be usable in the Damage Step + highlight the selected cards before returning them to the Deck(s). - Marincess Great Bubble Reef: Her 2nd effect should store the number of banished monsters the moment the event took place rather than checking the event group again on resolution. - Mark of the Rose: Fixed an issue where the changes from its effect being negated and enabled weren't reset properly when it left the field. - Silent Burning & The Revived Sky God: Shouldn't count themselves in the number of cards in the hand for the "each player draws until they have 6 cards in their hand" part of the activation check. - Teardrop the Rikka Queen: Her 2nd effect should work with Trap Monsters Tributed in the Monster Zone, but not with Monster Cards Tributed in the Spell & Trap Zone + it should store the number of Tributed monsters the moment the event took place rather than checking the event group again on resolution. - Vennu, Bright Bird of Divinity: Its 2nd effect should trigger if a Trap Monster in the Monster Zone is Tributed. - Various other script updates and small fixes. - Added 'Cost.Reveal' and updated some cards to use it. - If a monster in the Monster Zone is flipped face-down and back up again it shouldn't be treated as a monster that was Summoned that turn.
1 parent fe18daf commit e5dbe98

26 files changed

Lines changed: 475 additions & 503 deletions

official/c10441498.lua

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@
33
local s,id=GetID()
44
function s.initial_effect(c)
55
c:EnableReviveLimit()
6-
--Change level
6+
--Make the Level of 1 face-up monster on the field become equal to the Level of the revealed monster
77
local e1=Effect.CreateEffect(c)
88
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_LVCHANGE)
910
e1:SetType(EFFECT_TYPE_IGNITION)
10-
e1:SetRange(LOCATION_MZONE)
1111
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetRange(LOCATION_MZONE)
1213
e1:SetCountLimit(1)
14+
e1:SetCost(Cost.Reveal(function(c,e,tp)
15+
return c:HasLevel() and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel())
16+
end),nil,1,1,
17+
function(e,tp,g)
18+
e:SetLabel(g:GetFirst():GetLevel())
19+
end)
1320
e1:SetTarget(s.lvtg)
1421
e1:SetOperation(s.lvop)
1522
c:RegisterEffect(e1)
16-
--Add to hand
23+
--Add 1 monster from your GY to your hand
1724
local e2=Effect.CreateEffect(c)
1825
e2:SetDescription(aux.Stringid(id,1))
1926
e2:SetCategory(CATEGORY_TOHAND)
2027
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
21-
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
28+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
2229
e2:SetCode(EVENT_RELEASE)
2330
e2:SetRange(LOCATION_MZONE)
2431
e2:SetCountLimit(1)
@@ -27,43 +34,36 @@ function s.initial_effect(c)
2734
e2:SetOperation(s.thop)
2835
c:RegisterEffect(e2)
2936
end
30-
s.listed_names={47435107}
31-
function s.cfilter(c,tp)
32-
return c:IsLevelAbove(1) and not c:IsPublic() and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel())
33-
end
37+
s.listed_names={47435107} --"Primal Cry"
3438
function s.lvfilter(c,lv)
35-
return c:IsFaceup() and c:IsLevelAbove(1) and c:GetLevel()~=lv
39+
return c:HasLevel() and c:IsFaceup() and not c:IsLevel(lv)
3640
end
3741
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
3842
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc,e:GetLabel()) end
39-
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
40-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
41-
local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
42-
Duel.ConfirmCards(1-tp,cg)
43-
Duel.ShuffleHand(tp)
44-
local lv=cg:GetFirst():GetLevel()
45-
e:SetLabel(lv)
43+
if chk==0 then return true end
44+
local lv=e:GetLabel()
4645
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
47-
Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv)
46+
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv)
47+
Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,lv)
4848
end
4949
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
5050
local tc=Duel.GetFirstTarget()
51-
local lv=e:GetLabel()
52-
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
51+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
52+
--That target's Level becomes equal to the Level the revealed monster had, until the end of this turn
5353
local e1=Effect.CreateEffect(e:GetHandler())
5454
e1:SetType(EFFECT_TYPE_SINGLE)
55-
e1:SetCode(EFFECT_CHANGE_LEVEL)
5655
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
57-
e1:SetValue(lv)
56+
e1:SetCode(EFFECT_CHANGE_LEVEL)
57+
e1:SetValue(e:GetLabel())
5858
e1:SetReset(RESETS_STANDARD_PHASE_END)
5959
tc:RegisterEffect(e1)
6060
end
6161
end
62-
function s.thfilter2(c,tp)
63-
return c:IsMonster() and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) and c:IsPreviousControler(tp)
62+
function s.thconfilter(c,tp)
63+
return c:IsPreviousControler(tp) and (c:IsPreviousLocation(LOCATION_MZONE) or (c:IsPreviousLocation(LOCATION_HAND) and c:IsMonster()))
6464
end
6565
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
66-
return eg:IsExists(s.thfilter2,1,e:GetHandler(),tp)
66+
return eg:IsExists(s.thconfilter,1,nil,tp)
6767
end
6868
function s.thfilter(c)
6969
return c:IsMonster() and c:IsAbleToHand()
@@ -73,11 +73,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
7373
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
7474
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
7575
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
76-
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
76+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
7777
end
7878
function s.thop(e,tp,eg,ep,ev,re,r,rp)
7979
local tc=Duel.GetFirstTarget()
80-
if tc and tc:IsRelateToEffect(e) then
80+
if tc:IsRelateToEffect(e) then
8181
Duel.SendtoHand(tc,nil,REASON_EFFECT)
8282
end
8383
end

official/c14553285.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function s.initial_effect(c)
2626
e3:SetCategory(CATEGORY_DESTROY)
2727
e3:SetType(EFFECT_TYPE_IGNITION)
2828
e3:SetRange(LOCATION_MZONE)
29-
e3:SetCost(Cost.RemoveCounterFromSelf(2,COUNTER_SPELL))
29+
e3:SetCost(Cost.RemoveCounterFromSelf(COUNTER_SPELL,2))
3030
e3:SetTarget(s.destg)
3131
e3:SetOperation(s.desop)
3232
c:RegisterEffect(e3)

official/c20343502.lua

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
--Scripted by Eerie Code
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Must be properly summoned before reviving
76
c:EnableReviveLimit()
8-
--Xyz summon procedure
7+
--Xyz Summon procedure: 2 Level 4 "Madolche" monsters
98
Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MADOLCHE),4,2)
10-
--Targeted "Madolche" monster becomes unaffected by monster effects
9+
--Apply a "this turn, that face-up monster is unaffected by monster effects, except its own" effect to 1 "Madolche" monster on the field
1110
local e1=Effect.CreateEffect(c)
1211
e1:SetDescription(aux.Stringid(id,0))
1312
e1:SetType(EFFECT_TYPE_QUICK_O)
14-
e1:SetCode(EVENT_FREE_CHAIN)
1513
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
14+
e1:SetCode(EVENT_FREE_CHAIN)
1615
e1:SetRange(LOCATION_MZONE)
1716
e1:SetCountLimit(1,id)
1817
e1:SetCost(Cost.DetachFromSelf(1))
19-
e1:SetTarget(s.immtg)
20-
e1:SetOperation(s.immop)
21-
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE)
18+
e1:SetTarget(s.efftg)
19+
e1:SetOperation(s.effop)
20+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
2221
c:RegisterEffect(e1)
23-
--Shuffle up to 2 cards from either GY into deck
22+
--Shuffle up to 2 cards from the GYs into the Deck(s)
2423
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
2525
e2:SetCategory(CATEGORY_TODECK)
2626
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
27+
e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
2728
e2:SetCode(EVENT_TO_GRAVE)
28-
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
2929
e2:SetRange(LOCATION_MZONE)
3030
e2:SetCountLimit(1,{id,1})
3131
e2:SetCondition(s.tdcon)
@@ -34,38 +34,31 @@ function s.initial_effect(c)
3434
c:RegisterEffect(e2)
3535
end
3636
s.listed_series={SET_MADOLCHE}
37-
function s.immfilter(c)
38-
return c:IsSetCard(SET_MADOLCHE) and c:IsFaceup()
39-
end
40-
function s.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
41-
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.immfilter(chkc) end
42-
if chk==0 then return Duel.IsExistingTarget(s.immfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
43-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
44-
Duel.SelectTarget(tp,s.immfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
37+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
38+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_MADOLCHE) and chkc:IsFaceup() end
39+
if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_MADOLCHE),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO)
41+
Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_MADOLCHE),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
4542
end
46-
function s.immop(e,tp,eg,ep,ev,re,r,rp)
43+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
4744
local tc=Duel.GetFirstTarget()
48-
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
49-
--Unaffected by monster effects
45+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
46+
--This turn, that face-up monster is unaffected by monster effects, except its own
5047
local e1=Effect.CreateEffect(e:GetHandler())
5148
e1:SetDescription(3101)
5249
e1:SetType(EFFECT_TYPE_SINGLE)
53-
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
54-
e1:SetRange(LOCATION_MZONE)
50+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
5551
e1:SetCode(EFFECT_IMMUNE_EFFECT)
56-
e1:SetValue(s.efilter)
52+
e1:SetValue(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetHandler() end)
5753
e1:SetReset(RESETS_STANDARD_PHASE_END)
5854
tc:RegisterEffect(e1)
5955
end
6056
end
61-
function s.efilter(e,te)
62-
return te:IsMonsterEffect() and te:GetOwner()~=e:GetHandler()
63-
end
64-
function s.tdcfilter(c,tp)
57+
function s.tdconfilter(c,tp)
6558
return c:IsSetCard(SET_MADOLCHE) and c:IsControler(tp)
6659
end
6760
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
68-
return eg:IsExists(s.tdcfilter,1,nil,tp)
61+
return eg:IsExists(s.tdconfilter,1,nil,tp)
6962
end
7063
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
7164
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
@@ -75,6 +68,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
7568
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
7669
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
7770
if #g>0 then
71+
Duel.HintSelection(g)
7872
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
7973
end
80-
end
74+
end

official/c21113684.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function s.initial_effect(c)
2929
e3:SetType(EFFECT_TYPE_IGNITION)
3030
e3:SetRange(LOCATION_MZONE)
3131
e3:SetCountLimit(1)
32-
e3:SetCost(Cost.RemoveCounterFromField(1,COUNTER_SPELL))
32+
e3:SetCost(Cost.RemoveCounterFromField(COUNTER_SPELL,1))
3333
e3:SetTarget(s.efftg)
3434
e3:SetOperation(s.effop)
3535
c:RegisterEffect(e3)

official/c25311006.lua

Lines changed: 48 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,83 +3,72 @@
33
--Scripted by Eerie Code
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--activate
6+
--Activate 1 of these effects
77
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
89
e1:SetType(EFFECT_TYPE_ACTIVATE)
910
e1:SetCode(EVENT_FREE_CHAIN)
1011
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
11-
e1:SetCondition(s.condition)
12-
e1:SetTarget(s.target)
12+
e1:SetCondition(function(e,tp) return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end)
13+
e1:SetTarget(s.efftg)
14+
e1:SetOperation(s.effop)
1315
c:RegisterEffect(e1)
14-
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
16+
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not (Duel.IsMainPhase() and re:IsMonsterEffect()) end)
1517
end
16-
function s.chainfilter(re,tp,cid)
17-
return not (re:IsMonsterEffect() and Duel.IsMainPhase())
18-
end
19-
function s.condition(e,tp,eg,ep,ev,re,r,rp)
20-
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0
21-
end
22-
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
23-
local b1=s.drtg(e,tp,eg,ep,ev,re,r,rp,0)
24-
local b2=s.cttg(e,tp,eg,ep,ev,re,r,rp,0)
25-
local b3=s.tdtg(e,tp,eg,ep,ev,re,r,rp,0)
18+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
19+
local b1=Duel.IsPlayerCanDraw(tp,2)
20+
local b2=Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil)
21+
local b3=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
2622
if chk==0 then return b1 or b2 or b3 end
2723
local op=Duel.SelectEffect(tp,
28-
{b1,aux.Stringid(id,0)},
29-
{b2,aux.Stringid(id,1)},
30-
{b3,aux.Stringid(id,2)})
24+
{b1,aux.Stringid(id,1)},
25+
{b2,aux.Stringid(id,2)},
26+
{b3,aux.Stringid(id,3)})
27+
e:SetLabel(op)
3128
if op==1 then
3229
e:SetCategory(CATEGORY_DRAW)
3330
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
34-
e:SetOperation(s.drop)
35-
s.drtg(e,tp,eg,ep,ev,re,r,rp,1)
31+
Duel.SetTargetPlayer(tp)
32+
Duel.SetTargetParam(2)
33+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
3634
elseif op==2 then
3735
e:SetCategory(CATEGORY_CONTROL)
3836
e:SetProperty(0)
39-
e:SetOperation(s.ctop)
40-
s.cttg(e,tp,eg,ep,ev,re,r,rp,1)
37+
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0)
4138
elseif op==3 then
4239
e:SetCategory(CATEGORY_TODECK)
4340
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
44-
e:SetOperation(s.tdop)
45-
s.tdtg(e,tp,eg,ep,ev,re,r,rp,1)
41+
Duel.SetTargetPlayer(tp)
42+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_HAND)
4643
end
4744
end
48-
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
49-
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
50-
Duel.SetTargetPlayer(tp)
51-
Duel.SetTargetParam(2)
52-
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
53-
end
54-
function s.drop(e,tp,eg,ep,ev,re,r,rp)
55-
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
56-
Duel.Draw(p,d,REASON_EFFECT)
57-
end
58-
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
59-
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
60-
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE):Filter(Card.IsControlerCanBeChanged,nil)
61-
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
62-
end
63-
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
64-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
65-
local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
66-
if tc then
67-
Duel.GetControl(tc,tp,PHASE_END,1)
68-
end
69-
end
70-
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
71-
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
72-
Duel.SetTargetPlayer(tp)
73-
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_HAND)
74-
end
75-
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
76-
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
77-
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
78-
if #g>0 then
79-
Duel.ConfirmCards(p,g)
80-
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
81-
local sg=g:Select(p,1,1,nil)
82-
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
83-
Duel.ShuffleHand(1-p)
45+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
46+
local op=e:GetLabel()
47+
if op==1 then
48+
--Draw 2 cards
49+
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
50+
Duel.Draw(p,d,REASON_EFFECT)
51+
elseif op==2 then
52+
--Take control of 1 monster your opponent controls until the End Phase
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
54+
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
55+
if #g>0 then
56+
Duel.HintSelection(g)
57+
Duel.GetControl(g,tp,PHASE_END,1)
58+
end
59+
elseif op==3 then
60+
--Look at your opponent's hand, and choose 1 card from it to shuffle into the Deck
61+
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
62+
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
63+
if #g>0 then
64+
Duel.ConfirmCards(p,g)
65+
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
66+
local sg=g:Select(p,1,1,nil)
67+
if #sg>0 then
68+
Duel.HintSelection(sg)
69+
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
70+
end
71+
Duel.ShuffleHand(1-p)
72+
end
8473
end
8574
end

0 commit comments

Comments
 (0)