EtG Modding Guide

Adding status effects to a projectile

Difficulty: 1/10

adding status effects to a projectile is extremely easy and all follow the same method, with the small exception of stun. First, you get your projectile, then you set whether it applies an effect with a bool to true. Finally, you specify what chance there should be for it to apply the effect. The chance should be a value less than or equal to one. 1 = 100%, 0.45 = 45%, 0.73 = 73%, etc.
Below is a list of all the possible effects:
projectile.AppliesBleed = true;
projectile.BleedApplyChance = 0.5f;
projectile.AppliesCharm = true;
projectile.CharmApplyChance = 0.5f;
projectile.AppliesCheese = true;
projectile.CheeseApplyChance = 0.5f;
projectile.AppliesFire = true;
projectile.FireApplyChance = 0.5f;
projectile.AppliesFreeze = true;
projectile.FreezeApplyChance = 0.5f;
projectile.AppliesPoison = true;
projectile.PoisonApplyChance = 0.5f;
projectile.AppliesStun = true;
projectile.StunApplyChance = 0.5f;
projectile.AppliedStunDuration = 2f;
as you can clearly see they all function the same way, with the only exception being stun, which needs a value for how long the enemy should