public void Tick() { if (m_nDuratation > 0) { m_nDuratation--; GameObject objectAbove = pickEnemyOrFriend.GetObjectInPosition(touchedField.transform.position); if (objectAbove != null) { int killChance = trapTalent.GetBonusPercentage(); var rollDice = Random.Range(0, 100); if (rollDice < killChance) // kill { BishopInstantDeathSpell.Activate(objectAbove); } } } if (m_nDuratation == 0) { FxMgr.Instance.DeactivateTrapFX(); } }