Skip to content

Commit 0aec77b

Browse files
authored
"D/D/D Super Doom King Bright Armageddon" fixes
- Should be able to target a "D/D/D" Synchro Monster with 0 ATK (as long as the opponent controls a monster with 0 DEF). - Any Trap Monsters that are still Traps that have their effects negated by this card's effect shoul only have their monster effects negated, not their Trap effects as well (they should stay in the Monster Zone).
1 parent 53d1f97 commit 0aec77b

File tree

1 file changed

+63
-87
lines changed

1 file changed

+63
-87
lines changed

official/c72402069.lua

Lines changed: 63 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,108 @@
1-
--DDD超死偉王ホワイテスト・ヘル・アーマゲドン
1+
--DDD超死偉王ホワイテスト・ヘル・アーマゲドン
22
--D/D/D Super Doom King Bright Armageddon
33
local s,id=GetID()
44
function s.initial_effect(c)
55
c:EnableReviveLimit()
6-
Pendulum.AddProcedure(c,false)
6+
--1 "D/D" Tuner + 1+ non-Tuner "D/D/D" monsters
77
Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_DDD),1,99)
8-
--destroy and damage
8+
--Pendulum Summon procedure
9+
Pendulum.AddProcedure(c,false)
10+
--Destroy as many monsters your opponent controls as possible with DEF less than or equal to the ATK of 1 "D/D/D" Synchro Monster you control, and if you do, inflict 1000 damage to your opponent for each monster destroyed
911
local e1=Effect.CreateEffect(c)
1012
e1:SetDescription(aux.Stringid(id,0))
1113
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
1214
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
13-
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
1415
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
15-
e1:SetCountLimit(1)
16+
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
1617
e1:SetRange(LOCATION_PZONE)
17-
e1:SetCondition(s.descon)
18+
e1:SetCountLimit(1)
19+
e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end)
1820
e1:SetTarget(s.destg)
1921
e1:SetOperation(s.desop)
2022
c:RegisterEffect(e1)
21-
--cannot be target
23+
--Your opponent cannot target monsters you control with card effects
2224
local e2=Effect.CreateEffect(c)
2325
e2:SetType(EFFECT_TYPE_FIELD)
26+
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
2427
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
2528
e2:SetRange(LOCATION_MZONE)
26-
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
2729
e2:SetTargetRange(LOCATION_MZONE,0)
2830
e2:SetValue(aux.tgoval)
2931
c:RegisterEffect(e2)
30-
--disable
31-
local e3=Effect.CreateEffect(c)
32-
e3:SetDescription(aux.Stringid(id,1))
33-
e3:SetCategory(CATEGORY_DISABLE)
34-
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
35-
e3:SetCode(EVENT_SUMMON_SUCCESS)
36-
e3:SetProperty(EFFECT_FLAG_DELAY)
37-
e3:SetRange(LOCATION_MZONE)
38-
e3:SetTarget(s.distg)
39-
e3:SetOperation(s.disop)
40-
c:RegisterEffect(e3)
41-
local e4=e3:Clone()
42-
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
32+
--Make your opponent choose 1 Pendulum Monster they control, and all other monsters they currently control have their effects negated
33+
local e3a=Effect.CreateEffect(c)
34+
e3a:SetDescription(aux.Stringid(id,1))
35+
e3a:SetCategory(CATEGORY_DISABLE)
36+
e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
37+
e3a:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
38+
e3a:SetCode(EVENT_SUMMON_SUCCESS)
39+
e3a:SetRange(LOCATION_MZONE)
40+
e3a:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) end)
41+
e3a:SetTarget(s.distg)
42+
e3a:SetOperation(s.disop)
43+
c:RegisterEffect(e3a)
44+
local e3b=e3a:Clone()
45+
e3b:SetCode(EVENT_SPSUMMON_SUCCESS)
46+
c:RegisterEffect(e3b)
47+
--Place this card in your Pendulum Zone
48+
local e4=Effect.CreateEffect(c)
49+
e4:SetDescription(aux.Stringid(id,2))
50+
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
51+
e4:SetProperty(EFFECT_FLAG_DELAY)
52+
e4:SetCode(EVENT_DESTROYED)
53+
e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end)
54+
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end)
55+
e4:SetOperation(s.penop)
4356
c:RegisterEffect(e4)
44-
--pendulum
45-
local e6=Effect.CreateEffect(c)
46-
e6:SetDescription(aux.Stringid(id,3))
47-
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
48-
e6:SetCode(EVENT_DESTROYED)
49-
e6:SetProperty(EFFECT_FLAG_DELAY)
50-
e6:SetCondition(s.pencon)
51-
e6:SetTarget(s.pentg)
52-
e6:SetOperation(s.penop)
53-
c:RegisterEffect(e6)
5457
end
5558
s.listed_series={SET_DDD,SET_DD}
56-
function s.descon(e,tp,eg,ep,ev,re,r,rp)
57-
return Duel.GetAttacker():GetControler()~=tp
58-
end
59-
function s.desfilter1(c,tp)
60-
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(SET_DDD) and c:GetAttack()>0
61-
and Duel.IsExistingMatchingCard(s.desfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
62-
end
63-
function s.desfilter2(c,atk)
64-
return c:IsFaceup() and c:IsDefenseBelow(atk)
59+
function s.tgfilter(c,tp)
60+
return c:IsSetCard(SET_DDD) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
61+
and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsDefenseBelow,c:GetAttack()),tp,0,LOCATION_MZONE,1,nil)
6562
end
6663
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
67-
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.desfilter1(chkc,tp) end
68-
if chk==0 then return Duel.IsExistingTarget(s.desfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
69-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
70-
local tc=Duel.SelectTarget(tp,s.desfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
71-
local g=Duel.GetMatchingGroup(s.desfilter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
72-
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
64+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end
65+
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
67+
local tc=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
68+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsDefenseBelow,tc:GetAttack()),tp,0,LOCATION_MZONE,nil)
69+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0)
7370
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*1000)
7471
end
7572
function s.desop(e,tp,eg,ep,ev,re,r,rp)
76-
local c=e:GetHandler()
7773
local tc=Duel.GetFirstTarget()
78-
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
79-
local g=Duel.GetMatchingGroup(s.desfilter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
74+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
75+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsDefenseBelow,tc:GetAttack()),tp,0,LOCATION_MZONE,nil)
8076
if #g==0 then return end
81-
local oc=Duel.Destroy(g,REASON_EFFECT)
82-
if oc>0 then Duel.Damage(1-tp,oc*1000,REASON_EFFECT) end
77+
local ct=Duel.Destroy(g,REASON_EFFECT)
78+
if ct>0 then
79+
Duel.Damage(1-tp,ct*1000,REASON_EFFECT)
80+
end
8381
end
8482
end
85-
function s.disfilter(c,tp)
86-
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
83+
function s.pendulumdisfilter(c,tp)
84+
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
8785
and Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,c)
8886
end
8987
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
90-
if chk==0 then return not eg:IsContains(e:GetHandler())
91-
and Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
88+
if chk==0 then return Duel.IsExistingMatchingCard(s.pendulumdisfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
89+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
9290
end
9391
function s.disop(e,tp,eg,ep,ev,re,r,rp)
94-
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,2))
95-
local pc=Duel.SelectMatchingCard(1-tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst()
96-
if not pc then return end
97-
local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,pc)
98-
local tc=g:GetFirst()
99-
for tc in aux.Next(g) do
100-
local e1=Effect.CreateEffect(e:GetHandler())
101-
e1:SetType(EFFECT_TYPE_SINGLE)
102-
e1:SetCode(EFFECT_DISABLE)
103-
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
104-
tc:RegisterEffect(e1)
105-
local e2=Effect.CreateEffect(e:GetHandler())
106-
e2:SetType(EFFECT_TYPE_SINGLE)
107-
e2:SetCode(EFFECT_DISABLE_EFFECT)
108-
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
109-
tc:RegisterEffect(e2)
110-
if tc:IsType(TYPE_TRAPMONSTER) then
111-
local e3=Effect.CreateEffect(e:GetHandler())
112-
e3:SetType(EFFECT_TYPE_SINGLE)
113-
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
114-
e3:SetReset(RESET_EVENT|RESETS_STANDARD)
115-
tc:RegisterEffect(e3)
116-
end
117-
end
118-
end
119-
function s.pencon(e,tp,eg,ep,ev,re,r,rp)
92+
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,3))
93+
local sg=Duel.SelectMatchingCard(1-tp,s.pendulumdisfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
94+
if #sg==0 then return end
95+
Duel.HintSelection(sg)
12096
local c=e:GetHandler()
121-
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
122-
end
123-
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
124-
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
97+
local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,sg)
98+
for dis_c in g:Iter() do
99+
--Their effects are negated
100+
dis_c:NegateEffects(c)
101+
end
125102
end
126103
function s.penop(e,tp,eg,ep,ev,re,r,rp)
127-
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
128104
local c=e:GetHandler()
129105
if c:IsRelateToEffect(e) then
130106
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
131107
end
132-
end
108+
end

0 commit comments

Comments
 (0)