// // public string PresentableName() { // return name.ToString ().Replace ("WEAPON_", "").ToLower(); // } private void ApplyAbilityModifier(CheckSituation sit) { string targetName = AbilityGaugeNameFromType(sit.abilityType); int bonus = Sheet.AbilityScoreModifierValue(character.GaugeByName(targetName)); sit.checkValue.Modify(new Modifier(bonus, sit.abilityType.ToString().ToLower())); }
private void ApplyAbilityModifier(SaveSituation sit) { string gaugeName = Abilities.AbilityGaugeNameFromType(sit.abilityType); int bonus = Sheet.AbilityScoreModifierValue(character.GaugeByName(gaugeName)); sit.saveValue.Modify(new Modifier(bonus, sit.abilityType.ToString().ToLower())); }
string ModifierValue(string gaugeName) { int val = Sheet.AbilityScoreModifierValue(InventoryView.instance.currentCharacter.GaugeByName(gaugeName)); string sign = val >= 0 ? "+" : ""; return("(" + sign + val + ")"); }
private void ApplyDexterityToAC(AttackSituation sit) { int value = Sheet.AbilityScoreModifierValue(character.GaugeByName("dexterity")); GenericArmour armour = character.PaperDoll.Armour(); if (armour != null && value > armour.MaxDexterityACModifier) { value = armour.MaxDexterityACModifier; } sit.ArmorClassGauge.Modify(new Modifier(value, "Dexterity")); }
public int AttackAbilityModifier(string type) { int attackModifier = 0; if (type == "Dexterity") { attackModifier = Sheet.AbilityScoreModifierValue(character.GaugeByName("dexterity")); } else { attackModifier = Sheet.AbilityScoreModifierValue(character.GaugeByName("strength")); } return(attackModifier); }
private int SpellDCAbilityModifier(SpellLibrary.Spell spell) { switch (spell.classType) { case ClassType.WIZARD: return(Sheet.AbilityScoreModifierValue(character.GaugeByName("intelligence"))); break; default: Debug.LogError("You need to make ability modifier for spells DC: " + spell.classType); return(0); break; } }
private void ApplySpellAbilityAttackAndProficiencyBonus(Gauge toHit, ClassType classType) { string name = "intelligence"; switch (classType) { case ClassType.CLERIC: name = "wisdom"; break; default: break; } int mod = Sheet.AbilityScoreModifierValue(character.GaugeByName(name)); toHit.Modify(new Modifier(mod, name + " Bonus")); int proficiencyMod = character.ProficiencyModifier(); toHit.Modify(new Modifier(proficiencyMod, " Proficiency")); }
private void ApplyDexterityToInitiative(Gauge initiative) { int value = Sheet.AbilityScoreModifierValue(character.GaugeByName("dexterity")); initiative.Modify(new Modifier(value, "Dexterity")); }