Skip to content

Commit

Permalink
foia
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Sep 25, 2024
1 parent 3c08948 commit 64fc5e5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](<https://semver.org/spec/v2.0.
- Usage of `name`d effects as a target through `options.preset.targets` ([#147](https://github.com/MrVauxs/pf2e-graphics/issues/147))
- Sound Preset ([#146](https://github.com/MrVauxs/pf2e-graphics/issues/146))
- **New Animations**
- Added sounds to Breathe Fire (@MrVauxs)
- Generic Casting Animation, Critical Success and Failure SFX for Strikes and Casting a Spell (@MrVauxs)
- Treat Wounds/Battle Medicine (using Workbench), Dirty Trick, Grapple, Trip (@Aziareel)
- Champion's Resistance, Devise a Stratagem, Strategic Strike, Surgical Shock, Cyclonic Ascent, Sneak Attack, Exploit Vulnerability (using PF2e Exploit Vulnerability Module), Healer's Gloves, Extract Elements (@Aziareel)
Expand Down
28 changes: 26 additions & 2 deletions animations/spells/1st/breathe-fire.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,28 @@
"not": "conservation-of-energy:cold"
}
],
"file": "jb2a.burning_hands.01.orange",
"contents": [
{
"preset": "sound",
"file": "graphics-sfx.magic.fire.spray",

Check failure on line 16 in animations/spells/1st/breathe-fire.json

View workflow job for this annotation

GitHub Actions / Animation files

Not found in the JB2A Free or PF2e Graphics' graphics-vfx database.

origin:item:slug:breathe-fire.0.contents.0.contents.0.file
"options": {
"fadeOut": 1000
}
},
{
"preset": "sound",
"file": "graphics-sfx.magic.fire.hold",

Check failure on line 23 in animations/spells/1st/breathe-fire.json

View workflow job for this annotation

GitHub Actions / Animation files

Not found in the JB2A Free or PF2e Graphics' graphics-vfx database.

origin:item:slug:breathe-fire.0.contents.0.contents.1.file
"options": {
"duration": 4500,
"fadeIn": 1000,
"fadeOut": 500
}
},
{
"file": "jb2a.burning_hands.01.orange"
},
{
"file": "jb2a.burning_hands.01.orange",
"predicate": [
{
"gte": [
Expand Down Expand Up @@ -43,12 +59,20 @@
"predicate": [
"conservation-of-energy:cold"
],
"file": "jb2a.cone_of_cold.blue",
"contents": [
{
"preset": "sound",
"file": "graphics-sfx.magic.ice.ranged.barrage.03",

Check failure on line 65 in animations/spells/1st/breathe-fire.json

View workflow job for this annotation

GitHub Actions / Animation files

Not found in the JB2A Free or PF2e Graphics' graphics-vfx database.

origin:item:slug:breathe-fire.0.contents.1.contents.0.file
"options": {
"waitUntilFinished": -7200,
"fadeOut": 1000
}
},
{
"file": "jb2a.cone_of_cold.blue"
},
{
"file": "jb2a.cone_of_cold.blue",
"predicate": [
{
"gte": [
Expand Down
14 changes: 14 additions & 0 deletions src/presets/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ export default function sound(seq: SequencerTypes, animation: AnimationObject, d
sound.duration(options.duration);
if (isTrueish(options?.waitUntilFinished))
sound.waitUntilFinished(options.waitUntilFinished);
if (isTrueish(options?.fadeOut)) {
if (typeof options.fadeOut === 'object') {
seq.fadeOutAudio(options.fadeOut?.value, options.fadeOut);

Check failure on line 26 in src/presets/sound.ts

View workflow job for this annotation

GitHub Actions / Vite build

Property 'fadeOutAudio' does not exist on type 'SequencerTypes'.
} else {
seq.fadeOutAudio(options.fadeOut);

Check failure on line 28 in src/presets/sound.ts

View workflow job for this annotation

GitHub Actions / Vite build

Property 'fadeOutAudio' does not exist on type 'SequencerTypes'.
}
}
if (isTrueish(options?.fadeIn)) {
if (typeof options.fadeIn === 'object') {
seq.fadeInAudio(options.fadeIn?.value, options.fadeIn);
} else {
seq.fadeInAudio(options.fadeIn);
}
}

if (isTrueish(options?.atLocation)) {
const tokens = [];
Expand Down

0 comments on commit 64fc5e5

Please sign in to comment.