mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] Countdown Rols And Randomzie (#1329)
* . * . * . * Raised system version
This commit is contained in:
parent
9e0bc3cff1
commit
d137e33c3d
37 changed files with 281 additions and 87 deletions
|
|
@ -8,7 +8,10 @@ export default class DhCountdownAction extends DHBaseAction {
|
|||
...super.defaultValues,
|
||||
countdown: {
|
||||
name: this.parent.parent.name,
|
||||
img: this.img
|
||||
img: this.img,
|
||||
progress: {
|
||||
startFormula: '1'
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -21,10 +24,26 @@ export default class DhCountdownAction extends DHBaseAction {
|
|||
{
|
||||
...game.system.api.data.countdowns.DhCountdown.defaultCountdown(),
|
||||
name: parent.parent.name,
|
||||
img: parent.parent.img
|
||||
img: parent.parent.img,
|
||||
progress: {
|
||||
startFormula: '1'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
return updateSource;
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
static migrateData(source) {
|
||||
for (const countdown of source.countdown) {
|
||||
if (countdown.progress.max) {
|
||||
countdown.progress.startFormula = countdown.progress.max;
|
||||
countdown.progress.start = 1;
|
||||
countdown.progress.max = null;
|
||||
}
|
||||
}
|
||||
|
||||
return super.migrateData(source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue