Exemplo n.º 1
0
 public static float ArmorClass(Character character)
 {
     var sta = character.Stats;
     return sta[StaticStats.ArmorBonus] +
            sta[StaticStats.ShieldBonus] +
            sta[DexterityModifier] +
            sta[StaticStats.NaturalArmor] +
            sta[StaticStats.DeflectionModifier] +
            10f;
     //add size
 }
Exemplo n.º 2
0
 public StatSet(Character character)
 {
     stats = new Dictionary<string, IStat>();
     using(var container = new CompositionContainer(new AssemblyCatalog(typeof(StatSet).Assembly)))
     {
         foreach(var val in container.GetExports<Retriever>())
         {
             var method = val.Value;
             var name = method.Method.Name;
             var stat = new DynamicStat(method, character);
             stats[name] = stat;
         }
     }
 }
Exemplo n.º 3
0
 public static float CombatManueverBonus(Character character)
 {
     var sta = character.Stats;
     return sta[BaseAttackBonus] + sta[StrengthModifier];
     //Add size modifier.
 }
Exemplo n.º 4
0
 public static float ChrismaModifier(Character character)
 {
     var sta = character.Stats;
     var abi = AbilityChange(sta[StaticStats.ChrismaScore] + sta[StaticStats.ChrismaTempAdjustment]);
     return abi + sta[StaticStats.ChrismaTempModifier];
 }
Exemplo n.º 5
0
 public static float BaseAttackBonus(Character character)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 public DynamicStat(Retriever retriever, Character character)
 {
     this.retriever = retriever;
     this.character = character;
 }
Exemplo n.º 7
0
 public static float WisdomModifier(Character character)
 {
     var sta = character.Stats;
     var abi = AbilityChange(sta[StaticStats.WisdomScore] + sta[StaticStats.WisdomTempAdjustment]);
     return abi + sta[StaticStats.WisdomTempModifier];
 }
Exemplo n.º 8
0
 public static float TouchArmorClass(Character character)
 {
     var sta = character.Stats;
     return sta[DexterityModifier] +
            sta[StaticStats.DeflectionModifier] +
            10f;
     //add size
 }
Exemplo n.º 9
0
 public static float StrengthModifier(Character character)
 {
     var sta = character.Stats;
     var abi = AbilityChange(sta[StaticStats.StrengthScore] + sta[StaticStats.StrengthTempAdjustment]);
     return abi + sta[StaticStats.StrengthTempModifier];
 }
Exemplo n.º 10
0
 public static float IntelligenceModifier(Character character)
 {
     var sta = character.Stats;
     var abi = AbilityChange(sta[StaticStats.IntelligenceScore] + sta[StaticStats.IntelligenceTempAdjustment]);
     return abi + sta[StaticStats.IntelligenceTempModifier];
 }
Exemplo n.º 11
0
 public static float Initiative(Character character)
 {
     var sta = character.Stats;
     return sta[StaticStats.InitiativeMiscModifier] + sta[DexterityModifier];
 }
Exemplo n.º 12
0
 public static float DexterityModifier(Character character)
 {
     var sta = character.Stats;
     var abi = AbilityChange(sta[StaticStats.DexterityScore] + sta[StaticStats.DexterityTempAdjustment]);
     return abi + sta[StaticStats.DexterityTempModifier];
 }
Exemplo n.º 13
0
 public static float ConstitutionModifier(Character character)
 {
     var sta = character.Stats;
     var abi = AbilityChange(sta[StaticStats.ConstitutionScore] + sta[StaticStats.ConstitutionTempAdjustment]);
     return abi + sta[StaticStats.ConstitutionTempModifier];
 }
Exemplo n.º 14
0
 public static float CombatManueverDefense(Character character)
 {
     var sta = character.Stats;
     return sta[BaseAttackBonus] + sta[DexterityModifier] +
         sta[StrengthModifier] + 10;
     //Add size modifier.
 }
Exemplo n.º 15
0
        public void TestMethod1()
        {
            var character = new Character();

            var stat = character.Stats[DynamicMethods.ArmorClass];
        }