Skip to content

Last Stand

juanosarg edited this page Sep 8, 2022 · 1 revision

CompLastStand makes an animal increase its attack speed as it loses health, with a configurable upper limit because we don't want a divide by zero error when it dies ;)

    //A comp class that makes animals scale their melee cooldowns the more damaged they are

    public float finalCoolDownMultiplier = 2f;

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. For example, this allows the Muffalochicken in Vanilla Genetics Expanded to increase their attack speed as they are damaged:

<comps>
	<li Class="AnimalBehaviours.CompProperties_LastStand">
		<finalCoolDownMultiplier>6</finalCoolDownMultiplier>
	</li>
</comps>

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Genes

Apparel

Cuisine

Furniture

Plants

Deprecated

Clone this wiki locally