void Damageable.Dot(DotFrame frame) { if (Invulnerable) { return; } if (Faction != Factions.AgainstAll) { if (frame.attacker != null) { if (frame.attacker.Faction != Factions.AgainstAll) { if (frame.attacker.Faction == Faction) { return; } } } } //these would stick forever if (frame.damagePerApplication <= 0) { return; } OnDot.Invoke(frame); if (frame.attacker != null) { if (frame.attacker.Faction == Factions.Player) { frame.totalDamage = (int)System.Math.Round((double)frame.totalDamage * ((double)Difficulty.PlayerDamage / 100d)); } else { frame.totalDamage = (int)System.Math.Round((double)frame.totalDamage * ((double)Difficulty.EnemyDamage / 100d)); } } GameObject ailment = new GameObject("dot"); ailment.transform.SetParent(transform); DotStack d = ailment.AddComponent <DotStack>(); d.damageType = frame.damageType; d.totalDamage = frame.totalDamage; d.damagePerApplication = frame.damagePerApplication; }
void Damageable.Dot(DotFrame frame) { if (frame.damageType != DamageType.Fire) { return; } if (BurningEffectPrefab != null) { if (burningEffect == null) { burningEffect = Instantiate(BurningEffectPrefab, transform.position, Quaternion.identity, transform); } } }