mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-05 21:20:27 -04:00
Added #initiative.
This commit is contained in:
parent
f5433ec6f8
commit
cdf33edde7
3 changed files with 52 additions and 0 deletions
16
Library.js
16
Library.js
|
@ -881,6 +881,22 @@ function createEnemy(name, health, ac, damage, initiative, ...spells) {
|
|||
return enemy
|
||||
}
|
||||
|
||||
function createInitiativeOrder() {
|
||||
state.initiativeOrder = []
|
||||
|
||||
for (var character of state.characters) {
|
||||
state.initiativeOrder.push(character)
|
||||
}
|
||||
|
||||
for (var enemy of state.enemies) {
|
||||
state.initiativeOrder.push(enemy)
|
||||
}
|
||||
|
||||
state.initiativeOrder.sort(function(a, b) {
|
||||
return b.initiative - a.initiative;
|
||||
});
|
||||
}
|
||||
|
||||
const levelSplits = [0, 300, 900, 2700, 6500, 14000, 23000, 34000, 48000, 64000, 85000, 100000, 120000, 140000, 165000, 195000, 225000, 265000, 305000, 355000]
|
||||
|
||||
function getLevel(experience) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue