From df70842364a7a0bbd1451b4d8204856f9b50edbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nopied=E2=97=8E?= Date: Tue, 29 Aug 2023 03:48:39 +0900 Subject: [PATCH] soldier backup finish --- addons/sourcemod/scripting/freak_fortress_2.sp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/sourcemod/scripting/freak_fortress_2.sp b/addons/sourcemod/scripting/freak_fortress_2.sp index 4d41706..a17b29e 100644 --- a/addons/sourcemod/scripting/freak_fortress_2.sp +++ b/addons/sourcemod/scripting/freak_fortress_2.sp @@ -2579,7 +2579,7 @@ public Action TF2Items_OnGiveNamedItem(int client, char[] classname, int iItemDe }*/ case 226: //Battalion's Backup { - Handle itemOverride=PrepareItemHandle(item, _, _, "140 ; 10.0"); + Handle itemOverride=PrepareItemHandle(item, _, _, "140 ; 10.0 ; 4365 ; 1.5"); if(itemOverride!=null) { item=itemOverride; @@ -5744,17 +5744,18 @@ public Action OnTakeDamageAlive(int client, int& iAttacker, int& inflictor, floa // rage: 62.3, drain: 54.6 float realDamage = damage * 1.53846; // player damamge -35% - if(damagetype & DMG_CRIT && TF2_IsPlayerCritBuffed(iAttacker)) + if(TF2_IsPlayerCritBuffed(iAttacker)) realDamage *= 3.0; - else if(damagetype & DMG_CRIT && TF2_IsPlayerInCondition(iAttacker, TFCond_Buffed)) + else if(TF2_IsPlayerInCondition(iAttacker, TFCond_Buffed)) realDamage *= 1.35; damage *= 0.3; int buffer = TF2Util_GetPlayerConditionProvider(client, TFCond_DefenseBuffed); if(!IsValidClient(buffer)) return Plugin_Changed; - float rage = GetEntPropFloat(buffer, Prop_Send, "m_flRageMeter"), - drain = rage - (max(0.0, (realDamage - damage) / 1200.0) * 100.0); + float multiplier = TF2Attrib_HookValueFloat(1.0, "mod_buff_duration", buffer), + rage = GetEntPropFloat(buffer, Prop_Send, "m_flRageMeter"), + drain = rage - (max(0.0, (realDamage - damage) / (1200.0 * multiplier)) * 100.0); SetEntPropFloat(buffer, Prop_Send, "m_flRageMeter", drain); // PrintToChatAll("realDamage: %.1f, damage: %.1f", realDamage, damage);