Skip to content

Commit 8355cf3

Browse files
committed
update "Artmage Academic Arcane Arts Acropolis"
1 parent e39c11e commit 8355cf3

1 file changed

Lines changed: 15 additions & 22 deletions

File tree

official/c74733322.lua

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function s.initial_effect(c)
88
e0:SetType(EFFECT_TYPE_ACTIVATE)
99
e0:SetCode(EVENT_FREE_CHAIN)
1010
c:RegisterEffect(e0)
11-
--During your Main Phase, you can Normal Summon 1 "Medius the Pure" in addition to your Normal Summon/Set
11+
--During your Main Phase, you can Normal Summon 1 "Medius the Pure", in addition to your Normal Summon/Set (you can only gain this effect once per turn)
1212
local e1=Effect.CreateEffect(c)
1313
e1:SetDescription(aux.Stringid(id,0))
1414
e1:SetType(EFFECT_TYPE_FIELD)
@@ -17,7 +17,7 @@ function s.initial_effect(c)
1717
e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0)
1818
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_MEDIUS_THE_PURE))
1919
c:RegisterEffect(e1)
20-
--Add 1 declared "Artmage" monster from your Deck to your hand
20+
--You can discard 1 Spell/Trap, and declare 1 "Artmage" Monster Card name that is not among the monsters you control and has not been declared for "Artmage Academic Arcane Arts Acropolis" this turn; add that monster from your Deck to your hand, also you cannot Special Summon for the rest of this turn, except "Artmage" monsters, "Medius the Pure", or from the Extra Deck
2121
local e2=Effect.CreateEffect(c)
2222
e2:SetDescription(aux.Stringid(id,1))
2323
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
@@ -43,43 +43,36 @@ s.listed_names={CARD_MEDIUS_THE_PURE}
4343
s.listed_series={SET_ARTMAGE}
4444
function s.declfilter(c,exc1,exc2)
4545
return c:IsSetCard(SET_ARTMAGE) and c:IsMonster() and c:IsAbleToHand()
46-
and (#exc1==0 or not c:IsCode(table.unpack(exc1))) and (#exc2==0 or not c:IsCode(table.unpack(exc2)))
46+
and (#exc1==0 or not c:IsCode(table.unpack(exc1)))
47+
and (#exc2==0 or not c:IsCode(table.unpack(exc2)))
4748
end
4849
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
4950
local fcs=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARTMAGE),tp,LOCATION_MZONE,0,nil):GetClass(Card.GetCode)
5051
local g=Duel.GetMatchingGroup(s.declfilter,tp,LOCATION_DECK,0,nil,fcs,s.declared_names[tp])
5152
if chk==0 then return #g>0 end
52-
s.announce_filter={}
53-
for _,code in ipairs(g:GetClass(Card.GetCode)) do
54-
if #s.announce_filter==0 then
55-
table.insert(s.announce_filter,code)
56-
table.insert(s.announce_filter,OPCODE_ISCODE)
57-
else
58-
table.insert(s.announce_filter,code)
59-
table.insert(s.announce_filter,OPCODE_ISCODE)
60-
table.insert(s.announce_filter,OPCODE_OR)
61-
end
62-
end
63-
local ac=Duel.AnnounceCard(tp,table.unpack(s.announce_filter))
64-
table.insert(s.declared_names[tp],ac)
65-
Duel.SetTargetParam(ac)
53+
local announce_filter=DF.IsCode(g:GetClass(Card.GetCode))
54+
local announced_card=Duel.AnnounceCard(tp,announce_filter)
55+
table.insert(s.declared_names[tp],announced_card)
6656
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
67-
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER)
57+
--if the opponent tries to overwrite the announced name, they don't know what cards are in the player's Deck,
58+
--so they should be able to announce any "Artmage" Main Deck monster that the player did not control and had not announced yet
59+
local opp_announce_filter=DF.IsMainDeckMonster() & DF.IsSetCard(SET_ARTMAGE) & ~DF.IsCode(fcs) & ~DF.IsCode(s.declared_names[tp])
60+
e:GetChainData().announce_filter=function(_,p) return p==tp and announce_filter or opp_announce_filter end
6861
end
6962
function s.thfilter(c,code)
7063
return c:IsCode(code) and c:IsMonster() and c:IsAbleToHand()
7164
end
7265
function s.thop(e,tp,eg,ep,ev,re,r,rp)
73-
local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
66+
local cd=e:GetChainData()
7467
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
75-
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,code)
68+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,cd.announced_card)
7669
if #g>0 then
7770
Duel.SendtoHand(g,nil,REASON_EFFECT)
7871
Duel.ConfirmCards(1-tp,g)
7972
end
8073
if not Duel.HasFlagEffect(tp,id) then
8174
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
82-
--Cannot Special Summon from outside the Extra Deck for the rest of this turn, except "Artmage" monsters and "Medius the Pure"
75+
--You cannot Special Summon for the rest of this turn, except "Artmage" monsters, "Medius the Pure", or from the Extra Deck.
8376
local e1=Effect.CreateEffect(e:GetHandler())
8477
e1:SetDescription(aux.Stringid(id,2))
8578
e1:SetType(EFFECT_TYPE_FIELD)
@@ -90,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
9083
e1:SetReset(RESET_PHASE|PHASE_END)
9184
Duel.RegisterEffect(e1,tp)
9285
end
93-
end
86+
end

0 commit comments

Comments
 (0)