private static void RandomTeleport(PlayerScript ps, TortureSeverity severity)
    {
        int randX = (int)severity * 100 * Random.Range(-5, 5);
        int randY = (int)severity * 100 * Random.Range(-5, 5);

        ps.playerSync.SetPosition(new Vector2(randX, randY));
    }
 public static void Torture(PlayerScript ps, TortureSeverity severity = TortureSeverity.M)
 {
     Debug.Log($"Player {ps.gameObject} is now being tortured with '{severity}' severity. Enjoy");
     //todo: torture sequences
     Bleed(ps, severity);
     DropShit(ps, severity);
     if (severity >= TortureSeverity.L)
     {
         RandomTeleport(ps, severity);
     }
 }
    public static void Torture(GameObject player, TortureSeverity severity = TortureSeverity.M)
    {
        var ps = player.GetComponent <PlayerScript>();

        if (!ps)
        {
            Debug.LogWarning("Cannot torture :( not a player");
            return;
        }
        Torture(ps, severity);
    }
Example #4
0
    public static void Torture(GameObject player, TortureSeverity severity = TortureSeverity.M)
    {
        var ps = player.GetComponent <PlayerScript>();

        if (!ps)
        {
            Logger.LogWarningFormat("Cannot torture {0}, not a player.", Category.Security, player.name);
            return;
        }
        Torture(ps, severity);
    }
 private static void DropShit(PlayerScript ps, TortureSeverity severity)
 {
     if (severity >= TortureSeverity.L)
     {
         ps.playerNetworkActions.DropAll();
         return;
     }
     for (int i = 0; i < (int)severity; i++)
     {
         ps.playerNetworkActions.DropItem();
     }
 }
 private static void Bleed(PlayerScript ps, TortureSeverity severity)
 {
     ps.playerHealth.AddBloodLoss(( int )Mathf.Pow(2, ( float )severity));
 }
Example #7
0
    private static void Bleed(PlayerScript ps, TortureSeverity severity)
    {
        BodyPartBehaviour bodyPart = ps.playerHealth.FindBodyPart(BodyPartType.Chest);

        ps.playerHealth.bloodSystem.AddBloodLoss(( int )Mathf.Pow(2, ( float )severity), bodyPart);
    }