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
yutio888
Tales of MajEyal
Commits
1bd5021b
Commit
1bd5021b
authored
13 years ago
by
dg
Browse files
Options
Downloads
Patches
Plain Diff
fix
git-svn-id:
http://svn.net-core.org/repos/t-engine4@4922
51575b47-30f0-44d4-a5cc-537603b46e54
parent
98c88120
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
+33
-23
33 additions, 23 deletions
game/modules/tome/class/Actor.lua
game/modules/tome/data/talents/chronomancy/chronomancy.lua
+3
-3
3 additions, 3 deletions
game/modules/tome/data/talents/chronomancy/chronomancy.lua
with
36 additions
and
26 deletions
game/modules/tome/class/Actor.lua
+
33
−
23
View file @
1bd5021b
...
...
@@ -2371,35 +2371,44 @@ function _M:equilibriumChance(eq)
end
--- Paradox checks
function
_M
:
paradoxChanceModifier
()
local
modifier
=
self
:
getWil
()
*
1
.
5
if
self
:
knowTalent
(
self
.
T_PARADOX_MASTERY
)
then
modifier
=
modifier
*
(
1
+
(
self
:
getTalentLevel
(
self
.
T_PARADOX_MASTERY
)
/
10
)
or
0
)
end
--print("[Paradox] Will modifier: ", modifier, "::", self:getParadox())
return
modifier
function
_M
:
getModifiedParadox
()
local
will_modifier
=
1
+
(
self
:
getTalentLevel
(
self
.
T_PARADOX_MASTERY
)
/
10
)
or
0
local
modified_paradox
=
math.max
(
0
,
self
:
getParadox
()
-
(
self
:
getWil
()
*
will_modifier
))
return
modified_paradox
end
function
_M
:
paradoxFailChance
()
local
chance
=
(
100
+
2
*
self
:
combatFatigue
())
/
100
*
math
.
pow
((
self
:
getParadox
()
-
self
:
paradoxChanceModifier
())
/
200
,
2
)
if
self
:
getParadox
()
<
200
then
chance
=
0
end
--print("[Paradox] Fail chance: ", chance, "::", self:getParadox())
local
chance
=
0
local
fatigue_modifier
=
(
100
+
2
*
self
:
combatFatigue
())
/
100
-- Failures only happen if Modified Paradox is over 200
if
self
:
getModifiedParadox
()
>
200
then
chance
=
fatigue_modifier
*
math
.
pow
(
self
:
getModifiedParadox
()
/
200
,
2
)
end
-- If there's any chance, round it up
chance
=
util
.
bound
(
math.ceil
(
chance
),
0
,
100
)
return
rng
.
percent
(
chance
),
chance
end
function
_M
:
paradoxAnomalyChance
()
local
chance
=
(
100
+
2
*
self
:
combatFatigue
())
/
100
*
math
.
pow
((
self
:
getParadox
()
-
self
:
paradoxChanceModifier
())
/
300
,
3
)
if
self
:
getParadox
()
<
300
then
chance
=
0
end
--print("[Paradox] Anomaly chance: ", chance, "::", self:getParadox())
local
chance
=
0
local
fatigue_modifier
=
(
100
+
2
*
self
:
combatFatigue
())
/
100
-- Anomalies only happen if Modified Paradox is over 200
if
self
:
getModifiedParadox
()
>
300
then
chance
=
fatigue_modifier
*
math
.
pow
(
self
:
getModifiedParadox
()
/
300
,
3
)
end
-- If there's any chance, round it up
chance
=
util
.
bound
(
math.ceil
(
chance
),
0
,
100
)
return
rng
.
percent
(
chance
),
chance
end
function
_M
:
paradoxBackfireChance
()
local
chance
=
(
100
+
2
*
self
:
combatFatigue
())
/
100
*
math
.
pow
((
self
:
getParadox
()
-
self
:
paradoxChanceModifier
())
/
400
,
4
)
if
self
:
getParadox
()
<
400
then
chance
=
0
end
--print("[Paradox] Backfire chance: ", chance, "::", self:getParadox())
local
chance
=
0
local
fatigue_modifier
=
(
100
+
2
*
self
:
combatFatigue
())
/
100
-- Backfires only happen if Modified Paradox is over 400
if
self
:
getModifiedParadox
()
>
400
then
chance
=
fatigue_modifier
*
math
.
pow
(
self
:
getModifiedParadox
()
/
400
,
4
)
end
-- If there's any chance, round it up
chance
=
util
.
bound
(
math.ceil
(
chance
),
0
,
100
)
return
rng
.
percent
(
chance
),
chance
end
...
...
@@ -2409,21 +2418,21 @@ local previous_incParadox = _M.incParadox
function
_M
:
incParadox
(
paradox
)
-- Failure checks
if
self
:
getParadox
()
<
200
and
self
:
getParadox
()
+
paradox
>=
200
then
if
self
:
get
Modified
Paradox
()
<
200
and
self
:
get
Modified
Paradox
()
+
paradox
>=
200
then
game
.
logPlayer
(
self
,
"#LIGHT_RED#You feel the edges of time begin to fray!"
)
end
if
self
:
getParadox
()
>
200
and
self
:
getParadox
()
+
paradox
<=
200
then
if
self
:
get
Modified
Paradox
()
>
200
and
self
:
get
Modified
Paradox
()
+
paradox
<=
200
then
game
.
logPlayer
(
self
,
"#LIGHT_BLUE#Time feels more stable."
)
end
-- Anomaly checks
if
self
:
getParadox
()
<
300
and
self
:
getParadox
()
+
paradox
>=
300
then
if
self
:
get
Modified
Paradox
()
<
300
and
self
:
get
Modified
Paradox
()
+
paradox
>=
300
then
game
.
logPlayer
(
self
,
"#LIGHT_RED#You feel the edges of space begin to ripple and bend!"
)
end
if
self
:
getParadox
()
>
300
and
self
:
getParadox
()
+
paradox
<=
300
then
if
self
:
get
Modified
Paradox
()
>
300
and
self
:
get
Modified
Paradox
()
+
paradox
<=
300
then
game
.
logPlayer
(
self
,
"#LIGHT_BLUE#Space feels more stable."
)
end
-- Backfire checks
if
self
:
getParadox
()
<
400
and
self
:
getParadox
()
+
paradox
>=
400
then
if
self
:
get
Modified
Paradox
()
<
400
and
self
:
get
Modified
Paradox
()
+
paradox
>=
400
then
game
.
logPlayer
(
self
,
"#LIGHT_RED#Space and time both fight against your control!"
)
end
if
self
:
getParadox
()
>
400
and
self
:
getParadox
()
+
paradox
<=
400
then
...
...
@@ -2604,13 +2613,14 @@ function _M:preUseTalent(ab, silent, fake)
end
if
not
silent
then
game
.
logPlayer
(
self
,
"You lose control and unleash an anomaly!"
)
end
self
:
forceUseTalent
(
rng
.
table
(
ts
),
{
ignore_energy
=
true
})
self
:
incParadox
(
-
(
ab
.
paradox
and
(
ab
.
paradox
*
paradox_scaling
)
or
ab
.
sustain_paradox
))
-- Anomalies correct the timeline and reduce Paradox
self
:
incParadox
(
-
(
ab
.
paradox
and
(
ab
.
paradox
*
paradox_scaling
)
or
ab
.
sustain_paradox
)
*
2
)
self
:
useEnergy
()
return
false
-- Now check for failure
elseif
not
self
:
attr
(
"no_paradox_fail"
)
and
self
:
paradoxFailChance
()
and
not
self
:
hasEffect
(
self
.
EFF_SPACETIME_STABILITY
)
then
if
not
silent
then
game
.
logPlayer
(
self
,
"You fail to use %s due to your paradox!"
,
ab
.
name
)
end
self
:
incParadox
(
ab
.
paradox
or
ab
.
sustain_paradox
/
10
)
self
:
incParadox
(
ab
.
paradox
and
(
ab
.
paradox
*
paradox_scaling
)
or
ab
.
sustain_paradox
)
self
:
useEnergy
()
return
false
end
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/talents/chronomancy/chronomancy.lua
+
3
−
3
View file @
1bd5021b
...
...
@@ -23,7 +23,7 @@ newTalent{
type
=
{
"chronomancy/other"
,
1
},
mode
=
"sustained"
,
sustain_paradox
=
0
,
hide
=
true
,
--
hide = true,
points
=
1
,
--message = "@Source@ retunes the fabric of spacetime.",
cooldown
=
5
,
...
...
@@ -43,13 +43,13 @@ newTalent{
end
,
info
=
function
(
self
,
t
)
local
_
,
failure
=
self
:
paradoxFailChance
()
local
_
,
backfire
=
self
:
paradoxBackfireChance
()
local
_
,
anomaly
=
self
:
paradoxAnomalyChance
()
local
_
,
backfire
=
self
:
paradoxBackfireChance
()
return
(
[[Reduces your paradox by one each turn while sustained. Attacking, using an item, or a talent will cancel the spell.
Current failure chance : %d%%
Current anomaly chance : %d%%
Current backfire chance : %d%%]]
):
format
(
failure
,
backfire
,
anomaly
)
Current backfire chance : %d%%]]
):
format
(
failure
,
anomaly
,
backfire
)
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