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
1e2b1c66
Commit
1e2b1c66
authored
10 years ago
by
Eric Wykoff
Browse files
Options
Downloads
Patches
Plain Diff
consistency is good
parent
44348de1
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/data/talents/chronomancy/chronomancer.lua
+206
-1
206 additions, 1 deletion
game/modules/tome/data/talents/chronomancy/chronomancer.lua
game/modules/tome/data/talents/chronomancy/other.lua
+0
-205
0 additions, 205 deletions
game/modules/tome/data/talents/chronomancy/other.lua
with
206 additions
and
206 deletions
game/modules/tome/data/talents/chronomancy/chronomancer.lua
+
206
−
1
View file @
1e2b1c66
...
...
@@ -144,4 +144,209 @@ load("/data/talents/chronomancy/timetravel.lua")
load
(
"/data/talents/chronomancy/other.lua"
)
-- Anomalies, not learnable talents that may be cast instead of the intended spell when paradox gets to high
load
(
"/data/talents/chronomancy/anomalies.lua"
)
\ No newline at end of file
load
(
"/data/talents/chronomancy/anomalies.lua"
)
-- Paradox Functions
-- Paradox modifier. This dictates paradox cost and spellpower scaling
-- Note that 300 is the optimal balance
-- Caps at -50% and +50%
getParadoxModifier
=
function
(
self
)
local
paradox
=
self
:
getParadox
()
local
pm
=
util
.
bound
(
math.sqrt
(
paradox
/
300
),
0
.
5
,
1
.
5
)
return
pm
end
-- Paradox cost (regulates the cost of paradox talents)
getParadoxCost
=
function
(
self
,
t
,
value
)
local
pm
=
getParadoxModifier
(
self
)
local
multi
=
1
if
self
:
attr
(
"paradox_cost_multiplier"
)
then
multi
=
1
-
self
:
attr
(
"paradox_cost_multiplier"
)
end
return
(
value
*
pm
)
*
multi
end
-- Paradox Spellpower (regulates spellpower for chronomancy)
getParadoxSpellpower
=
function
(
self
,
t
,
mod
,
add
)
local
pm
=
getParadoxModifier
(
self
)
local
mod
=
mod
or
1
-- Empower?
local
p
=
self
:
isTalentActive
(
self
.
T_EMPOWER
)
if
p
and
p
.
talent
==
t
.
id
then
pm
=
pm
+
self
:
callTalent
(
self
.
T_EMPOWER
,
"getPower"
)
end
local
spellpower
=
self
:
combatSpellpower
(
mod
*
pm
,
add
)
return
spellpower
end
-- Extension Spellbinding
getExtensionModifier
=
function
(
self
,
t
,
value
)
local
mod
=
1
local
p
=
self
:
isTalentActive
(
self
.
T_EXTENSION
)
if
p
and
p
.
talent
==
t
.
id
then
mod
=
mod
+
self
:
callTalent
(
self
.
T_EXTENSION
,
"getPower"
)
end
value
=
math.ceil
(
value
*
mod
)
return
value
end
-- Tunes paradox
tuneParadox
=
function
(
self
,
t
,
value
)
local
dox
=
self
:
getParadox
()
-
(
self
.
preferred_paradox
or
300
)
local
fix
=
math.min
(
math.abs
(
dox
),
value
)
if
dox
>
0
then
self
:
incParadox
(
-
fix
)
elseif
dox
<
0
then
self
:
incParadox
(
fix
)
end
end
--- Warden weapon functions
-- Checks for weapons in main and quickslot
doWardenPreUse
=
function
(
self
,
weapon
,
silent
)
if
weapon
==
"bow"
then
if
not
self
:
hasArcheryWeapon
(
"bow"
)
and
not
self
:
hasArcheryWeaponQS
(
"bow"
)
then
return
false
end
end
if
weapon
==
"dual"
then
if
not
self
:
hasDualWeapon
()
and
not
self
:
hasDualWeaponQS
()
then
return
false
end
end
return
true
end
-- Swaps weapons if needed
doWardenWeaponSwap
=
function
(
self
,
t
,
type
,
silent
)
local
swap
=
false
local
warden_weapon
if
type
==
"blade"
then
local
mainhand
,
offhand
=
self
:
hasDualWeapon
()
if
not
mainhand
then
swap
=
true
warden_weapon
=
"blade"
end
end
if
type
==
"bow"
then
if
not
self
:
hasArcheryWeapon
(
"bow"
)
then
swap
=
true
warden_weapon
=
"bow"
end
end
if
swap
==
true
then
local
old_inv_access
=
self
.
no_inventory_access
-- Make sure clones can swap
self
.
no_inventory_access
=
nil
self
:
attr
(
"no_sound"
,
1
)
self
:
quickSwitchWeapons
(
true
,
"warden"
,
silent
)
self
:
attr
(
"no_sound"
,
-
1
)
self
.
no_inventory_access
=
old_inv_access
end
return
swap
,
dam
end
-- Target helper function for focus fire
checkWardenFocus
=
function
(
self
)
local
target
local
eff
=
self
:
hasEffect
(
self
.
EFF_WARDEN_S_FOCUS
)
if
eff
then
target
=
eff
.
target
end
return
target
end
-- Spell functions
makeParadoxClone
=
function
(
self
,
target
,
duration
)
local
m
=
target
:
cloneFull
{
shader
=
"shadow_simulacrum"
,
shader_args
=
{
color
=
{
0
.
6
,
0
.
6
,
0
.
2
},
base
=
0
.
8
,
time_factor
=
1500
},
no_drops
=
true
,
faction
=
target
.
faction
,
summoner
=
target
,
summoner_gain_exp
=
true
,
summon_time
=
duration
,
ai_target
=
{
actor
=
nil
},
ai
=
"summoned"
,
ai_real
=
"tactical"
,
name
=
""
..
target
.
name
..
"'s temporal clone"
,
desc
=
[[A creature from another timeline.]]
,
}
m
:
removeAllMOs
()
m
.
make_escort
=
nil
m
.
on_added_to_level
=
nil
m
.
on_added
=
nil
mod
.
class
.
NPC
.
castAs
(
m
)
engine
.
interface
.
ActorAI
.
init
(
m
,
m
)
m
.
exp_worth
=
0
m
.
energy
.
value
=
0
m
.
player
=
nil
m
.
max_life
=
m
.
max_life
m
.
life
=
util
.
bound
(
m
.
life
,
0
,
m
.
max_life
)
m
.
forceLevelup
=
function
()
end
m
.
on_die
=
nil
m
.
die
=
nil
m
.
puuid
=
nil
m
.
on_acquire_target
=
nil
m
.
no_inventory_access
=
true
m
.
no_levelup_access
=
true
m
.
on_takehit
=
nil
m
.
seen_by
=
nil
m
.
can_talk
=
nil
m
.
clone_on_hit
=
nil
m
.
self_resurrect
=
nil
m
.
escort_quest
=
nil
m
.
unused_talents
=
0
m
.
unused_generics
=
0
if
m
.
talents
.
T_SUMMON
then
m
.
talents
.
T_SUMMON
=
nil
end
if
m
.
talents
.
T_MULTIPLY
then
m
.
talents
.
T_MULTIPLY
=
nil
end
-- We use this function... a lot!!
-- So don't duplicate the inventory
if
m
.
inven
then
m
.
inven
[
m
.
INVEN_INVEN
]
=
nil
end
-- Clones never flee because they're awesome
m
.
ai_tactic
=
m
.
ai_tactic
or
{}
m
.
ai_tactic
.
escape
=
0
-- Remove some talents
local
tids
=
{}
for
tid
,
_
in
pairs
(
m
.
talents
)
do
local
t
=
m
:
getTalentFromId
(
tid
)
if
(
t
.
no_npc_use
and
not
t
.
allow_temporal_clones
)
or
t
.
remove_on_clone
then
tids
[
#
tids
+
1
]
=
t
end
end
for
i
,
t
in
ipairs
(
tids
)
do
if
t
.
mode
==
"sustained"
and
m
:
isTalentActive
(
t
.
id
)
then
m
:
forceUseTalent
(
t
.
id
,
{
ignore_energy
=
true
,
silent
=
true
})
end
m
:
unlearnTalentFull
(
t
.
id
)
end
-- remove timed effects
m
:
removeTimedEffectsOnClone
()
-- reset folds for our Warden clones
for
tid
,
cd
in
pairs
(
m
.
talents_cd
)
do
local
t
=
m
:
getTalentFromId
(
tid
)
if
t
.
type
[
1
]:
find
(
"^chronomancy/manifold"
)
and
m
:
knowTalent
(
tid
)
then
m
:
alterTalentCoolingdown
(
t
,
-
cd
)
end
end
-- And finally, a bit of sanity in case anyone decides they should blow up the world..
if
m
.
preferred_paradox
and
m
.
preferred_paradox
>
600
then
m
.
preferred_paradox
=
600
end
return
m
end
-- Make sure we don't run concurrent chronoworlds; to prevent lag and possible game breaking bugs or exploits
checkTimeline
=
function
(
self
)
if
game
.
_chronoworlds
==
nil
then
return
false
else
return
true
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
game/modules/tome/data/talents/chronomancy/other.lua
+
0
−
205
View file @
1e2b1c66
...
...
@@ -18,211 +18,6 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- Paradox Functions
-- Paradox modifier. This dictates paradox cost and spellpower scaling
-- Note that 300 is the optimal balance
-- Caps at -50% and +50%
getParadoxModifier
=
function
(
self
)
local
paradox
=
self
:
getParadox
()
local
pm
=
util
.
bound
(
math.sqrt
(
paradox
/
300
),
0
.
5
,
1
.
5
)
return
pm
end
-- Paradox cost (regulates the cost of paradox talents)
getParadoxCost
=
function
(
self
,
t
,
value
)
local
pm
=
getParadoxModifier
(
self
)
local
multi
=
1
if
self
:
attr
(
"paradox_cost_multiplier"
)
then
multi
=
1
-
self
:
attr
(
"paradox_cost_multiplier"
)
end
return
(
value
*
pm
)
*
multi
end
-- Paradox Spellpower (regulates spellpower for chronomancy)
getParadoxSpellpower
=
function
(
self
,
t
,
mod
,
add
)
local
pm
=
getParadoxModifier
(
self
)
local
mod
=
mod
or
1
-- Empower?
local
p
=
self
:
isTalentActive
(
self
.
T_EMPOWER
)
if
p
and
p
.
talent
==
t
.
id
then
pm
=
pm
+
self
:
callTalent
(
self
.
T_EMPOWER
,
"getPower"
)
end
local
spellpower
=
self
:
combatSpellpower
(
mod
*
pm
,
add
)
return
spellpower
end
-- Extension Spellbinding
getExtensionModifier
=
function
(
self
,
t
,
value
)
local
mod
=
1
local
p
=
self
:
isTalentActive
(
self
.
T_EXTENSION
)
if
p
and
p
.
talent
==
t
.
id
then
mod
=
mod
+
self
:
callTalent
(
self
.
T_EXTENSION
,
"getPower"
)
end
value
=
math.ceil
(
value
*
mod
)
return
value
end
-- Tunes paradox
tuneParadox
=
function
(
self
,
t
,
value
)
local
dox
=
self
:
getParadox
()
-
(
self
.
preferred_paradox
or
300
)
local
fix
=
math.min
(
math.abs
(
dox
),
value
)
if
dox
>
0
then
self
:
incParadox
(
-
fix
)
elseif
dox
<
0
then
self
:
incParadox
(
fix
)
end
end
--- Warden weapon functions
-- Checks for weapons in main and quickslot
doWardenPreUse
=
function
(
self
,
weapon
,
silent
)
if
weapon
==
"bow"
then
if
not
self
:
hasArcheryWeapon
(
"bow"
)
and
not
self
:
hasArcheryWeaponQS
(
"bow"
)
then
return
false
end
end
if
weapon
==
"dual"
then
if
not
self
:
hasDualWeapon
()
and
not
self
:
hasDualWeaponQS
()
then
return
false
end
end
return
true
end
-- Swaps weapons if needed
doWardenWeaponSwap
=
function
(
self
,
t
,
type
,
silent
)
local
swap
=
false
local
warden_weapon
if
type
==
"blade"
then
local
mainhand
,
offhand
=
self
:
hasDualWeapon
()
if
not
mainhand
then
swap
=
true
warden_weapon
=
"blade"
end
end
if
type
==
"bow"
then
if
not
self
:
hasArcheryWeapon
(
"bow"
)
then
swap
=
true
warden_weapon
=
"bow"
end
end
if
swap
==
true
then
local
old_inv_access
=
self
.
no_inventory_access
-- Make sure clones can swap
self
.
no_inventory_access
=
nil
self
:
attr
(
"no_sound"
,
1
)
self
:
quickSwitchWeapons
(
true
,
"warden"
,
silent
)
self
:
attr
(
"no_sound"
,
-
1
)
self
.
no_inventory_access
=
old_inv_access
end
return
swap
,
dam
end
-- Target helper function for focus fire
checkWardenFocus
=
function
(
self
)
local
target
local
eff
=
self
:
hasEffect
(
self
.
EFF_WARDEN_S_FOCUS
)
if
eff
then
target
=
eff
.
target
end
return
target
end
-- Spell functions
makeParadoxClone
=
function
(
self
,
target
,
duration
)
local
m
=
target
:
cloneFull
{
shader
=
"shadow_simulacrum"
,
shader_args
=
{
color
=
{
0
.
6
,
0
.
6
,
0
.
2
},
base
=
0
.
8
,
time_factor
=
1500
},
no_drops
=
true
,
faction
=
target
.
faction
,
summoner
=
target
,
summoner_gain_exp
=
true
,
summon_time
=
duration
,
ai_target
=
{
actor
=
nil
},
ai
=
"summoned"
,
ai_real
=
"tactical"
,
name
=
""
..
target
.
name
..
"'s temporal clone"
,
desc
=
[[A creature from another timeline.]]
,
}
m
:
removeAllMOs
()
m
.
make_escort
=
nil
m
.
on_added_to_level
=
nil
m
.
on_added
=
nil
mod
.
class
.
NPC
.
castAs
(
m
)
engine
.
interface
.
ActorAI
.
init
(
m
,
m
)
m
.
exp_worth
=
0
m
.
energy
.
value
=
0
m
.
player
=
nil
m
.
max_life
=
m
.
max_life
m
.
life
=
util
.
bound
(
m
.
life
,
0
,
m
.
max_life
)
m
.
forceLevelup
=
function
()
end
m
.
on_die
=
nil
m
.
die
=
nil
m
.
puuid
=
nil
m
.
on_acquire_target
=
nil
m
.
no_inventory_access
=
true
m
.
no_levelup_access
=
true
m
.
on_takehit
=
nil
m
.
seen_by
=
nil
m
.
can_talk
=
nil
m
.
clone_on_hit
=
nil
m
.
self_resurrect
=
nil
m
.
escort_quest
=
nil
m
.
unused_talents
=
0
m
.
unused_generics
=
0
if
m
.
talents
.
T_SUMMON
then
m
.
talents
.
T_SUMMON
=
nil
end
if
m
.
talents
.
T_MULTIPLY
then
m
.
talents
.
T_MULTIPLY
=
nil
end
-- We use this function... a lot!!
-- So don't duplicate the inventory
if
m
.
inven
then
m
.
inven
[
m
.
INVEN_INVEN
]
=
nil
end
-- Clones never flee because they're awesome
m
.
ai_tactic
=
m
.
ai_tactic
or
{}
m
.
ai_tactic
.
escape
=
0
-- Remove some talents
local
tids
=
{}
for
tid
,
_
in
pairs
(
m
.
talents
)
do
local
t
=
m
:
getTalentFromId
(
tid
)
if
(
t
.
no_npc_use
and
not
t
.
allow_temporal_clones
)
or
t
.
remove_on_clone
then
tids
[
#
tids
+
1
]
=
t
end
end
for
i
,
t
in
ipairs
(
tids
)
do
if
t
.
mode
==
"sustained"
and
m
:
isTalentActive
(
t
.
id
)
then
m
:
forceUseTalent
(
t
.
id
,
{
ignore_energy
=
true
,
silent
=
true
})
end
m
:
unlearnTalentFull
(
t
.
id
)
end
-- remove timed effects
m
:
removeTimedEffectsOnClone
()
-- reset folds for our Warden clones
for
tid
,
cd
in
pairs
(
m
.
talents_cd
)
do
local
t
=
m
:
getTalentFromId
(
tid
)
if
t
.
type
[
1
]:
find
(
"^chronomancy/manifold"
)
and
m
:
knowTalent
(
tid
)
then
m
:
alterTalentCoolingdown
(
t
,
-
cd
)
end
end
-- And finally, a bit of sanity in case anyone decides they should blow up the world..
if
m
.
preferred_paradox
and
m
.
preferred_paradox
>
600
then
m
.
preferred_paradox
=
600
end
return
m
end
-- Make sure we don't run concurrent chronoworlds; to prevent lag and possible game breaking bugs or exploits
checkTimeline
=
function
(
self
)
if
game
.
_chronoworlds
==
nil
then
return
false
else
return
true
end
end
-- Misc. Paradox Talents
newTalent
{
name
=
"Spacetime Tuning"
,
...
...
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