forked from GitHub-Mirrors/foundry-sw5e
Revert "Merge branch 'professorbunbury-sw5e' of https://github.com/unrealkakeman89/sw5e into professorbunbury-sw5e"
This reverts commit6974581f6f
, reversing changes made tocba2f481b4
.
This commit is contained in:
parent
6974581f6f
commit
600e571548
88 changed files with 527 additions and 1813 deletions
|
@ -482,7 +482,7 @@ SW5E.weaponProperties = {
|
|||
"bur": "SW5E.WeaponPropertiesBur",
|
||||
"def": "SW5E.WeaponPropertiesDef",
|
||||
"dex": "SW5E.WeaponPropertiesDex",
|
||||
"drm": "SW5E.WeaponPropertiesDrm",
|
||||
"drm": "SW5E.WeaponPropertiesBur",
|
||||
"dgd": "SW5E.WeaponPropertiesDgd",
|
||||
"dis": "SW5E.WeaponPropertiesDis",
|
||||
"dpt": "SW5E.WeaponPropertiesDpt",
|
||||
|
|
|
@ -41,7 +41,7 @@ export class Item5e extends Item {
|
|||
* @type {boolean}
|
||||
*/
|
||||
get hasAttack() {
|
||||
return ["mwak", "rwak", "mpak", "rpak"].includes(this.data.data.actionType);
|
||||
return ["mwak", "rwak", "msak", "rsak"].includes(this.data.data.actionType);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -553,9 +553,9 @@ export class Item5e extends Item {
|
|||
const parts = itemData.damage.parts.map(d => d[0]);
|
||||
if ( versatile && itemData.damage.versatile ) parts[0] = itemData.damage.versatile;
|
||||
if ( (this.data.type === "power") ) {
|
||||
if ( (itemData.scaling.mode === "atwill") ) {
|
||||
if ( (itemData.scaling.mode === "cantrip") ) {
|
||||
const lvl = this.actor.data.type === "character" ? actorData.details.level : actorData.details.powerLevel;
|
||||
this._scaleAtWillDamage(parts, lvl, itemData.scaling.formula );
|
||||
this._scaleCantripDamage(parts, lvl, itemData.scaling.formula );
|
||||
} else if ( powerLevel && (itemData.scaling.mode === "level") && itemData.scaling.formula ) {
|
||||
this._scalePowerDamage(parts, itemData.level, powerLevel, itemData.scaling.formula );
|
||||
}
|
||||
|
@ -590,10 +590,10 @@ export class Item5e extends Item {
|
|||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Adjust an at-will damage formula to scale it for higher level characters and monsters
|
||||
* Adjust a cantrip damage formula to scale it for higher level characters and monsters
|
||||
* @private
|
||||
*/
|
||||
_scaleAtWillDamage(parts, level, scale) {
|
||||
_scaleCantripDamage(parts, level, scale) {
|
||||
const add = Math.floor((level + 1) / 6);
|
||||
if ( add === 0 ) return;
|
||||
if ( scale && (scale !== parts[0]) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue