Skip to content

Commit 5138eb1

Browse files
authored
Update "Dragonic Contract"
Fixed setcode
1 parent 9625c4f commit 5138eb1

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

unofficial/c511002256.lua

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
--竜との契約
12
--Dragonic Contract
23
local s,id=GetID()
34
function s.initial_effect(c)
@@ -11,26 +12,23 @@ function s.initial_effect(c)
1112
e1:SetOperation(s.activate)
1213
c:RegisterEffect(e1)
1314
end
14-
s.listed_names={511002255}
15-
function s.cfilter(c)
16-
return c:IsFaceup() and c:IsCode(511002255)
17-
end
15+
s.listed_names={3837261} --"Dragonic Warrior"
1816
function s.condition(e,tp,eg,ep,ev,re,r,rp)
19-
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
17+
return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,3837261),tp,LOCATION_ONFIELD,0,1,nil)
2018
end
21-
function s.filter(c,e,tp)
19+
function s.spfilter(c,e,tp)
2220
return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
2321
end
2422
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
2523
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
26-
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
24+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
2725
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
2826
end
2927
function s.activate(e,tp,eg,ep,ev,re,r,rp)
3028
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
3129
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
32-
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp)
30+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp)
3331
if #g>0 then
3432
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
3533
end
36-
end
34+
end

0 commit comments

Comments
 (0)