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
2f72da84
Commit
2f72da84
authored
9 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
upgrade cehst code
parent
9a4e110e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/modules/tome/class/Actor.lua
+1
-1
1 addition, 1 deletion
game/modules/tome/class/Actor.lua
game/modules/tome/data/general/objects/quest-artifacts.lua
+3
-3
3 additions, 3 deletions
game/modules/tome/data/general/objects/quest-artifacts.lua
with
4 additions
and
4 deletions
game/modules/tome/class/Actor.lua
+
1
−
1
View file @
2f72da84
...
@@ -6461,7 +6461,7 @@ end
...
@@ -6461,7 +6461,7 @@ end
function
_M
:
transmoPricemod
(
o
)
if
o
.
type
==
"gem"
then
return
0
.
40
else
return
0
.
05
end
end
function
_M
:
transmoPricemod
(
o
)
if
o
.
type
==
"gem"
then
return
0
.
40
else
return
0
.
05
end
end
function
_M
:
transmoFilter
(
o
)
if
o
:
getPrice
()
<=
0
or
o
.
quest
then
return
false
end
return
true
end
function
_M
:
transmoFilter
(
o
)
if
o
:
getPrice
()
<=
0
or
o
.
quest
then
return
false
end
return
true
end
function
_M
:
transmoInven
(
inven
,
idx
,
o
)
function
_M
:
transmoInven
(
inven
,
idx
,
o
,
transmo_source
)
local
price
=
0
local
price
=
0
o
:
forAllStack
(
function
(
so
)
price
=
price
+
math.min
(
so
:
getPrice
()
*
self
:
transmoPricemod
(
so
),
25
)
end
)
-- handle stacked objects individually
o
:
forAllStack
(
function
(
so
)
price
=
price
+
math.min
(
so
:
getPrice
()
*
self
:
transmoPricemod
(
so
),
25
)
end
)
-- handle stacked objects individually
price
=
math.floor
(
price
*
100
)
/
100
-- Make sure we get at most 2 digit precision
price
=
math.floor
(
price
*
100
)
/
100
-- Make sure we get at most 2 digit precision
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/general/objects/quest-artifacts.lua
+
3
−
3
View file @
2f72da84
...
@@ -405,9 +405,9 @@ Items in the chest will not encumber you.]],
...
@@ -405,9 +405,9 @@ Items in the chest will not encumber you.]],
if
not
ret
then
return
end
if
not
ret
then
return
end
for
i
=
floor
,
1
,
-
1
do
for
i
=
floor
,
1
,
-
1
do
local
o
=
game
.
level
.
map
:
getObject
(
who
.
x
,
who
.
y
,
i
)
local
o
=
game
.
level
.
map
:
getObject
(
who
.
x
,
who
.
y
,
i
)
if
who
:
transmoFilter
(
o
)
then
if
who
:
transmoFilter
(
o
,
self
)
then
game
.
level
.
map
:
removeObject
(
who
.
x
,
who
.
y
,
i
)
game
.
level
.
map
:
removeObject
(
who
.
x
,
who
.
y
,
i
)
who
:
transmoInven
(
nil
,
nil
,
o
)
who
:
transmoInven
(
nil
,
nil
,
o
,
self
)
end
end
end
end
end
)
end
)
...
@@ -420,7 +420,7 @@ Items in the chest will not encumber you.]],
...
@@ -420,7 +420,7 @@ Items in the chest will not encumber you.]],
for
i
=
#
inven
,
1
,
-
1
do
for
i
=
#
inven
,
1
,
-
1
do
local
o
=
inven
[
i
]
local
o
=
inven
[
i
]
if
o
.
__transmo
then
if
o
.
__transmo
then
who
:
transmoInven
(
inven
,
i
,
o
)
who
:
transmoInven
(
inven
,
i
,
o
,
self
)
end
end
end
end
end
)
end
)
...
...
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