module

Oliver's Dark Heresy 2E Extras

Endorsements
0
Installs
0.23%
Comments
0
Latest version0.2.0
Minimum Core9.238
Compatible Core9.238
Last updated2 years ago
Created3 years ago
Authors
Languages
Systems All systems
Project source Project URL

Oliver's Dark Heresy 2 Extras

An extention to moo-man's excellent DarkHeresy2E-FoundryVTT.

This module only optionally depends on the DH2 System and about-time. If they're not installed then the functions simply won't be loaded.

This module adds some extra functionality to the Actor and DarkHeresyActor classes enabling you do do cool things like:

 

// Let's say that you've ruled that Takedown can only be done once per day
// Otherwise your character get's dizzy

// We need some status effect to indicate that the character is dizzy
// Or at least I like to so that it's visible on the token
const dizzyStatusEffect = "stun";
async main() {
    const actor = game.user.character;

    // You can only use Takedown if you have the talent
    if (actor.hasTalent("Takedown")) {
        if (actor.hasStatusEffect(dizzyStatusEffect)) {
            ui.notification.warn("This character can't perform a Takedown twice in one day");
            // You could use actor.timeUntilStatusEffectExpiry(dizzyStatusEffect)
            // to display how long until they can use Takedown again
        } else {
            // Do stuff for the takedown

            actor.enableStatusEffectFor(dizzyStatusEffect, {hours: 1});
        }
    } else {
        ui.notification.warn("This character can't perform a Takedown");
        ui.notification.warn("You'll need to invest in the talent first");
    }
}

main();

 

The docs have more examples and more functions, take a look :)

Documentation

API Docs

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x