Skip to content

Commit 8520c01

Browse files
authored
"Nouvelles" fixes
- "Balameuniere de Nouvelles" and "Baelgrill de Nouvelles" should be treated as Special Summoned by the effect of a "Nouvelles" monster if they're summoned with the effect of "Chef de Nouvelles". - They should stop being treated as Special Summoned by the effect of a "Nouvelles" monster if they're later flipped face-down, but not if they're banished temporarily. - Will now have a hint on them indicating that they were summoned as such. - The last effect of "Chef de Nouvelles" should be negatable by effects like "Solemn Warning".
1 parent 74fd1b6 commit 8520c01

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

cards_specific_functions.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ end
3838

3939
--return if Card c was special summoned by the effect of a "Nouvelles" monster
4040
function Card.IsNouvellesSummoned(c)
41-
return c:IsSummonType(SUMMON_BY_NOUVELLES)
42-
end
43-
44-
--sp_summon condition for "Nouvellez" monsters
45-
function Auxiliary.nouvspcon(e,tp,eg,ep,ev,re,r,rp)
46-
return e:GetHandler():IsNouvellesSummoned()
41+
return c:HasFlagEffect(c:GetOriginalCode())
4742
end
4843

4944
--check for Spirit Elimination

official/c52495649.lua

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
local s,id=GetID()
55
function s.initial_effect(c)
66
c:EnableReviveLimit()
7+
--Register that it was Special Summoned by the effect of a "Nouvelles" monster
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
10+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
11+
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
12+
e0:SetCondition(s.regcon)
13+
e0:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end)
14+
c:RegisterEffect(e0)
715
--Add 1 "Nouvelles" or "Recipe" card to your hand
816
local e1=Effect.CreateEffect(c)
917
e1:SetDescription(aux.Stringid(id,0))
@@ -23,18 +31,29 @@ function s.initial_effect(c)
2331
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
2432
e2:SetRange(LOCATION_MZONE)
2533
e2:SetCountLimit(1,{id,1})
26-
e2:SetCondition(aux.NOT(aux.nouvspcon))
34+
e2:SetCondition(function(e) return not e:GetHandler():IsNouvellesSummoned() end)
2735
e2:SetTarget(s.sptg)
2836
e2:SetOperation(s.spop)
2937
c:RegisterEffect(e2)
3038
local e3=e2:Clone()
3139
e3:SetType(EFFECT_TYPE_QUICK_O)
3240
e3:SetCode(EVENT_FREE_CHAIN)
3341
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E)
34-
e3:SetCondition(aux.nouvspcon)
42+
e3:SetCondition(function(e) return e:GetHandler():IsNouvellesSummoned() end)
3543
c:RegisterEffect(e3)
3644
end
3745
s.listed_series={SET_NOUVELLES,SET_RECIPE}
46+
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
47+
if not (re and re:IsMonsterEffect()) then return false end
48+
local rc=re:GetHandler()
49+
local trig_loc,trig_setcodes=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SETCODES)
50+
if not Duel.IsChainSolving() or (rc:IsRelateToEffect(re) and rc:IsFaceup() and rc:IsLocation(trig_loc)) then
51+
return rc:IsSetCard(SET_NOUVELLES)
52+
end
53+
for _,set in ipairs(trig_setcodes) do
54+
if (SET_NOUVELLES&0xfff)==(set&0xfff) and (SET_NOUVELLES&set)==SET_NOUVELLES then return true end
55+
end
56+
end
3857
function s.thfilter(c)
3958
return c:IsSetCard({SET_NOUVELLES,SET_RECIPE}) and c:IsAbleToHand()
4059
end

official/c88890658.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
local s,id=GetID()
55
function s.initial_effect(c)
66
c:EnableReviveLimit()
7+
--Register that it was Special Summoned by the effect of a "Nouvelles" monster
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
10+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
11+
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
12+
e0:SetCondition(s.regcon)
13+
e0:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end)
14+
c:RegisterEffect(e0)
715
--Negate the effects of all cards the opponent controls
816
local e1=Effect.CreateEffect(c)
917
e1:SetDescription(aux.Stringid(id,0))
@@ -31,6 +39,17 @@ function s.initial_effect(c)
3139
end
3240
s.listed_series={SET_RECIPE,SET_NOUVELLES}
3341
s.listed_names={30243636}
42+
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
43+
if not (re and re:IsMonsterEffect()) then return false end
44+
local rc=re:GetHandler()
45+
local trig_loc,trig_setcodes=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SETCODES)
46+
if not Duel.IsChainSolving() or (rc:IsRelateToEffect(re) and rc:IsFaceup() and rc:IsLocation(trig_loc)) then
47+
return rc:IsSetCard(SET_NOUVELLES)
48+
end
49+
for _,set in ipairs(trig_setcodes) do
50+
if (SET_NOUVELLES&0xfff)==(set&0xfff) and (SET_NOUVELLES&set)==SET_NOUVELLES then return true end
51+
end
52+
end
3453
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
3554
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end
3655
local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil)

pre-release/c101301023.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function s.initial_effect(c)
6363
--Apply the effects of a 1 "Recipe" Ritual Spell
6464
local e5=Effect.CreateEffect(c)
6565
e5:SetDescription(aux.Stringid(id,4))
66+
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
6667
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
6768
e5:SetProperty(EFFECT_FLAG_DELAY)
6869
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
@@ -176,4 +177,4 @@ function s.applyop(e,tp,eg,ep,ev,re,r,rp)
176177
te:SetLabel(e:GetLabel())
177178
te:SetLabelObject(e:GetLabelObject())
178179
end
179-
end
180+
end

0 commit comments

Comments
 (0)