Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
63
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
tome
Tales of MajEyal
Merge requests
!91
Cleansing vault
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Cleansing vault
0player/t-engine4:cleansing_vault
into
master
Overview
0
Commits
1
Pipelines
0
Changes
Merged
Alex Ksandra
requested to merge
0player/t-engine4:cleansing_vault
into
master
10 years ago
Overview
0
Commits
1
Pipelines
0
Changes
0
Expand
bluh
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
8dddfcb5
1 commit,
10 years ago
+
12
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua
+
12
−
9
Options
@@ -142,16 +142,19 @@ newTalent{
game.zone:applyEgo(o, new_ego, "object")
if in_dialog then self:talentDialogReturn(true) end
else
if old_ego then game.zone:applyEgo(o, old_ego, "object"
, true
) end -- nothing happened
if old_ego then game.zone:applyEgo(o, old_ego, "object") end -- nothing happened
game.logPlayer(self, "You cannot reshape your %s any further.", o:getName{do_colour=true, no_count=true})
end
else
local armour = t.arm_boost(self, t)
local fat = t.fat_red(self, t)
local old_fat = (o.old_fat or 0)
local old_arm
old_arm = o.wielder.combat_armor
local old_arm = o.wielder and o.wielder.combat_armor or 0
local old_ego = game.zone:removeEgoByName(o, "reshape armour")
-- Not a huge deal
o.wielder = o.wielder or {}
o.wielder.combat_armor = o.wielder.combat_armor or 0
o.wielder.fatigue = o.wielder.fatigue or 0
local force_reshape = false
if not old_ego and o.been_reshaped then
o.wielder.combat_armor = o.orig_arm
@@ -160,7 +163,7 @@ newTalent{
-- if an older version, just reshape anyway
-- if reshapen by better TL, keep it
fat = math.max(fat, old_fat)
armour = math.max(armour, o.wielder.combat_armo
u
r - old_arm)
armour = math.max(armour, o.wielder.combat_armor - old_arm)
force_reshape = true
elseif old_ego and old_fat == 0 then -- in case of future backward compatibility removal
old_fat = old_ego.fatigue_reduction
@@ -168,23 +171,23 @@ newTalent{
o.old_fat, o.orig_fat, o.orig_arm = nil, nil, nil
if force_reshape or old_fat < fat or old_arm < o.wielder.combat_armor + armour then
local real_fat
if
e
.wielder.fatigue < 0 then real_fat = 0
else real_fat = min(fat,
e
.wielder.fatigue) end
if
o
.wielder.fatigue < 0 then real_fat = 0
else real_fat =
math.
min(fat,
o
.wielder.fatigue) end
local new_ego = Entity.new{
name = "reshape armour",
display_string = "reshaped["..tostring(armour)..","..tostring(real_fat).."%] ", display_prefix = true,
been_reshaped = true,
wielder = {combat_armo
u
r=arm, fatigue=-real_fat},
wielder = {combat_armor=arm
our
, fatigue=-real_fat},
fatigue_reduction = fat,
old_fat = fat, orig_fat = o.wielder.fatigue, orig_arm = o.wielder.armour, -- Easier this way
fake_ego = true, unvault_ego = true,
}
game.logPlayer(self, "You reshape your %s.", o:getName{do_colour=true, no_count=true})
if o.orig_name then o.name = o.orig_name end --Fix name for items affected by older versions of this talent
game.zone:applyEgo(o, new_ego, "object"
, true
)
game.zone:applyEgo(o, new_ego, "object")
if in_dialog then self:talentDialogReturn(true) end
else
game.zone:applyEgo(o, old_ego, "object"
, true
)
game.zone:applyEgo(o, old_ego, "object")
game.logPlayer(self, "You cannot reshape your %s any further.", o:getName{do_colour=true, no_count=true})
end
end
Loading