Skip to content

Commit e6f6465

Browse files
committed
Use Card.IsSpell and Card.IsTrap
1 parent d6c6024 commit e6f6465

38 files changed

+67
-73
lines changed

goat/c504700042.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ end
1111
s.listed_names={CARD_NECROVALLEY}
1212
function s.operation(e,tp,eg,ep,ev,re,r,rp)
1313
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
14-
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP)
14+
local g=Duel.SelectMatchingCard(tp,Card.IsTrap,tp,LOCATION_DECK,0,1,1,nil)
1515
local tc=g:GetFirst()
1616
if tc then
1717
if Duel.IsEnvironment(CARD_NECROVALLEY) and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then

goat/c504700087.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
7979
elseif e:GetLabel()==1 then g=Duel.SelectMatchingCard(1-tp,s.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL)
8080
else g=Duel.SelectMatchingCard(1-tp,s.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP) end
8181
Duel.SendtoGrave(g,REASON_EFFECT)
82-
end
82+
end

official/c18809562.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ function s.filter(c)
1414
return (c:GetLevel()==7 or c:GetLevel()==8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
1515
end
1616
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
17-
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,e:GetHandler(),TYPE_SPELL)
17+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpell,tp,LOCATION_HAND,0,1,e:GetHandler())
1818
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
1919
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
2020
end
2121
function s.activate(e,tp,eg,ep,ev,re,r,rp)
2222
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
23-
local ag=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,nil,TYPE_SPELL)
23+
local ag=Duel.SelectMatchingCard(tp,Card.IsSpell,tp,LOCATION_HAND,0,1,1,nil)
2424
if #ag>0 then
2525
Duel.SendtoHand(ag,1-tp,REASON_EFFECT)
2626
Duel.ConfirmCards(tp,ag)

official/c21623008.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ end
2828
function s.operation(e,tp,eg,ep,ev,re,r,rp)
2929
Duel.DiscardDeck(tp,2,REASON_EFFECT)
3030
Duel.DiscardDeck(1-tp,2,REASON_EFFECT)
31-
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,3,nil,TYPE_SPELL)
31+
if Duel.IsExistingMatchingCard(Card.IsSpell,tp,LOCATION_GRAVE,0,3,nil)
3232
and Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil)
3333
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
3434
local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil)
3535
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
3636
end
37-
end
38-
37+
end

official/c23672629.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
6565
return eg:IsExists(s.tdcfilter,1,nil,tp)
6666
end
6767
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
68-
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_DECK,0,1,nil,TYPE_SPELL) end
68+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpell,tp,LOCATION_DECK,0,1,nil) end
6969
end
7070
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
7171
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
72-
local tc=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL):GetFirst()
72+
local tc=Duel.SelectMatchingCard(tp,Card.IsSpell,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
7373
if tc then
7474
Duel.ShuffleDeck(tp)
7575
Duel.MoveSequence(tc,0)

official/c24140059.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ end
1111
s.listed_names={CARD_NECROVALLEY}
1212
function s.operation(e,tp,eg,ep,ev,re,r,rp)
1313
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
14-
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP)
14+
local g=Duel.SelectMatchingCard(tp,Card.IsTrap,tp,LOCATION_DECK,0,1,1,nil)
1515
local tc=g:GetFirst()
1616
if tc then
1717
if Duel.IsEnvironment(CARD_NECROVALLEY) and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then

official/c25733157.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
3838
e1:SetValue(s.efilter)
3939
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
4040
tc:RegisterEffect(e1)
41-
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then
41+
if Duel.GetMatchingGroupCount(Card.IsSpell,tp,LOCATION_GRAVE,0,nil)>=3 then
4242
--Cannot be destroyed by battle if 3+ spells in GY
4343
local e2=Effect.CreateEffect(e:GetHandler())
4444
e2:SetDescription(3000)

official/c25955749.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
3434
local tc=Duel.GetFirstTarget()
3535
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
3636
local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
37-
if #dg>0 and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
37+
if #dg>0 and Duel.GetMatchingGroupCount(Card.IsSpell,tp,LOCATION_GRAVE,0,nil)>=3 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
3838
Duel.BreakEffect()
3939
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
4040
local sg=dg:Select(tp,1,1,nil)

official/c26495087.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
3434
if #g~=0 then
3535
Duel.SendtoGrave(g,REASON_EFFECT)
3636
end
37-
end
37+
end

official/c32723153.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
1616
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
1717
end
1818
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
19-
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL) end
19+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpell,tp,LOCATION_GRAVE,0,1,nil) end
2020
Duel.SetTargetPlayer(1-tp)
21-
local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)*200
21+
local dam=Duel.GetMatchingGroupCount(Card.IsSpell,tp,LOCATION_GRAVE,0,nil)*200
2222
Duel.SetTargetParam(dam)
2323
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
2424
end
2525
function s.activate(e,tp,eg,ep,ev,re,r,rp)
2626
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
27-
local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)*200
27+
local dam=Duel.GetMatchingGroupCount(Card.IsSpell,tp,LOCATION_GRAVE,0,nil)*200
2828
Duel.Damage(p,dam,REASON_EFFECT)
29-
end
29+
end

0 commit comments

Comments
 (0)