From 7dedffbf358edb4d3b9222c41b3d61b50d8a4e64 Mon Sep 17 00:00:00 2001 From: hummusbird Date: Tue, 11 Jan 2022 11:42:01 +0000 Subject: One in the Chamber - Balancing (#78) * stop melee from scoring points * switch gun to wingman elite * add wingman elite mod * add playlistvar for wingman_n --- .../keyvalues/scripts/weapons/mp_weapon_wingman_n.txt | 11 +++++++++++ .../scripts/vscripts/gamemodes/_gamemode_chamber.nut | 19 +++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt diff --git a/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt new file mode 100644 index 00000000..ba6f0964 --- /dev/null +++ b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt @@ -0,0 +1,11 @@ +WeaponData +{ + Mods + { + one_in_the_chamber + { + damage_near_value "9999" + damage_far_value "9999" + } + } +} \ No newline at end of file diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut index bbd669cd..5768dcfa 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut @@ -22,6 +22,10 @@ void function ChamberInitPlayer( entity player ) UpdateLoadout( player ) } +int function GetChamberWingmanN(){ + return GetCurrentPlaylistVarInt( "chamber_wingman_n", 0 ) +} + void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageInfo ) { if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing || attacker == victim) @@ -29,10 +33,17 @@ void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageI if ( attacker.IsPlayer() ) { - attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) - AddTeamScore( attacker.GetTeam(), 1 ) + if ( (DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman_n) || (DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman) ) + { + attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) + AddTeamScore( attacker.GetTeam(), 1 ) + } + if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution ) { + attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) + AddTeamScore( attacker.GetTeam(), 1 ) + string message = victim.GetPlayerName() + " got executed." foreach ( entity player in GetPlayerArray() ) SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 ) @@ -75,8 +86,8 @@ void function UpdateLoadout( entity player ) player.TakeWeaponNow( weapon.GetWeaponClassName() ) array mods = ["one_in_the_chamber"] - player.GiveWeapon( "mp_weapon_wingman", mods) - player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE ) + player.GiveWeapon( (GetChamberWingmanN() ? "mp_weapon_wingman_n" : "mp_weapon_wingman"), mods) + player.GiveOffhandWeapon( "melee_pilot_kunai", OFFHAND_MELEE ) thread SetAmmo( player ) } -- cgit v1.2.3