public override Attack GetAttack(Entity defender) { // default to barehanded Roller damage = Roller.Dice(1, 3); Element element = Element.Anima; string verb = Verbs.Hit; EffectType effectType = EffectType.Hit; IFlagCollection flags = new FlagCollection(); // find the equipped melee weapon Item weapon = Equipment.MeleeWeapon; if (weapon != null) { damage = weapon.Attack.Damage; element = weapon.Attack.Element; verb = weapon.Attack.Verb; flags = weapon.Flags; //### bob: temp. need to get from weapon data effectType = EffectType.Stab; } var attack = new Attack(damage, MeleeStrikeBonus, MeleeDamageBonus, element, verb, effectType, flags); // give the class a chance to modify it mClass.BeforeAttack(defender, attack); return(attack); }
public PowerType(Content content, string name, bool isPrefix, IEnumerable <string> categories, object appearance) : base(content) { mName = name; IsPrefix = isPrefix; mCategories.AddRange(categories); Appearance = appearance; // default to no bonus StrikeBonus = Roller.Fixed(0); DamageBonus = Roller.Fixed(10); ArmorBonus = Roller.Fixed(0); StatBonus = Roller.Fixed(0); SpeedBonus = Roller.Fixed(0); Element = null; Flags = new FlagCollection(); }