Skip to content

Commit

Permalink
0.0.76 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk123999 committed Mar 13, 2023
1 parent 5442588 commit fc201db
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.0.76:
## New Content:
- Drow: Hand Crossbow
- Drow Inquisitor: Death Lance

# 0.0.75:
## New Content:
- Order of the Mutant Blood Hunter: Mutagencraft
Expand Down
8 changes: 7 additions & 1 deletion packs/cpr-monster-features.db

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion scripts/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ async function itemConfig(itemDocument) {
} else if (itemDocument.actor.type === 'npc') {
let folderAPI = game.CF.FICFolderAPI;
let allFolders = await folderAPI.loadFolders('chris-premades.CPR Monster Features');
let monsterFolder = allFolders.find(f => f.name === itemDocument.actor.name);
let itemActor = itemDocument.actor;
let monsterName = itemActor.name;
let sourceActor = game.actors.get(itemActor.id);
if (sourceActor) monsterName = sourceActor.name;
let monsterFolder = allFolders.find(f => f.name === monsterName);
if (!monsterFolder) {
ui.notifications.info('No available automation for this monster! (Or monster has a different name)');
return;
Expand Down
2 changes: 2 additions & 0 deletions scripts/macros.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {dragonVessel} from './macros/items/dragonVessel.js';
import {dragonsBreath} from './macros/spells/dragonsBreath.js';
import {dragonsWrath} from './macros/items/dragonsWrath.js';
import {dreadAmbusher} from './macros/classFeatures/ranger/gloomStalker/dreadAmbusher.js';
import {drow} from './macros/monsterFeatures/drow/drow.js';
import {dybbuk} from './macros/monsterFeatures/dybbuk/dybbuk.js';
import {elderBrain} from './macros/monsterFeatures/elderBrain/elderBrain.js';
import {elderOblex} from './macros/monsterFeatures/elderOblex/elderOblex.js';
Expand Down Expand Up @@ -126,6 +127,7 @@ let monster = {
'catoblepas': catoblepas,
'chasme': chasme,
'clayGolem': clayGolem,
'drow': drow,
'dybbuk': dybbuk,
'elderBrain': elderBrain,
'elderOblex': elderOblex,
Expand Down
4 changes: 4 additions & 0 deletions scripts/macros/monsterFeatures/drow/drow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {handCrossbow} from './handCrossbow.js';
export let drow = {
'handCrossbow': handCrossbow
}
9 changes: 9 additions & 0 deletions scripts/macros/monsterFeatures/drow/handCrossbow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {chris} from '../../../helperFunctions.js';
export async function handCrossbow(workflow) {
if (workflow.failedSaves.size != 1 || workflow.hitTargets.size != 1) return;
let targetActor = workflow.targets.first().actor;
if (workflow.saveResults[0].total + 5 > workflow.item.system.save.dc) return;
let isImmune = chris.checkTrait(targetActor, 'ci', 'poisoned');
if (isImmune) return;
await chris.addCondition(targetActor, 'Unconscious', true, workflow.item.uuid);
}

0 comments on commit fc201db

Please sign in to comment.