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
K'van
Tales of MajEyal
Commits
38763545
Commit
38763545
authored
10 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Improve ego items generation when antimagic filters are on
parent
dad1d5e2
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
+3
-1
3 additions, 1 deletion
game/modules/tome/class/GameState.lua
with
3 additions
and
1 deletion
game/modules/tome/class/GameState.lua
+
3
−
1
View file @
38763545
...
...
@@ -357,6 +357,7 @@ function _M:generateRandart(data)
local
nb_egos
=
data
.
egos
or
3
local
gr_egos
=
data
.
greater_egos_bias
or
math.floor
(
nb_egos
*
2
/
3
)
-- 2/3 greater egos by default
if
o
.
egos
and
nb_egos
>
0
then
local
picked_egos
=
{}
local
legos
=
{}
local
been_greater
=
0
table.insert
(
legos
,
game
.
level
:
getEntitiesList
(
"object/"
..
o
.
egos
..
":prefix"
))
...
...
@@ -369,12 +370,13 @@ function _M:generateRandart(data)
if
rng
.
percent
(
100
*
lev
/
(
lev
+
50
))
and
been_greater
<
gr_egos
then
been_greater
=
been_greater
+
1
filter
=
function
(
e
)
return
e
.
greater_ego
end
end
--RE Phase out (but don't eliminate) lesser egos with level
for
z
=
1
,
#
egos
do
list
[
#
list
+
1
]
=
egos
[
z
].
e
end
local
ef
=
self
:
egoFilter
(
game
.
zone
,
game
.
level
,
"object"
,
"randartego"
,
o
,
{
special
=
filter
,
forbid_power_source
=
data
.
forbid_power_source
,
power_source
=
data
.
power_source
},
list
,
{})
local
ef
=
self
:
egoFilter
(
game
.
zone
,
game
.
level
,
"object"
,
"randartego"
,
o
,
{
special
=
filter
,
forbid_power_source
=
data
.
forbid_power_source
,
power_source
=
data
.
power_source
},
picked_egos
,
{})
filter
=
ef
.
special
local
pick_egos
=
game
.
zone
:
computeRarities
(
"object"
,
list
,
game
.
level
,
filter
,
nil
,
nil
)
local
ego
=
game
.
zone
:
pickEntity
(
pick_egos
)
if
ego
then
table.insert
(
picked_egos
,
ego
)
-- print(" ** selected ego", ego.name)
ego
=
ego
:
clone
()
if
ego
.
instant_resolve
then
ego
:
resolve
(
nil
,
nil
,
o
)
end
-- Don't allow resolvers.generic here (conflict)
...
...
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