Damage change, fog fix, Poisone effect postproces. triggers, scripts for posion zone modyfication

This commit is contained in:
szczuras4
2025-06-04 19:01:43 +02:00
parent 9e5e321d34
commit d76bfea09c
9 changed files with 1196 additions and 1122 deletions

View File

@@ -1,4 +1,5 @@
using UnityEngine;
namespace Invector
{
[System.Serializable]
@@ -14,7 +15,7 @@ namespace Invector
public bool ignoreDefense;
[Tooltip("Activated Ragdoll when hit the Character")]
public bool activeRagdoll;
[vHideInInspector("activeRagdoll"),Tooltip("Time to keep Ragdoll active")]
[vHideInInspector("activeRagdoll"), Tooltip("Time to keep Ragdoll active")]
public float senselessTime;
[HideInInspector]
public Transform sender;
@@ -22,7 +23,7 @@ namespace Invector
public Transform receiver;
[HideInInspector]
public Vector3 hitPosition;
public bool hitReaction = true;
public bool hitReaction = true; // To pole Invectora pozostaje
[HideInInspector]
public int recoil_id = 0;
[HideInInspector]
@@ -30,32 +31,65 @@ namespace Invector
public string damageType;
[HideInInspector] public Vector3 force;
// >>> NASZE NOWE POLE <<<
[Tooltip("If true, will attempt to bypass standard hit reaction animations, sounds, and events like OnReceiveDamage.")]
public bool ignoreAllHitEffects = false;
public vDamage()
{
this.damageValue = 15;
this.staminaBlockCost = 5;
this.staminaRecoveryDelay = 1;
this.hitReaction = true;
this.ignoreAllHitEffects = false; // Domyślnie efekty są włączone
}
public vDamage(int value)
{
this.damageValue = value;
this.hitReaction = true;
this.ignoreAllHitEffects = false; // Domyślnie efekty są włączone
}
public vDamage(int value, bool ignoreReaction)
// Ten konstruktor już istniał, zmodyfikujemy go lekko
// lub dodamy nowy, jeśli chcemy zachować stary w niezmienionej formie.
// Dla uproszczenia, zmodyfikujmy ten, aby przyjmował naszą nową flagę.
// Jeśli `ignoreReactionOrEffects` jest true, ustawiamy obie flagi.
public vDamage(int value, bool ignoreReactionAndAllEffects)
{
this.damageValue = value;
this.hitReaction = !ignoreReaction;
if (ignoreReaction)
this.ignoreAllHitEffects = ignoreReactionAndAllEffects; // Ustawiamy naszą nową flagę
if (ignoreReactionAndAllEffects)
{
this.hitReaction = false; // Jeśli ignorujemy wszystkie efekty, to reakcję też
this.recoil_id = -1;
this.reaction_id = -1;
}
else
{
this.hitReaction = true; // W przeciwnym razie standardowa reakcja
}
}
// Możesz też dodać bardziej specyficzny konstruktor tylko dla naszej flagi,
// jeśli chcesz mieć większą kontrolę:
/*
public vDamage(int value, bool setHitReaction, bool setIgnoreAllHitEffects)
{
this.damageValue = value;
this.hitReaction = setHitReaction;
this.ignoreAllHitEffects = setIgnoreAllHitEffects;
if (!setHitReaction) // Jeśli hitReaction jest false
{
this.recoil_id = -1;
this.reaction_id = -1;
}
}
}
*/
public vDamage(vDamage damage)
public vDamage(vDamage damage) // Konstruktor kopiujący
{
this.damageValue = damage.damageValue;
this.staminaBlockCost = damage.staminaBlockCost;
@@ -70,6 +104,9 @@ namespace Invector
this.hitPosition = damage.hitPosition;
this.senselessTime = damage.senselessTime;
this.force = damage.force;
this.hitReaction = damage.hitReaction; // Skopiuj oryginalne pole hitReaction
// >>> SKOPIUJ NASZE NOWE POLE <<<
this.ignoreAllHitEffects = damage.ignoreAllHitEffects;
}
/// <summary>