Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Otowa Kotori
Tales of MajEyal
Commits
b8d2917f
Commit
b8d2917f
authored
7 years ago
by
Chris Davidson
Browse files
Options
Downloads
Patches
Plain Diff
- Add a unique_ego flag that indicates if an ego can only be applied to an item once
parent
7296b461
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/class/GameState.lua
+15
-0
15 additions, 0 deletions
game/modules/tome/class/GameState.lua
with
15 additions
and
0 deletions
game/modules/tome/class/GameState.lua
+
15
−
0
View file @
b8d2917f
...
...
@@ -1655,11 +1655,13 @@ function _M:egoFilter(zone, level, type, etype, e, ego_filter, egos_list, picked
local
arcane_check
=
false
local
nature_check
=
false
local
am_check
=
false
local
unique_check
=
false
for
i
=
1
,
#
egos_list
do
local
e
=
egos_list
[
i
]
if
e
.
power_source
and
e
.
power_source
.
arcane
then
arcane_check
=
true
end
if
e
.
power_source
and
e
.
power_source
.
nature
then
nature_check
=
true
end
if
e
.
power_source
and
e
.
power_source
.
antimagic
then
am_check
=
true
end
if
e
.
unique_ego
then
unique_check
=
true
end
end
local
fcts
=
{}
...
...
@@ -1675,6 +1677,19 @@ function _M:egoFilter(zone, level, type, etype, e, ego_filter, egos_list, picked
fcts
[
#
fcts
+
1
]
=
function
(
ego
)
return
not
ego
.
power_source
or
not
ego
.
power_source
.
arcane
end
end
if
unique_check
then
fcts
[
#
fcts
+
1
]
=
function
(
ego
)
local
check
=
false
-- Use keywords as a proxy for name, a bit simpler than going through Object.ego_list
for
k
,
v
in
pairs
(
ego
.
keywords
)
do
if
e
.
keywords
and
e
.
keywords
[
k
]
then
check
=
true
end
end
return
not
check
end
end
if
#
fcts
>
0
then
local
old
=
ego_filter
.
special
ego_filter
.
special
=
function
(
ego
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment