v1.2.2.b2
## GENERAL - Updated CSS to version 1.0.369. - Upgraded the project from .NET 8.0 to .NET 10.0. - Updated Turkish language translation by @ByDexterTR. - Added Russian language translation by @213sdfsdgf. - Fixed an issue with incorrect display of Arabic nicknames. - Used ForceFullUpdate to resolve the "FATAL ERROR: CopyExistingEntity" crash. - Disabled stale HandleCommandDrop hook to avoid crashes when a player joins a team (thanks to @vladimir214sd). - Added new signatures to gamedata. - Added the ability to configure the number of grenades for every skill that uses grenades as part of its ability (e.g., Miner, AntyFlash, MagneticDecoy, etc.). ## SKILL IMPROVEMENTS - Re-Zombie: -- Fixed weapon switching issues when a player is holding a Zeus and a knife. -- Weapons are now removed for bots in zombie mode. - Ghost: -- Blocked the ability to use the Zeus. - Thorns: -- Added a configurable maximum health limit (37 HP) for the damage that can be reflected. - Second Life / Phoenix / Re-Zombie: -- Fixed an issue where players would occasionally fail to respawn if they took too much damage too quickly. - Ghost / Chicken: -- Blocked the ability to use the SG556 (`weapon_sg556`). - Wallhack: -- Fixed a bug that caused temporary enemy highlighting right after death. - Cypher: -- Added camera position persistence. - God Mode: -- Fixed an issue with permanent immortality triggering after reaching exactly 0 HP. - Weapons Swap: -- The ammo count is now also transferred when weapons are swapped. - Muhammed: -- Renamed the skill to "DeathBomb". - Spectator: -- Fixed a bug where a player with the Chicken skill would still display as a ragdoll after death when spectated. - Friendly Fire: -- The skill now works even when the server's mp_friendlyfire setting is set to 0. - Baseball: -- Disabled teammate killing.
This commit is contained in:
parent
cba834e8f0
commit
91761f7376
84 changed files with 6894 additions and 1689 deletions
|
|
@ -2,6 +2,7 @@ using CounterStrikeSharp.API;
|
|||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using src.utils;
|
||||
using System.Collections.Concurrent;
|
||||
using static src.jRandomSkills;
|
||||
|
||||
namespace src.player.skills
|
||||
|
|
@ -9,6 +10,7 @@ namespace src.player.skills
|
|||
public class Phoenix : ISkill
|
||||
{
|
||||
private const Skills skillName = Skills.Phoenix;
|
||||
private static readonly ConcurrentDictionary<uint, int> phoenixTicks = new();
|
||||
|
||||
public static void LoadSkill()
|
||||
{
|
||||
|
|
@ -26,12 +28,21 @@ namespace src.player.skills
|
|||
var pawn = victim.PlayerPawn.Value;
|
||||
if (pawn == null || !pawn.IsValid) return;
|
||||
|
||||
bool isProtected = phoenixTicks.TryGetValue(victim.Index, out int tick);
|
||||
if (isProtected && tick + 4 > Server.TickCount)
|
||||
{
|
||||
SkillUtils.AddHealth(pawn, 100 - pawn.Health);
|
||||
return;
|
||||
}
|
||||
|
||||
var playerInfo = PlayerManager.GetPlayerByIndex(victim.Index);
|
||||
if (playerInfo?.Skill != skillName || pawn.Health > 0) return;
|
||||
|
||||
if (Instance.Random.NextDouble() > playerInfo.SkillChance) return;
|
||||
if (victim.TeamChanged) return;
|
||||
|
||||
phoenixTicks[victim.Index] = Server.TickCount;
|
||||
|
||||
SkillUtils.AddHealth(pawn, 100 - pawn.Health);
|
||||
SkillUtils.PrintToChat(user, user.GetTranslation("phoenix_respawn"));
|
||||
|
||||
|
|
@ -51,8 +62,10 @@ namespace src.player.skills
|
|||
{
|
||||
var playerInfo = PlayerManager.GetPlayerByIndex(player!.Index);
|
||||
if (playerInfo == null) return;
|
||||
|
||||
float newChance = (float)Instance.Random.NextDouble() * (SkillsInfo.GetValue<float>(skillName, "ChanceTo") - SkillsInfo.GetValue<float>(skillName, "ChanceFrom")) + SkillsInfo.GetValue<float>(skillName, "ChanceFrom");
|
||||
playerInfo.SkillChance = newChance;
|
||||
|
||||
SkillUtils.PrintToChat(player, $"{ChatColors.DarkRed}{player.GetSkillName(skillName)}{ChatColors.Lime}: {player.GetSkillDescription(skillName, newChance)}",
|
||||
border: !Utilities.GetPlayers().Any(p => p.Team == player.Team && p != player) ? "tb" : "t");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue