Skip to content

Commit 44307f7

Browse files
authored
Update "Conduction Warrior Linear Magnum ± (Anime)"
- Text does not indicate that monster is a form of Nomi, so special summon limit was removed - ATK gain appears to be listed as a continuous effect that applies entirely on the field at all times instead of during battle, updated effect text to reflect it and implemented script changes. - Cleaned up summon cost check - General script polish/modernization updates.
1 parent 5515f46 commit 44307f7

File tree

1 file changed

+36
-56
lines changed

1 file changed

+36
-56
lines changed

unofficial/c170000116.lua

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,70 @@
1-
--超電導戦士 リニア・マグナム±
2-
--Conduction Warrior Linear Magnum ±
1+
--超電導戦士 リニア・マグナム± (Anime)
2+
--Conduction Warrior Linear Magnum ± (Anime)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
c:EnableReviveLimit()
6-
--special summon
5+
--Special Summon this card from your hand by sending 1 "Magnet Warrior Σ+" and 1 "Magnet Warrior Ω-" from your hand or field to the GY
76
local e1=Effect.CreateEffect(c)
87
e1:SetDescription(aux.Stringid(id,0))
98
e1:SetType(EFFECT_TYPE_FIELD)
10-
e1:SetCode(EFFECT_SPSUMMON_PROC)
119
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
10+
e1:SetCode(EFFECT_SPSUMMON_PROC)
1211
e1:SetRange(LOCATION_HAND)
1312
e1:SetCondition(s.spcon)
1413
e1:SetTarget(s.sptg)
1514
e1:SetOperation(s.spop)
1615
c:RegisterEffect(e1)
17-
--Increase ATK
16+
--Gains ATK equal to half the total ATK of all Plus and Minus monsters the field
1817
local e2=Effect.CreateEffect(c)
19-
e2:SetDescription(aux.Stringid(id,1))
20-
e2:SetCategory(CATEGORY_ATKCHANGE)
21-
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22-
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
23-
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
24-
e2:SetTarget(s.atkgtg)
25-
e2:SetOperation(s.atkgop)
18+
e2:SetType(EFFECT_TYPE_SINGLE)
19+
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
20+
e2:SetCode(EFFECT_UPDATE_ATTACK)
21+
e2:SetRange(LOCATION_MZONE)
22+
e2:SetValue(s.atkval)
2623
c:RegisterEffect(e2)
2724
end
28-
function s.spfilter(c,tpe)
29-
return c:IsType(tpe) and c:IsAbleToGraveAsCost()
25+
s.listed_names={170000111,170000112} --"Magnet Warrior Σ+", "Magnet Warrior Ω-"
26+
function s.chk(c,sg,g,code,...)
27+
if not c:IsCode(code) then return false end
28+
local res
29+
if ... then
30+
g:AddCard(c)
31+
res=sg:IsExists(s.chk,1,g,sg,g,...)
32+
g:RemoveCard(c)
33+
else
34+
res=true
35+
end
36+
return res
3037
end
3138
function s.rescon(sg,e,tp,mg)
32-
return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg)
33-
end
34-
function s.chk(c,sg)
35-
return c:IsType(TYPE_PLUS) and sg:IsExists(Card.IsType,1,c,TYPE_MINUS)
39+
return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg,Group.CreateGroup(),170000111,170000112)
3640
end
3741
function s.spcon(e,c)
3842
if c==nil then return true end
3943
local tp=c:GetControler()
40-
local g1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,TYPE_PLUS)
41-
local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,TYPE_MINUS)
44+
local rg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_MZONE,0,nil)
45+
local g1=rg:Filter(Card.IsCode,nil,170000111)
46+
local g2=rg:Filter(Card.IsCode,nil,170000112)
4247
local g=g1:Clone()
4348
g:Merge(g2)
44-
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #g1>0 and #g2>0 and #g>1
45-
and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0)
49+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #g1>0 and #g2>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0)
4650
end
4751
function s.sptg(e,tp,eg,ep,ev,re,r,rp,c)
48-
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,TYPE_PLUS+TYPE_MINUS)
49-
local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TOGRAVE,nil,nil,true)
50-
local cg=sg:Filter(Card.IsFacedown,nil)
51-
if #cg>0 then
52-
Duel.ConfirmCards(1-tp,cg)
53-
end
54-
if #sg>0 then
55-
sg:KeepAlive()
56-
e:SetLabelObject(sg)
57-
return true
52+
local rg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_MZONE,0,nil):Filter(Card.IsCode,nil,170000111,170000112)
53+
local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_TOGRAVE,nil,nil,true)
54+
if #g>0 then
55+
g:KeepAlive()
56+
e:SetLabelObject(g)
57+
return true
5858
end
5959
return false
6060
end
6161
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
6262
local g=e:GetLabelObject()
6363
if not g then return end
6464
Duel.SendtoGrave(g,REASON_COST)
65-
c:SetMaterial(g)
6665
g:DeleteGroup()
6766
end
68-
function s.filter(c)
69-
return c:IsFaceup() and c:IsType(TYPE_PLUS+TYPE_MINUS)
70-
end
71-
function s.atkgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
72-
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) and chkc~=e:GetHandler() end
73-
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
74-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
75-
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
67+
function s.atkval(e,c)
68+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_PLUS|TYPE_MINUS),c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c)
69+
return g:GetSum(Card.GetBaseAttack)/2
7670
end
77-
function s.atkgop(e,tp,eg,ep,ev,re,r,rp)
78-
local c=e:GetHandler()
79-
local tc=Duel.GetFirstTarget()
80-
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:IsFaceup() then
81-
local atk=tc:GetAttack()/2
82-
if atk<0 then return end
83-
local e1=Effect.CreateEffect(c)
84-
e1:SetType(EFFECT_TYPE_SINGLE)
85-
e1:SetCode(EFFECT_UPDATE_ATTACK)
86-
e1:SetValue(atk)
87-
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END)
88-
c:RegisterEffect(e1)
89-
end
90-
end

0 commit comments

Comments
 (0)