Skip to content

Commit

Permalink
0.7.53 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk123999 committed Oct 24, 2023
1 parent 3180757 commit 3be2026
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 61 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.7.53 Release:
## Bug Fixes:
- Aasimar Radiant Soul
- Aasimar Radiant Consumption

# 0.7.52 Release:
## Bug Fixes:
- Ancestral Protectors
Expand Down
6 changes: 3 additions & 3 deletions packs/cpr-class-features.db

Large diffs are not rendered by default.

Binary file modified packs/cpr-class-features/000003.log
Binary file not shown.
2 changes: 1 addition & 1 deletion packs/cpr-class-features/LOG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023/10/22-03:11:35.765420 7f5c28f90700 Delete type=3 #1
2023/10/23-20:02:14.093745 7f29f67c0700 Delete type=3 #1
4 changes: 2 additions & 2 deletions packs/cpr-race-features.db

Large diffs are not rendered by default.

Binary file modified packs/cpr-race-features/000003.log
Binary file not shown.
2 changes: 1 addition & 1 deletion packs/cpr-race-features/LOG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023/10/22-03:11:36.058512 7f5c28f90700 Delete type=3 #1
2023/10/23-20:02:14.262902 7f29f7ff0700 Delete type=3 #1
2 changes: 1 addition & 1 deletion packs/cpr-spell-features.db

Large diffs are not rendered by default.

Binary file modified packs/cpr-spell-features/000003.log
Binary file not shown.
2 changes: 1 addition & 1 deletion packs/cpr-spell-features/LOG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023/10/22-03:11:35.642264 7f5c29fb0700 Delete type=3 #1
2023/10/23-20:02:14.093121 7f29f6fd0700 Delete type=3 #1
12 changes: 10 additions & 2 deletions scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3854,11 +3854,11 @@ export function setConfig() {
},
'Celestial Revelation (Radiant Consumption)': {
'name': 'Celestial Revelation (Radiant Consumption)',
'version': '0.7.01'
'version': '0.7.53'
},
'Celestial Revelation (Radiant Soul)': {
'name': 'Celestial Revelation (Radiant Soul)',
'version': '0.7.01'
'version': '0.7.53'
},
'Astral Trance': {
'name': 'Astral Trance',
Expand Down Expand Up @@ -4626,6 +4626,14 @@ export function setConfig() {
'Draconic Cry': {
'name': 'Draconic Cry',
'version': '0.7.47'
},
'Divine Fury: Necrotic': {
'name': 'Divine Fury: Necrotic',
'version': '0.7.53'
},
'Divine Fury: Radiant': {
'name': 'Divine Fury: Radiant',
'version': '0.7.53'
}
}
});
Expand Down
65 changes: 15 additions & 50 deletions scripts/macros/raceFeatures/aasimar/radiantSoul.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {constants} from '../../../constants.js';
import {chris} from '../../../helperFunctions.js';
import {queue} from '../../../utility/queue.js';
async function attack({speaker, actor, token, character, item, args, scope, workflow}) {
Expand All @@ -16,84 +17,48 @@ async function attack({speaker, actor, token, character, item, args, scope, work
if (workflow.hitTargets.size != 1) return;
let queueSetup = await queue.setup(workflow.item.uuid, 'aasimarRadiantSoul', 249);
if (!queueSetup) return;
let selected = await chris.dialog('Celestial Revelation: Add extra damage?', [['Yes', true], ['No', false]]);
let selected = await chris.dialog(feature.name, constants.yesNo, 'Add extra damage from ' + feature.name + '?');
if (!selected) {
queue.remove(workflow.item.uuid);
return;
}
if (!(game.combat === null || game.combat === undefined)) await feature.setFlag('chris-premades', 'feature.aasimarRadiantSoul.turn', game.combat.round + '-' + game.combat.turn);
await chris.setTurnCheck(feature, 'feature', 'aasimarRadiantSoul');
let damageFormula = workflow.damageRoll._formula + ' + ' + workflow.actor.system.attributes.prof + '[radiant]';
let damageRoll = await new Roll(damageFormula).roll({async: true});
await workflow.setDamageRoll(damageRoll);
await feature.displayCard();
queue.remove(workflow.item.uuid);
return;
case 'preDamageApplication':
if (workflow.hitTargets.size <= 1) return;
let queueSetup2 = queue.setup(workflow.item.uuid, 'aasimarRadiantSoul', 249);
if (!queueSetup2) return;
let buttons = [
{
'label': 'Yes',
'value': true
}, {
'label': 'No',
'value': false
}
];
let selection = await chris.selectTarget('Celestial Revelation: Add extra damage?', buttons, workflow.targets, false, 'one');
let selection = await chris.selectTarget('Celestial Revelation: Add extra damage?', constants.yesNoButton, workflow.targets, true, 'one');
if (selection.buttons === false) {
queue.remove(workflow.item.uuid);
return;
}
if (!(game.combat === null || game.combat === undefined)) await feature.setFlag('chris-premades', 'feature.aasimarRadiantSoul.turn', game.combat.round + '-' + game.combat.turn);
let targetTokenID = selection.inputs.find(id => id != false);
if (!targetTokenID) {
await chris.setTurnCheck(feature, 'feature', 'aasimarRadiantSoul');
let targetTokenUuid = selection.inputs.find(i => i);
if (!targetTokenUuid) {
queue.remove(workflow.item.uuid);
return;
}
let targetDamage = workflow.damageList.find(i => i.tokenId === targetTokenID);
let targetActor = canvas.scene.tokens.get(targetDamage.tokenId).actor;
if (!targetActor) {
let targetToken = await fromUuid(targetTokenUuid);
if (!targetToken) {
queue.remove(workflow.item.uuid);
return;
}
if (!(game.combat === null || game.combat === undefined)) await feature.setFlag('chris-premades', 'feature.aasimarRadiantSoul.turn', currentTurn);
let hasDI = chris.checkTrait(targetActor, 'di', 'radiant');
if (hasDI) {
queue.remove(workflow.item.uuid);
return;
}
let damageTotal = workflow.actor.system.attributes.prof;
let hasDR = chris.checkTrait(targetActor, 'dr', 'radiant');
if (hasDR) damageTotal = Math.floor(damageTotal / 2);
targetDamage.damageDetail[0].push(
{
'damage': damageTotal,
'type': 'radiant'
}
);
targetDamage.totalDamage += damageTotal;
targetDamage.appliedDamage += damageTotal;
targetDamage.hpDamage += damageTotal;
if (targetDamage.oldTempHP > 0) {
if (targetDamage.oldTempHP >= damageTotal) {
targetDamage.newTempHP -= damageTotal;
} else {
let leftHP = damageTotal - targetDamage.oldTempHP;
targetDamage.newTempHP = 0;
targetDamage.newHP -= leftHP;
}
} else {
targetDamage.newHP -= damageTotal;
}
chris.addDamageDetailDamage(targetToken, workflow.actor.system.attributes.prof, 'radiant', workflow);
await feature.displayCard();
queue.remove(workflow.item.uuid);
return;
}
}
async function turn(origin) {
await origin.setFlag('chris-premades', 'feature.aasimarRadiantSoul.turn', false);
async function combatEnd(origin) {
await chris.setTurnCheck(origin, 'feature', 'aasimarRadiantSoul', true);
}
export let aasimarRadiantSoul = {
'attack': attack,
'turn': turn
'combatEnd': combatEnd
}

0 comments on commit 3be2026

Please sign in to comment.