public static DieString ResolveDamageString(AttackTag att, Beast beast) { DieString dmg; switch (att.Base) { case AttackBases.Thrust: dmg = beast.ThrustDamage.Add(att.Mod); break; case AttackBases.Swing: dmg = beast.SwingDamage.Add(att.Mod); break; case AttackBases.HalfSTThr: dmg = GurpsLookup.Instance.ThrustDamage(beast.ST + att.Mod / 2); att.BaseDamage = dmg; break; case AttackBases.HalfSTSw: dmg = GurpsLookup.Instance.SwingDamage(beast.ST + att.Mod / 2); att.BaseDamage = dmg; break; case AttackBases.Other: dmg = att.BaseDamage; break; default: throw new ArgumentOutOfRangeException(); } return(dmg); }
public override object Clone() { AttackTag clone = new AttackTag(); this.Copy(this, clone); return(clone); }
public static int ResolveAbsoluteLevel(AttackTag att, Beast beast) { int basic = att.RelativeLevel; switch (att.BaseStat) { case BaseStat.ST: basic += beast.ST; break; case BaseStat.DX: basic += beast.DX; break; case BaseStat.IQ: basic += beast.IQ; break; case BaseStat.HT: basic += beast.HT; break; case BaseStat.Per: basic += beast.Perception; break; case BaseStat.Will: basic += beast.Will; break; case BaseStat.Other: basic = att.AbsoluteLevel; break; default: throw new ArgumentOutOfRangeException(); } if (att.CanParry) { att.Parry = 3 + basic / 2; } return(basic); }
private void AddNaturalAttacks(IBeast beast) { //First get the bodyplans var plan = beast.Tags.FirstOrDefault(x => x is BodyPlan) as BodyPlan; AttackTag att = new AttackTag() { RelativeLevel = App.rng.Next(0, 3), AttackName = "Natural Attack", Base = AttackBases.Thrust, DamageType = DamageType.Crush, BaseStat = BaseStat.DX, CanParry = false, }; if (plan == null || plan.Limbs <= 0) { return; } att.Reach = plan.LimbLength; beast.AddTag(att); }
private static void AddBite(IBeast beast) { beast.Name = $"Beast {beast.Difficulty}"; List <DamageType> biteTypes = new List <DamageType> { DamageType.Crush, DamageType.Cut, DamageType.Impale }; AttackTag biteAttackTag = new AttackTag { RelativeLevel = App.rng.Next(0, 3), AttackName = "Bite", Base = AttackBases.Thrust, DamageType = biteTypes[App.rng.Next(biteTypes.Count)], BaseStat = BaseStat.DX, CanParry = false, }; beast.AddTag(biteAttackTag); }