Skip to content

Commit

Permalink
New: Gambler, Sociopath perk skills
Browse files Browse the repository at this point in the history
  • Loading branch information
zenyr committed Dec 20, 2015
1 parent c958000 commit 102072f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
25 changes: 23 additions & 2 deletions Hud3.lua
Expand Up @@ -5,7 +5,7 @@ feel free to ask me through my mail: zenyr(at)zenyr.com. But please understand t
]]
-- Note: Due to quirky PreCommit hook, revision number would *appear to* be 1 revision before than "released" luac files.
local _ = UNDERSCORE
local REV = 388
local REV = 389
local TAG = '0.31'
local inGame = CopDamage ~= nil
local inGameDeep
Expand Down Expand Up @@ -41,6 +41,7 @@ local _BAGS = {

local _BROADCASTHDR, _BROADCASTHDR_HIDDEN = Icon.Div,Icon.Ghost
local skillIcon = 'guis/textures/pd2/skilltree/icons_atlas'
local perkIcon = 'guis/textures/pd2/specialization/icons_atlas'
local now = function (type) return type and TimerManager:game():time() or managers.player:player_timer():time() end
local _conv = {
city_swat = L('_mob_city_swat'),
Expand Down Expand Up @@ -701,6 +702,22 @@ function TPocoHud3:_checkBuff(t)
self:RemoveBuff('stamina')
end
end
-- KillSkills
local plrManager = managers.player
local t = Application:time()
local killshotT = plrManager._on_killshot_t
if (killshotT and killshotT > t) then
local left = killshotT - t
local total = tweak_data.upgrades.on_killshot_cooldown
self:Buff({
key= 'killshot', good=false,
icon= perkIcon,
iconRect = { 3*64, 5*64, 64, 64 },
st=1-left/total, et=1
})
else
self:RemoveBuff('killshot')
end
-- Suppression
local supp = _.g('managers.player:player_unit():character_damage():effective_suppression_ratio()')
if supp and supp > 0 then
Expand Down Expand Up @@ -1629,6 +1646,8 @@ function TPocoHud3:_hook()
rectDict.first_aid_damage_reduction = {L('_buff_first_aid_damage_reduction_upgrade'),{1,11}}
rectDict.melee_life_leech = {L('_buff_lifeLeechShort'),{7,4},true,true}
rectDict.dmg_dampener_close_contact = {L('_buff_first_aid_damage_reduction_upgrade'),{5,4},true}
rectDict.loose_ammo_give_team = {L('_buff_gambler_ammo'),{5,5},true}
rectDict.loose_ammo_restore_health = {L('_buff_gambler_health'),{4,5},true}

local _keys = { -- Better names for Option pnls
BerserkerDamageMultiplier = 'SwanSong',
Expand All @@ -1639,7 +1658,9 @@ function TPocoHud3:_hook()
OverkillDamageMultiplier = 'Overkill',
NoAmmoCost = 'Bulletstorm',
MeleeLifeLeech = 'LifeLeech',
DmgDampenerCloseContact = 'CloseCombat'
DmgDampenerCloseContact = 'CloseCombat', -- infiltrator
LooseAmmoRestoreHealth = 'GamblerAmmo',
LooseAmmoGiveTeam = 'GamblerHealth',
}
hook( PlayerManager, 'activate_temporary_upgrade', function( self, category, upgrade )
Run('activate_temporary_upgrade', self, category, upgrade )
Expand Down
3 changes: 3 additions & 0 deletions Hud3_Options.lua
Expand Up @@ -60,6 +60,9 @@ local scheme = {
showFirstAid = {'bool',TRUE,nil,'_opt_showFirstAid_desc'},
showLifeLeech = {'bool',TRUE,nil,'_opt_showLifeLeech_desc'},
showCloseCombat = {'bool',TRUE,nil,'_opt_showCloseCombat_desc'},
showKillshot = {'bool',FALSE,nil,'_opt_showKillshot_desc'},
showGamblerAmmo = {'bool',TRUE,nil,'_opt_showGambler_desc'},
showGamblerHealth = {'bool',TRUE,nil,'_opt_showGambler_desc'},

noSprintDelay = {'bool',TRUE,nil,'_opt_noSprintDelay_desc',nil,nil,4},
hideInteractionCircle = {'bool',FALSE,nil,'_opt_hideInteractionCircle_desc',nil,nil,4},
Expand Down
7 changes: 7 additions & 0 deletions hud3_localeEN.json
Expand Up @@ -19,6 +19,8 @@
"_buff_combatMedicDamageShort": "Attack Buff",
"_buff_exhausted": "Exhausted",
"_buff_first_aid_damage_reduction_upgrade": "Defense Buff",
"_buff_gambler_ammo": "Ammo",
"_buff_gambler_health": "Health",
"_buff_lifeLeechShort": "Life Leech",
"_buff_overkillShort": "Attack Buff",
"_buff_painkillerShort": "Defense Buff",
Expand Down Expand Up @@ -299,6 +301,9 @@
"_opt_showFirstAid_desc": "Show 'Quick fix Aced' skill buff duration",
"_opt_showFPS": "SHOW FPS",
"_opt_showFPS_desc": "Show FPS",
"_opt_showGamblerAmmo": "SHOW GAMBLER AMMO",
"_opt_showGamblerHealth": "SHOW GAMBLER HEALTH",
"_opt_showGambler_desc": "Show gambler perk's each cooldowns",
"_opt_showHighlighted": "SHOW HIGHLIGHTED",
"_opt_showHighlighted_desc": "Show floating infobox while highlighted.\nPager answering timer also depends on this.",
"_opt_showHostages": "SHOW HOSTAGES",
Expand All @@ -316,6 +321,8 @@
"_opt_showInteractionTime_desc": "How much time left",
"_opt_showKill": "SHOW KILL",
"_opt_showKill_desc": "Kill counter",
"_opt_showKillshot": "SHOW KILLSKILLS",
"_opt_showKillshot_desc": "Show kill skills' cooldowns (e.g. Sociopath perk)",
"_opt_showLifeLeech": "SHOW LIFE DRAIN",
"_opt_showLifeLeech_desc": "Show Infiltrator 10% life leech cooldown",
"_opt_showMusicTitle": "SHOW MUSIC TITLE",
Expand Down

0 comments on commit 102072f

Please sign in to comment.