Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-scripts
Commits
79835a47
Commit
79835a47
authored
Nov 03, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Auxiliary.EffectCategoryFilter
parent
aa9fc5e7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
c47292920.lua
c47292920.lua
+3
-3
c93078761.lua
c93078761.lua
+1
-2
utility.lua
utility.lua
+13
-0
No files found.
c47292920.lua
View file @
79835a47
...
...
@@ -13,7 +13,7 @@ function c47292920.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c47292920
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
.
toss_dice
return
c
:
IsFaceup
()
and
c
:
IsEffectProperty
(
aux
.
EffectCategoryFilter
(
CATEGORY_DICE
))
end
function
c47292920
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c47292920
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
...
...
@@ -28,8 +28,8 @@ function c47292920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c47292920
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
Is
CanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
.
toss_dice
and
not
c
.
toss_dice_in_pendulum_only
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
Is
EffectProperty
(
aux
.
MonsterEffectCategoryFilter
(
CATEGORY_DICE
)
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c47292920
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
c93078761.lua
View file @
79835a47
...
...
@@ -11,9 +11,8 @@ function c93078761.initial_effect(c)
e1
:
SetOperation
(
c93078761
.
activate
)
c
:
RegisterEffect
(
e1
)
end
c93078761
.
toss_dice
=
true
function
c93078761
.
filter
(
c
)
return
c
.
toss_dice
and
c
:
IsAbleToHand
()
return
c
:
IsEffectProperty
(
aux
.
EffectCategoryFilter
(
CATEGORY_DICE
))
and
c
:
IsAbleToHand
()
end
function
c93078761
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c93078761
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
...
...
utility.lua
View file @
79835a47
...
...
@@ -1793,3 +1793,16 @@ function Auxiliary.BecomeOriginalCode(c,tc,reset)
c
:
RegisterEffect
(
e1
)
return
e1
end
---@param category integer
---@return function
function
Auxiliary
.
EffectCategoryFilter
(
category
)
return
aux
.
FilterBoolFunction
(
Effect
.
IsHasCategory
,
category
)
end
---@param category integer
---@return function
function
Auxiliary
.
MonsterEffectCategoryFilter
(
category
)
---@param e Effect
return
function
(
e
)
return
e
:
IsHasCategory
(
category
)
and
not
e
:
IsHasRange
(
LOCATION_PZONE
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment