Forum begins after the advertisement:
See discounted assets
-
::Hi,
I posted a comment last month in part 23 before I realised the forums were the best place.
In 3F, is it meant to be “s1.damage += s2.damage” instead of adding maxHealth?
Kind Regards,
Sean
::You’re right! Thank you for flagging this.
For anyone else reading this, the issue is here in the EnemyStats.Stats
struct:
// Use the add operator to add stats to the enemy.
public static Stats operator +(Stats s1, Stats s2) {
s1.maxHealth += s2.maxHealth;
s1.moveSpeed += s2.moveSpeed;
s1.damage += s2.maxHealths2.damage;
s1.knockbackMultiplier += s2.knockbackMultiplier;
s1.resistances += s2.resistances;
return s1;
}
// Use the multiply operator to scale stats.
// Used by the buff / debuff system.
public static Stats operator *(Stats s1, Stats s2)
{
s1.maxHealth *= s2.maxHealth;
s1.moveSpeed *= s2.moveSpeed;
s1.damage *= s2.maxHealths2.damage;
s1.knockbackMultiplier *= s2.knockbackMultiplier;
s1.resistances *= s2.resistances;
return s1;
}
By the way:
::I’m glad I could help <3
Advertisement below: