Skip to content

Commit 326eec6

Browse files
committed
Update "Aleister the Invoker"
Solved an issue where the player would be unable to select which "Invocation" is going to be added to the hand
1 parent b7f8b96 commit 326eec6

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

official/c86120751.lua

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Aleister the Invoker
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--Increase ATK/DEF
5+
--(Quick Effect): You can send this card from your hand to the GY, then target 1 Fusion Monster you control; it gains 1000 ATK/DEF until the end of this turn
66
local e1=Effect.CreateEffect(c)
77
e1:SetDescription(aux.Stringid(id,0))
88
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
@@ -13,15 +13,15 @@ function s.initial_effect(c)
1313
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER)
1414
e1:SetCondition(aux.StatChangeDamageStepCondition)
1515
e1:SetCost(Cost.SelfToGrave)
16-
e1:SetTarget(s.adtg)
17-
e1:SetOperation(s.adop)
16+
e1:SetTarget(s.atkdeftg)
17+
e1:SetOperation(s.atkdefop)
1818
c:RegisterEffect(e1)
19-
--Add 1 "Invocation" to the hand
19+
-- If this card is Normal Summoned or flipped face-up: You can add 1 "Invocation" from your Deck to your hand
2020
local e2=Effect.CreateEffect(c)
2121
e2:SetDescription(aux.Stringid(id,1))
2222
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
2323
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24-
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
24+
e2:SetProperty(EFFECT_FLAG_DELAY)
2525
e2:SetCode(EVENT_SUMMON_SUCCESS)
2626
e2:SetTarget(s.thtg)
2727
e2:SetOperation(s.thop)
@@ -30,17 +30,16 @@ function s.initial_effect(c)
3030
e3:SetCode(EVENT_FLIP)
3131
c:RegisterEffect(e3)
3232
end
33-
s.listed_names={74063034}
34-
function s.filter(c)
35-
return c:IsFaceup() and c:IsType(TYPE_FUSION)
33+
s.listed_names={74063034} --"Invocation"
34+
function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
35+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsFusionMonster() end
36+
if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsFusionMonster),tp,LOCATION_MZONE,0,1,nil) end
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
38+
local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsFusionMonster),tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
39+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,1000)
40+
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,tc,1,tp,1000)
3641
end
37-
function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
38-
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
39-
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
40-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
41-
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
42-
end
43-
function s.adop(e,tp,eg,ep,ev,re,r,rp)
42+
function s.atkdefop(e,tp,eg,ep,ev,re,r,rp)
4443
local tc=Duel.GetFirstTarget()
4544
if tc:IsRelateToEffect(e) then
4645
local e1=Effect.CreateEffect(e:GetHandler())
@@ -64,7 +63,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
6463
end
6564
function s.thop(e,tp,eg,ep,ev,re,r,rp)
6665
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
67-
local tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil)
66+
local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
6867
if tc then
6968
Duel.SendtoHand(tc,nil,REASON_EFFECT)
7069
Duel.ConfirmCards(1-tp,tc)

0 commit comments

Comments
 (0)