Skip to main content

WyrmMeleeSettings

A class in Root.Township, Alta.Intelligence.Wyrms.

Wyrm action component for melee attacks: reach, flurry chance, animator triggers and target weighting for ActiveMeleeAttack.

Constructors​

MemberWhat it is
WyrmMeleeSettings()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

7 private and internal fields
MemberWhat it is
private float changeTargetMultiplierBacking field for ChangeTargetMultiplier.
private string[] flurryAttackTriggersAnimator triggers used for flurry attacks.
private float flurryChancePerAttackBacking field for FlurryChancePerAttack.
private float hurtWeightingBacking field for HurtWeighting.
private string[] normalAttackTriggersAnimator triggers used for normal attacks.
private float reachBacking field for Reach.
private float sameTargetMultiplierBacking field for SameTargetMultiplier.

Properties​

MemberWhat it is
float ChangeTargetMultiplier { get; }Score multiplier when the target is not the wyrm's current one (default 0.8).
float FlurryChancePerAttack { get; }Added to the wyrm's flurry chance on each attack.
float HurtWeighting { get; }Weight of the hurt sense when scoring targets, so it favours whoever hurt it.
float Reach { get; }Attack range: targets score zero beyond it and full at half of it.
float SameTargetMultiplier { get; }Score multiplier when the target is the wyrm's current one.

Methods​

MemberWhat it is
string GetRandomAttack(bool isFlurry)Picks a random animator trigger from the flurry or normal attack list.
protected override IAction GetAction()Returns the ActiveMeleeAttack action for these settings.

Used in​

Members of other types that take, return or hold a WyrmMeleeSettings: