Code: Select all
// Chance for poisoned weapon
if (player.Level > 1)
{
DaggerfallUnityItem weapon = enemyEntity.ItemEquipTable.GetItem(EquipSlots.RightHand);
if (weapon != null && (enemyEntity.EntityType == EntityTypes.EnemyClass || enemyEntity.MobileEnemy.ID == (int)MobileTypes.Orc
|| enemyEntity.MobileEnemy.ID == (int)MobileTypes.Centaur || enemyEntity.MobileEnemy.ID == (int)MobileTypes.OrcSergeant))
{
int chanceToPoison = 5;
if (enemyEntity.MobileEnemy.ID == (int)MobileTypes.Assassin)
chanceToPoison = 60;
if (Dice100.SuccessRoll(chanceToPoison))
{
// Apply poison
weapon.poisonType = (Items.Poisons)UnityEngine.Random.Range(128, 135 + 1);
}
}
}
From reading some things on the Wiki (which I know is often inaccurate) I thought that only "thief" classes could spawn with poisoned weapons, or at the very least that those types had an increased chance of it happening, not just the assassin. Well, I guess this makes poison resistance an even more useful trait now that I know this, lol.