Skip to content

Commit 73fae06

Browse files
committed
"Aiwass, the Magistus Spell Spirit" fix
Fixed a bug where the effects to gain control and to prevent the equipped monster from attacking would not be reset
1 parent 41c6102 commit 73fae06

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

official/c35877582.lua

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
--法典の守護者アイワス
2-
--Magistus Saint Aiwass
2+
--Aiwass, the Magistus Spell Spirit
33
--Scripted by AlphaKretin
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Fusion Material
76
c:EnableReviveLimit()
8-
Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x152),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER))
9-
--Equip to other monster
7+
--Fusion Materials: 1 "Magistus" monster + 1 Spellcaster monster
8+
Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MAGISTUS),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER))
9+
--Equip this card from to another monster
1010
local e1=Effect.CreateEffect(c)
1111
e1:SetDescription(aux.Stringid(id,0))
1212
e1:SetCategory(CATEGORY_EQUIP)
@@ -16,7 +16,7 @@ function s.initial_effect(c)
1616
e1:SetCountLimit(1,id)
1717
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
1818
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
19-
e1:SetCondition(s.eqcon)
19+
e1:SetCondition(function() return Duel.IsMainPhase() end)
2020
e1:SetTarget(s.eqtg)
2121
e1:SetOperation(s.eqop)
2222
c:RegisterEffect(e1)
@@ -30,10 +30,7 @@ function s.initial_effect(c)
3030
e3:SetCode(EFFECT_UPDATE_DEFENSE)
3131
c:RegisterEffect(e3)
3232
end
33-
s.listed_series={0x152}
34-
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
35-
return Duel.IsMainPhase()
36-
end
33+
s.listed_series={SET_MAGISTUS}
3734
function s.eqfilter(c,tp,ft,mmz)
3835
return c:IsFaceup() and (ft>0 or c:IsControler(tp) or mmz)
3936
end
@@ -46,7 +43,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4643
and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,ft,mmz) end
4744
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
4845
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp,ft,mmz)
49-
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
46+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0)
5047
end
5148
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
5249
local c=e:GetHandler()
@@ -69,11 +66,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
6966
local e2=Effect.CreateEffect(c)
7067
e2:SetType(EFFECT_TYPE_EQUIP)
7168
e2:SetCode(EFFECT_CANNOT_TRIGGER)
69+
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
7270
c:RegisterEffect(e2)
7371
--Take control of equipped monster
7472
local e3=Effect.CreateEffect(c)
7573
e3:SetType(EFFECT_TYPE_EQUIP)
7674
e3:SetCode(EFFECT_SET_CONTROL)
75+
e3:SetReset(RESET_EVENT|RESETS_STANDARD)
7776
e3:SetValue(s.ctval)
7877
c:RegisterEffect(e3)
7978
end
@@ -83,4 +82,4 @@ function s.eqlimit(e,c)
8382
end
8483
function s.ctval(e,c)
8584
return e:GetHandlerPlayer()
86-
end
85+
end

0 commit comments

Comments
 (0)