Skip to content

Commit bc493e3

Browse files
committed
"Dimension Fortress Weapon" and "Stellarknight Constellar Diamond" fix
Fixed a bug in which they would make cards that tribute from the Deck to be unable to send the card(s) to the GY, which should not happen.
1 parent 9ede064 commit bc493e3

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

official/c1596508.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22
--Dimension Fortress Weapon
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--
5+
--Cards cannot be sent from the Deck to the GY
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_FIELD)
88
e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
9+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
910
e1:SetRange(LOCATION_MZONE)
10-
e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK)
11+
e1:SetTargetRange(1,1)
12+
e1:SetTarget(s.tgfilter)
1113
c:RegisterEffect(e1)
12-
--
1314
local e2=Effect.CreateEffect(c)
1415
e2:SetType(EFFECT_TYPE_FIELD)
1516
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
1617
e2:SetCode(EFFECT_CANNOT_DISCARD_DECK)
1718
e2:SetRange(LOCATION_MZONE)
1819
e2:SetTargetRange(1,1)
1920
c:RegisterEffect(e2)
21+
end
22+
function s.tgfilter(e,c,rp,r)
23+
return c:IsLocation(LOCATION_DECK) and (r&REASON_RELEASE)==0
2024
end

official/c9272381.lua

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
--Stellarknight Constellar Diamond
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--xyz summon
6-
Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,s.ovfilter,aux.Stringid(id,0),Xyz.InfiniteMats)
75
c:EnableReviveLimit()
8-
--
6+
--Xyz Summon procedure: 3+ Level 5 LIGHT monsters OR During your Main Phase 2, you can also Xyz Summon this card by using a "tellarknight" Xyz Monster you control as material, except "Stellarknight Constellar Diamond"
7+
Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,s.ovfilter,aux.Stringid(id,0),Xyz.InfiniteMats)
8+
--While this card has material, neither player can send cards from the Deck to the GY
99
local e1=Effect.CreateEffect(c)
1010
e1:SetType(EFFECT_TYPE_FIELD)
1111
e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
1212
e1:SetRange(LOCATION_MZONE)
13-
e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK)
13+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
14+
e1:SetTargetRange(1,1)
1415
e1:SetCondition(s.effcon)
16+
e1:SetTarget(s.tgfilter)
1517
c:RegisterEffect(e1)
16-
--
1718
local e2=Effect.CreateEffect(c)
1819
e2:SetType(EFFECT_TYPE_FIELD)
1920
e2:SetCode(EFFECT_CANNOT_DISCARD_DECK)
@@ -22,7 +23,7 @@ function s.initial_effect(c)
2223
e2:SetTargetRange(1,1)
2324
e2:SetCondition(s.effcon)
2425
c:RegisterEffect(e2)
25-
--
26+
--Any card that returns from the GY to the hand is banished instead
2627
local e3=Effect.CreateEffect(c)
2728
e3:SetType(EFFECT_TYPE_FIELD)
2829
e3:SetCode(EFFECT_TO_HAND_REDIRECT)
@@ -31,7 +32,7 @@ function s.initial_effect(c)
3132
e3:SetValue(LOCATION_REMOVED)
3233
e3:SetCondition(s.effcon)
3334
c:RegisterEffect(e3)
34-
--Negate
35+
--When an opponent's DARK monster's effect is activated (Quick Effect): You can detach 1 material from this card; negate that activation, and if you do, destroy it
3536
local e4=Effect.CreateEffect(c)
3637
e4:SetDescription(aux.Stringid(id,1))
3738
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
@@ -49,11 +50,14 @@ function s.ovfilter(c,tp,xyzc)
4950
return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp)
5051
and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and Duel.IsPhase(PHASE_MAIN2)
5152
end
53+
function s.tgfilter(e,c,rp,r)
54+
return c:IsLocation(LOCATION_DECK) and (r&REASON_RELEASE)==0
55+
end
5256
function s.effcon(e)
5357
return e:GetHandler():GetOverlayCount()>0
5458
end
5559
function s.condition(e,tp,eg,ep,ev,re,r,rp)
56-
return ep~=tp and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and Duel.IsChainNegatable(ev)
60+
return ep==1-tp and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and Duel.IsChainNegatable(ev)
5761
end
5862
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
5963
if chk==0 then return true end

0 commit comments

Comments
 (0)