Skip to content

Commit df85548

Browse files
committed
"Dupe Frog" fix
Fixed a bug where it could add "Frog" Spell/Traps to the hand
1 parent 575fa5c commit df85548

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

official/c46239604.lua

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@
22
--Dupe Frog
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--change code
5+
--This card's name becomes "Des Frog" while on the field
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_SINGLE)
88
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
99
e1:SetRange(LOCATION_MZONE)
1010
e1:SetCode(EFFECT_CHANGE_CODE)
1111
e1:SetValue(84451804)
1212
c:RegisterEffect(e1)
13-
--search
13+
--Add 1 "Frog" monster from your Deck or GY to your hand
1414
local e2=Effect.CreateEffect(c)
1515
e2:SetDescription(aux.Stringid(id,0))
1616
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
17-
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
18-
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
17+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
1918
e2:SetCode(EVENT_TO_GRAVE)
2019
e2:SetCondition(s.condition)
2120
e2:SetTarget(s.target)
2221
e2:SetOperation(s.operation)
2322
c:RegisterEffect(e2)
24-
--atlimit
23+
--Monsters your opponent controls cannot target monsters for attacks, except this one
2524
local e3=Effect.CreateEffect(c)
2625
e3:SetType(EFFECT_TYPE_FIELD)
2726
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
@@ -31,23 +30,23 @@ function s.initial_effect(c)
3130
c:RegisterEffect(e3)
3231
end
3332
s.listed_series={SET_FROG}
34-
s.listed_names={id}
33+
s.listed_names={id,84451804} --"Des Frog"
3534
function s.atlimit(e,c)
3635
return c~=e:GetHandler()
3736
end
3837
function s.condition(e,tp,eg,ep,ev,re,r,rp,chk)
3938
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
4039
end
41-
function s.filter(c)
42-
return c:IsSetCard(SET_FROG) and not c:IsCode(id) and c:IsAbleToHand()
40+
function s.thfilter(c)
41+
return c:IsSetCard(SET_FROG) and c:IsMonster() not c:IsCode(id) and c:IsAbleToHand()
4342
end
4443
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
45-
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end
44+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end
4645
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK)
4746
end
4847
function s.operation(e,tp,eg,ep,ev,re,r,rp)
4948
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
50-
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
49+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
5150
if #g>0 then
5251
Duel.SendtoHand(g,nil,REASON_EFFECT)
5352
Duel.ConfirmCards(1-tp,g)

0 commit comments

Comments
 (0)