//---------------------------------------------------------------------------- // RollInitiative //---------------------------------------------------------------------------- private void _RollInitiative() { AddDexModToInitiative dexModAlteration = new AddDexModToInitiative(MyHasStats.GetStatMod(StatsType.Dexterity)); MyGeneralRoller.AddAlteration(RollType.Initiative, this, dexModAlteration); Initiative = new InitiativeRollData(); MyGeneralRoller.Roll(RollType.Initiative, this, Initiative); }
public void SetAC(IIsVictim isVictim, IACAlterer acAlterer) { Equipment equipment = gameObject.GetComponent <Equipment>(); ArmorObject armorObject = equipment.MyArmor; int mod = armorObject.BaseAC; IHasStats hasStats = gameObject.GetComponent <HasStats>(); int dexMod = hasStats.GetStatMod(StatsType.Dexterity); if (armorObject.HasMaxDexMod && (dexMod > armorObject.MaxDexMod)) { dexMod = armorObject.MaxDexMod; } mod += dexMod; acAlterer.AddACMod(isVictim, mod); }