Skip to content

Commit a8bfa39

Browse files
committed
update "Doctor D"
- added call to its strings to identify which effect is being used
1 parent 199212c commit a8bfa39

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

official/c32671443.lua

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,41 @@
33
--Scripted by The Razgriz
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Activate
6+
--Add to your hand or Special Summon 1 "Destiny HERO" monster from your GY
77
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
89
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
910
e1:SetType(EFFECT_TYPE_ACTIVATE)
1011
e1:SetCode(EVENT_FREE_CHAIN)
1112
e1:SetCost(s.cost)
1213
e1:SetTarget(s.target)
1314
e1:SetOperation(s.activate)
1415
c:RegisterEffect(e1)
15-
--Change ATK
16+
--Make the ATK of a "Destiny Hero" monster becomes the ATK of another "Destiny Hero"
1617
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
1719
e2:SetCategory(CATEGORY_ATKCHANGE)
1820
e2:SetType(EFFECT_TYPE_IGNITION)
1921
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
2022
e2:SetRange(LOCATION_GRAVE)
21-
e2:SetCost(aux.bfgcost)
23+
e2:SetCost(aux.SelfBanishCost)
2224
e2:SetTarget(s.atktg)
2325
e2:SetOperation(s.atkop)
2426
c:RegisterEffect(e2)
2527
end
26-
s.listed_series={0xc008}
28+
s.listed_series={SET_DESTINY_HERO}
2729
function s.costfilter(c,e,tp,ft)
28-
return c:IsSetCard(0xc008) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true)
30+
return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true)
2931
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,c,e,tp,ft)
3032
end
3133
function s.filter(c,e,tp,ft)
32-
return (c:IsSetCard(0xc008) and c:IsMonster()) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
34+
return (c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
3335
end
3436
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
3537
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
36-
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp,ft) end
38+
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp,ft) end
3739
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
38-
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
40+
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
3941
Duel.Remove(g,POS_FACEUP,REASON_COST)
4042
end
4143
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
@@ -57,11 +59,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
5759
end
5860
end
5961
function s.atkfilter1(c,tp)
60-
return c:IsFaceup() and c:IsSetCard(0xc008) and c:IsMonster()
62+
return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()
6163
and Duel.IsExistingTarget(s.atkfilter2,tp,LOCATION_MZONE,0,1,c,c:GetAttack())
6264
end
6365
function s.atkfilter2(c,atk)
64-
return c:IsFaceup() and c:IsSetCard(0xc008) and c:IsMonster() and not c:IsAttack(atk)
66+
return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and not c:IsAttack(atk)
6567
end
6668
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
6769
if chkc then return false end
@@ -86,7 +88,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
8688
e1:SetType(EFFECT_TYPE_SINGLE)
8789
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
8890
e1:SetValue(atk)
89-
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
91+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
9092
hc:RegisterEffect(e1)
9193
end
92-
end
94+
end

0 commit comments

Comments
 (0)