A class in Root.Township, the global namespace.
A skill that multiplies the damage of a strong enough hit with a tool on a given impact channel, by an amount that grows with the skill's level. A ScriptableObject asset.
Constructors
| Member | What it is |
|---|
PowerHit() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private float[] damageModifierPerLevel | Damage multiplier for each skill level, index 0 being level 1. |
private float minimumEffectivenes | Smallest hit effectiveness (0 to 1) that triggers the skill. |
private ImpactChannel targetImpactChannel | The impact channel the tool must have for the skill to apply. |
Methods
| Member | What it is |
|---|
override void ExecuteWithHit(HeldPickupHandler handler, ImpactHitWithTool hitWithTool, bool hasHit = true) | Multiplies the hit's damage by the modifier for the player's level in this skill, then runs the base skill. |
override bool ValidateExecutionHit(ProgressionPath path, ImpactHitWithTool hitWithTool) | True when the hit is at least minimumEffectivenes effective and the tool hits on targetImpactChannel (as its first channel, if it has one). |
override bool ValidatePickup(HeldPickupHandler pickupHandler) | True when the held pickup is a tool with targetImpactChannel. |