Skip to content

Commit acd5b5d

Browse files
authored
Update "Magnet Force (Anime)"
Should be sent to the GY instead of remaining the field.
1 parent 9013c61 commit acd5b5d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

unofficial/c511000302.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ function s.initial_effect(c)
88
e1:SetCode(EVENT_FREE_CHAIN)
99
e1:SetTarget(s.target)
1010
c:RegisterEffect(e1)
11-
--Remain field
11+
--This card remains on the field until the end of the turn
1212
local e2=Effect.CreateEffect(c)
1313
e2:SetType(EFFECT_TYPE_SINGLE)
1414
e2:SetCode(EFFECT_REMAIN_FIELD)
1515
c:RegisterEffect(e2)
16-
--Redirect
16+
--If a Rock or Machine monster you control would be the target of an effect, you can make that effect target monsters your opponent controls instead
1717
local e3=Effect.CreateEffect(c)
1818
e3:SetDescription(aux.Stringid(id,0))
1919
e3:SetType(EFFECT_TYPE_QUICK_O)
@@ -31,11 +31,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
3131
local e1=Effect.CreateEffect(c)
3232
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
3333
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
34-
e1:SetCode(EVENT_TURN_END)
34+
e1:SetCode(EVENT_PHASE|PHASE_END)
3535
e1:SetCountLimit(1)
3636
e1:SetRange(LOCATION_SZONE)
3737
e1:SetOperation(function() Duel.SendtoGrave(c,REASON_RULE) end)
38-
e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END)
38+
e1:SetReset(RESETS_STANDARD_PHASE_END)
3939
c:RegisterEffect(e1)
4040
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_CHAINING,true)
4141
if res and s.redirectCon(e,tp,teg,tep,tev,tre,tr,trp) and s.redirectTg(e,tp,teg,tep,tev,tre,tr,trp,0)
@@ -48,19 +48,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
4848
e:SetOperation(nil)
4949
end
5050
end
51-
function s.filter(c,p)
52-
return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_ROCK) and c:IsControler(p) and c:IsLocation(LOCATION_MZONE)
51+
function s.rockmachinefilter(c,p)
52+
return c:IsFaceup() and c:IsRace(RACE_MACHINE|RACE_ROCK) and c:IsControler(p) and c:IsLocation(LOCATION_MZONE)
5353
end
5454
function s.redirectCon(e,tp,eg,ep,ev,re,r,rp)
5555
if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
5656
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
57-
return g:IsExists(s.filter,1,nil,tp)
57+
return g:IsExists(s.rockmachinefilter,1,nil,tp)
5858
end
5959
function s.redirectTg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
6060
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
61-
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):FilterCount(s.filter,nil,tp),nil) end
61+
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):FilterCount(s.rockmachinefilter,nil,tp),nil) end
6262
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
63-
local g=tg:Filter(s.filter,nil,tp)
63+
local g=tg:Filter(s.rockmachinefilter,nil,tp)
6464
local g2=(tg-g):KeepAlive()
6565
e:SetLabelObject(g2)
6666
g2:ForEach(function(c) c:CreateEffectRelation(e) end)
@@ -71,4 +71,4 @@ function s.redirectOp(e,tp,eg,ep,ev,re,r,rp)
7171
local tg=Duel.GetTargetCards(e)
7272
local g=e:GetLabelObject():Filter(Card.IsRelateToEffect,nil,e)
7373
Duel.ChangeTargetCard(ev+(e:IsHasType(EFFECT_TYPE_ACTIVATE) and 1 or 0),tg+g)
74-
end
74+
end

0 commit comments

Comments
 (0)