Skip to content

Commit 35cb7ff

Browse files
authored
Update c23912837.lua
1 parent 4b245b9 commit 35cb7ff

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

official/c23912837.lua

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@
33
--Scripted by Eerie Code
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Special Summon 1 "Shaddoll" monster from your GY
6+
--Special Summon 1 "Shaddoll" monster from your GY in face-up or face-down Defense Position
77
local e1=Effect.CreateEffect(c)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
1010
e1:SetType(EFFECT_TYPE_ACTIVATE)
11-
e1:SetCode(EVENT_FREE_CHAIN)
1211
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetCode(EVENT_FREE_CHAIN)
1313
e1:SetCountLimit(1,id)
14+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
1415
e1:SetTarget(s.sptg)
1516
e1:SetOperation(s.spop)
1617
c:RegisterEffect(e1)
17-
--Activate one of these effects
18+
--Activate 1 of these effects
1819
local e2=Effect.CreateEffect(c)
19-
e2:SetDescription(aux.Stringid(id,0))
20+
e2:SetDescription(aux.Stringid(id,1))
2021
e2:SetCategory(CATEGORY_POSITION)
2122
e2:SetType(EFFECT_TYPE_QUICK_O)
2223
e2:SetCode(EVENT_FREE_CHAIN)
2324
e2:SetRange(LOCATION_GRAVE)
2425
e2:SetCountLimit(1,id)
26+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
2527
e2:SetCost(s.effcost)
2628
e2:SetTarget(s.efftg)
2729
e2:SetOperation(s.effop)
@@ -41,48 +43,46 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4143
end
4244
function s.spop(e,tp,eg,ep,ev,re,r,rp)
4345
local tc=Duel.GetFirstTarget()
44-
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)>0 then
45-
if tc:IsFacedown() then
46-
Duel.ConfirmCards(1-tp,tc)
47-
end
46+
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)>0 and tc:IsFacedown() then
47+
Duel.ConfirmCards(1-tp,tc)
4848
end
4949
end
50-
function s.cfilter(c)
50+
function s.effcostfilter(c)
5151
return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToRemoveAsCost()
5252
end
5353
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
5454
local c=e:GetHandler()
55-
if chk==0 then return Cost.SelfBanish(e,tp,eg,ep,ev,re,r,rp,0)
56-
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,c) end
55+
if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_GRAVE,0,1,c) end
5756
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
58-
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,c)
59-
g:AddCard(c)
60-
Duel.Remove(g,POS_FACEUP,REASON_COST)
57+
local g=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_GRAVE,0,1,1,c)
58+
Duel.Remove(g+c,POS_FACEUP,REASON_COST)
6159
end
6260
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
63-
local b1=Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil)
64-
local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCanTurnSet),tp,LOCATION_MZONE,0,1,nil)
61+
local b1=Duel.IsExistingMatchingCard(aux.AND(Card.IsFacedown,Card.IsCanChangePosition),tp,LOCATION_MZONE,0,1,nil)
62+
local b2=Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,nil)
6563
if chk==0 then return b1 or b2 end
6664
local op=Duel.SelectEffect(tp,
6765
{b1,aux.Stringid(id,2)},
6866
{b2,aux.Stringid(id,3)})
6967
e:SetLabel(op)
70-
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
68+
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,0)
7169
end
7270
function s.effop(e,tp,eg,ep,ev,re,r,rp)
7371
if op==1 then
72+
--Change 1 face-down monster you control to face-up Defense Position
7473
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
75-
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,1,nil)
74+
local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsCanChangePosition),tp,LOCATION_MZONE,0,1,1,nil)
7675
if #g>0 then
7776
Duel.HintSelection(g)
7877
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
7978
end
8079
elseif op==2 then
80+
--Change 1 face-up monster you control to face-down Defense Position
8181
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
82-
local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsCanTurnSet),tp,LOCATION_MZONE,0,1,1,nil)
82+
local g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,1,nil)
8383
if #g>0 then
8484
Duel.HintSelection(g)
8585
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
8686
end
8787
end
88-
end
88+
end

0 commit comments

Comments
 (0)