Skip to content

Commit 6beb2a1

Browse files
authored
Update "Cyberdark Scheme"
- Prevent script error from incorrect location constant - Notations for effect clarity
1 parent 34b92d0 commit 6beb2a1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

skill/c300308011.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ end
2020
function s.flipcon(e,tp,eg,ep,ev,re,r,rp)
2121
local ft=Duel.GetLocationCount(tp,LOCATION_STZONE)
2222
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil)
23-
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_STZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0
23+
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0
2424
return aux.CanActivateSkill(tp) and (b1 or b2)
2525
end
2626
function s.flipop(e,tp,eg,ep,ev,re,r,rp)
@@ -29,15 +29,16 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp)
2929
local c=e:GetHandler()
3030
local ft=Duel.GetLocationCount(tp,LOCATION_STZONE)
3131
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil)
32-
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_STZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0
32+
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_MZONE,1,1,nil) and ft>-1 and Duel.GetFlagEffect(tp,id)==0
3333
local op=Duel.SelectEffect(tp,{b1,aux.Stringid(id,0)},{b2,aux.Stringid(id,1)})
3434
if op==1 then
35+
--Return 1 "Cyberdark" monster you control to your hand to Normal Summon 1 "Cyberdark" monster from your hand
3536
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
3637
local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
3738
if tc:IsFacedown() then
3839
Duel.ConfirmCards(tp,tc)
3940
end
40-
if tc and Duel.SendtoHand(tc,tp,REASON_COST)>0 and tc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
41+
if tc and Duel.SendtoHand(tc,tp,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
4142
Duel.BreakEffect()
4243
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
4344
local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
@@ -46,12 +47,14 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp)
4647
end
4748
end
4849
elseif op==2 then
50+
--OPD register
4951
Duel.RegisterFlagEffect(tp,id,0,0,0)
52+
--Equip 1 monster your opponent controls to a "Cyberdark"
5053
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
51-
local gc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_STZONE,0,1,1,nil):GetFirst()
54+
local gc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_SZONE,0,1,1,nil):GetFirst()
5255
if Duel.SendtoGrave(gc,REASON_COST)>0 then
5356
local ec=gc:GetPreviousEquipTarget()
54-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
5558
local sc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
5659
if sc and sc:IsAbleToChangeControler() then
5760
Duel.HintSelection(sc)
@@ -75,10 +78,7 @@ function s.eqop(c,e,tp,tc,atk)
7578
e2:SetType(EFFECT_TYPE_SINGLE)
7679
e2:SetCode(EFFECT_EQUIP_LIMIT)
7780
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
78-
e2:SetValue(s.eqlimit)
81+
e2:SetValue(function(e,c) return c:GetControler()==e:GetHandlerPlayer() end)
7982
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
8083
tc:RegisterEffect(e2)
8184
end
82-
function s.eqlimit(e,c)
83-
return c:GetControler()==e:GetHandlerPlayer()
84-
end

0 commit comments

Comments
 (0)