Skip to content

Commit 055b700

Browse files
authored
"Verre Magic - Lacrima of Light" + "Volcanic Emission" fix
Applying their activation effect via another card (e.g. "Witchcrafter Genni" or "Transaction Rollback") should ignore the "you can only use each effect of "..." once per turn" condition.
1 parent 8f78f42 commit 055b700

File tree

3 files changed

+60
-41
lines changed

3 files changed

+60
-41
lines changed

official/c58143766.lua

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ function s.initial_effect(c)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetType(EFFECT_TYPE_ACTIVATE)
1010
e1:SetCode(EVENT_FREE_CHAIN)
11-
e1:SetHintTiming(0,TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E)
11+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E)
12+
e1:SetCost(s.effcost)
1213
e1:SetTarget(s.efftg)
1314
e1:SetOperation(s.effop)
1415
c:RegisterEffect(e1)
@@ -20,22 +21,32 @@ end
2021
function s.damfilter(c)
2122
return c:IsRace(RACE_PYRO) and c:IsFaceup() and c:GetBaseAttack()>0
2223
end
23-
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
24-
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.damfilter(chkc) end
24+
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
25+
e:SetLabel(-100)
2526
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
2627
local b1=not Duel.HasFlagEffect(tp,id)
2728
and Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft)
2829
local b2=not Duel.HasFlagEffect(tp,id+1)
2930
and Duel.IsExistingTarget(s.damfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
3031
if chk==0 then return b1 or b2 end
32+
end
33+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
34+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.damfilter(chkc) end
35+
local cost_skip=e:GetLabel()~=-100
36+
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
37+
local b1=(cost_skip or not Duel.HasFlagEffect(tp,id))
38+
and Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft)
39+
local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1))
40+
and Duel.IsExistingTarget(s.damfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
41+
if chk==0 then e:SetLabel(0) return b1 or b2 end
3142
local op=Duel.SelectEffect(tp,
3243
{b1,aux.Stringid(id,1)},
3344
{b2,aux.Stringid(id,2)})
3445
e:SetLabel(op)
3546
if op==1 then
3647
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
3748
e:SetProperty(0)
38-
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
49+
if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end
3950
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
4051
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
4152
elseif op==2 then
@@ -47,7 +58,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4758
local ctrl=tc:GetControler()
4859
if ctrl==tp then dam=dam//2 end
4960
Duel.SetTargetParam(ctrl)
50-
Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1)
61+
if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end
5162
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
5263
end
5364
end
@@ -73,12 +84,13 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
7384
aux.Stringid(id,4)
7485
)
7586
elseif op==2 then
76-
--Inflict damage to your opponent
87+
--Inflict damage to your opponent equal to that monster's original ATK
7788
local tc=Duel.GetFirstTarget()
78-
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
79-
local dam=tc:GetBaseAttack()
80-
local ctrl=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
81-
if ctrl==tp then dam=dam//2 end
82-
Duel.Damage(1-tp,dam,REASON_EFFECT)
89+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
90+
local dam=tc:GetBaseAttack()
91+
local ctrl=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
92+
if ctrl==tp then dam=dam//2 end
93+
Duel.Damage(1-tp,dam,REASON_EFFECT)
94+
end
8395
end
8496
end

official/c64756282.lua

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
--Scripted by ahtelel
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Special Summon 1 "Witchcrafter" from your Deck
6+
--Special Summon 1 "Witchcrafter" monster from your Deck
77
local e1=Effect.CreateEffect(c)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
1010
e1:SetType(EFFECT_TYPE_QUICK_O)
1111
e1:SetCode(EVENT_FREE_CHAIN)
1212
e1:SetRange(LOCATION_MZONE)
1313
e1:SetCountLimit(1,id)
14-
e1:SetHintTiming(0,TIMING_MAIN_END)
14+
e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
1515
e1:SetCondition(function() return Duel.IsMainPhase() end)
1616
e1:SetCost(aux.WitchcrafterDiscardAndReleaseCost)
1717
e1:SetTarget(s.sptg)
@@ -23,8 +23,8 @@ function s.initial_effect(c)
2323
e2:SetType(EFFECT_TYPE_IGNITION)
2424
e2:SetRange(LOCATION_GRAVE)
2525
e2:SetCountLimit(1,{id,1})
26-
e2:SetTarget(s.target)
27-
e2:SetOperation(s.operation)
26+
e2:SetTarget(s.efftg)
27+
e2:SetOperation(s.effop)
2828
c:RegisterEffect(e2)
2929
end
3030
s.listed_names={id}
@@ -47,37 +47,30 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
4747
end
4848
function s.copyfilter(c)
4949
return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpell() and c:IsAbleToRemoveAsCost()
50-
and c:CheckActivateEffect(false,true,false)~=nil
51-
and c:CheckActivateEffect(false,true,false):GetOperation()~=nil
50+
and c:CheckActivateEffect(true,true,false)~=nil
51+
and c:CheckActivateEffect(true,true,false):GetOperation()~=nil
5252
end
53-
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
54-
if chkc then
55-
local te=e:GetLabelObject()
56-
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
57-
end
53+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
5854
local c=e:GetHandler()
5955
if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.copyfilter,tp,LOCATION_GRAVE,0,1,nil) end
6056
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
61-
local tc=Duel.SelectMatchingCard(tp,s.copyfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
62-
Duel.Remove(Group.FromCards(tc,c),POS_FACEUP,REASON_COST)
63-
local te=tc:CheckActivateEffect(true,true,false)
64-
e:SetLabel(te:GetLabel())
65-
e:SetLabelObject(te:GetLabelObject())
57+
local sc=Duel.SelectTarget(tp,s.copyfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
58+
Duel.Remove(Group.FromCards(sc,c),POS_FACEUP,REASON_COST)
59+
local te,ceg,cep,cev,cre,cr,crp=sc:CheckActivateEffect(false,true,true)
60+
Duel.ClearTargetCard()
6661
local tg=te:GetTarget()
67-
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
68-
te:SetLabel(e:GetLabel())
62+
e:SetProperty(te:GetProperty())
63+
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
6964
te:SetLabelObject(e:GetLabelObject())
7065
e:SetLabelObject(te)
7166
Duel.ClearOperationInfo(0)
7267
end
73-
function s.operation(e,tp,eg,ep,ev,re,r,rp)
68+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
7469
local te=e:GetLabelObject()
75-
if te then
76-
e:SetLabel(te:GetLabel())
77-
e:SetLabelObject(te:GetLabelObject())
78-
local op=te:GetOperation()
79-
if op then op(e,tp,eg,ep,ev,re,r,rp) end
80-
te:SetLabel(e:GetLabel())
81-
te:SetLabelObject(e:GetLabelObject())
70+
if not te then return end
71+
e:SetLabelObject(te:GetLabelObject())
72+
local op=te:GetOperation()
73+
if op then
74+
op(e,tp,eg,ep,ev,re,r,rp)
8275
end
83-
end
76+
end

official/c73664385.lua

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ function s.initial_effect(c)
99
e1:SetType(EFFECT_TYPE_ACTIVATE)
1010
e1:SetCode(EVENT_FREE_CHAIN)
1111
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
12+
e1:SetCost(s.effcost)
1213
e1:SetTarget(s.efftg)
1314
e1:SetOperation(s.effop)
1415
c:RegisterEffect(e1)
@@ -20,7 +21,8 @@ end
2021
function s.spfilter(c,e,tp)
2122
return c:IsSetCard({SET_MAGISTUS,SET_WITCHCRAFTER}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
2223
end
23-
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
24+
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
25+
e:SetLabel(-100)
2426
local b1=not Duel.HasFlagEffect(tp,id)
2527
and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_MAGISTUS,SET_WITCHCRAFTER}),tp,LOCATION_MZONE,0,1,nil)
2628
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
@@ -29,17 +31,29 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
2931
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp)
3032
and event_chaining and event_player==1-tp
3133
if chk==0 then return b1 or b2 end
34+
end
35+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
local cost_skip=e:GetLabel()~=-100
37+
local b1=(cost_skip or (not Duel.HasFlagEffect(tp,id)
38+
and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_MAGISTUS,SET_WITCHCRAFTER}),tp,LOCATION_MZONE,0,1,nil)))
39+
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
40+
local event_chaining,_,event_player=Duel.CheckEvent(EVENT_CHAINING,true)
41+
local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1))
42+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
43+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp)
44+
and event_chaining and event_player==1-tp
45+
if chk==0 then e:SetLabel(0) return b1 or b2 end
3246
local op=Duel.SelectEffect(tp,
3347
{b1,aux.Stringid(id,1)},
3448
{b2,aux.Stringid(id,2)})
3549
e:SetLabel(op)
3650
if op==1 then
3751
e:SetCategory(CATEGORY_TOGRAVE)
38-
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
52+
if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end
3953
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
4054
elseif op==2 then
4155
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
42-
Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1)
56+
if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end
4357
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
4458
end
4559
end

0 commit comments

Comments
 (0)