Merge branch 'Develop-VJ' into cyr-power-point-ui

This commit is contained in:
TJ 2021-02-15 14:01:39 -06:00
commit 58a4033bf1
4 changed files with 4 additions and 6 deletions

View file

@ -516,7 +516,7 @@ export default class Actor5e extends Actor {
if ( Number.isNaN(i) ) continue;
if ( Number.isNumeric(lvl.foverride) ) lvl.fmax = Math.max(parseInt(lvl.foverride), 0);
else lvl.fmax = forcePowerLimit[i-1] || 0;
lvl.fvalue = parseInt(lvl.fvalue);
lvl.fvalue = Math.min(parseInt(lvl.fvalue),lvl.fmax);
}
let techPowerLimit = SW5E.powerLimit['none'];
@ -529,7 +529,7 @@ export default class Actor5e extends Actor {
if ( Number.isNaN(i) ) continue;
if ( Number.isNumeric(lvl.toverride) ) lvl.tmax = Math.max(parseInt(lvl.toverride), 0);
else lvl.tmax = techPowerLimit[i-1] || 0;
lvl.tvalue = parseInt(lvl.tvalue);
lvl.tvalue = Math.min(parseInt(lvl.tvalue),lvl.tmax);
}
// Set Force and tech power

View file

@ -292,9 +292,9 @@ function _migrateActorPowers(actorData, updateData) {
if ( !hasNewLimit ) {
for (let i = 1; i <= 9; i++) {
// add new
updateData["data.powers.power" + i + ".fvalue"] = 0;
updateData["data.powers.power" + i + ".fvalue"] = 1000;
updateData["data.powers.power" + i + ".foverride"] = null;
updateData["data.powers.power" + i + ".tvalue"] = 0;
updateData["data.powers.power" + i + ".tvalue"] = 1000;
updateData["data.powers.power" + i + ".toverride"] = null;
//remove old
updateData["data.powers.power" + i + ".-=value"] = null;

File diff suppressed because one or more lines are too long

View file

@ -22,4 +22,3 @@
{"_id":"rA2qg1EsfHHJMii9","name":"Sharpshooter Mastery","permission":{"default":0,"IpSq6HI4edO6e0Yw":3},"type":"fightingmastery","data":{"description":{"value":"<p>You've mastered blaster weapons and can easily make shots that others find impossible. While you are wielding a blaster weapon with which you are proficient, you gain the following benefits:</p><ul><li>Attacking at long range doesn't impose disadvantage on your ranged weapon attack rolls.</li><li>Your ranged weapon attacks ignore one-quarter and half cover against targets 30 feet or greater from you. If your ranged weapon attacks would already ignore one-quarter and half cover against targets 30 feet or greater from you, they now also ignore three-quarters cover.</li><li>Before you make an attack with a blaster weapon against a target 30 feet or greater from you, you can choose to forgo your proficiency bonus. If the attack hits, you add twice your proficiency bonus to the attack's damage.</li></ul>"},"source":{"value":"PHB"}},"flags":{},"img":"systems/sw5e/packs/Icons/Fighting%20Styles%20and%20Masteries/Sharpshooter%20Mastery.webp","effects":[]}
{"_id":"tE6vpjscEkvcoSjW","name":"Disruption Mastery","permission":{"default":0,"IpSq6HI4edO6e0Yw":3},"type":"fightingmastery","data":{"description":{"value":"<p>Choose one from force- or tech-casting. You've mastered fighting and interfering with casters of the chosen type, confounding their concentration. You gain the following benefits:</p><ul><li>When a creature within 30 feet of you that you can see casts a power, they provoke an opportunity attack from you.</li><li>Whenever you force a creature to make a saving throw to maintain concentration, the DC for the saving throw increases by an amount equal to your proficiency bonus.</li><li>You have advantage on saving throws against powers cast by creatures you can see if you've dealt damage to them since the start of your last turn.</li></ul>"},"source":{"value":"PHB"}},"flags":{},"img":"systems/sw5e/packs/Icons/Fighting%20Styles%20and%20Masteries/Disruption%20Mastery.webp","effects":[]}
{"_id":"tTvAn3HGUR7XfItH","name":"Berserk Mastery","permission":{"default":0,"IpSq6HI4edO6e0Yw":3},"type":"fightingmastery","data":{"description":{"value":"<p>You've mastered returning pain to those who deliver it, becoming a scourge on the battlefield. You gain the following benefits:</p><ul><li>When a creature within 5 feet of you deals damage to you with a weapon or unarmed strike, you can use your reaction to make a melee weapon attack or unarmed strike against that creature. On a hit, you deal additional damage equal to your proficiency bonus.</li><li>When a creature scores a critical hit against you, you have advantage on the first attack you make against that creature before the end of your next turn. If you would already have advantage, you can instead reroll one of the dice once.</li><li>You have advantage on saving throws that would force you to act against your will, be frightened, or prevent you from attacking a creature.</li></ul>"},"source":{"value":"PHB"}},"flags":{},"img":"systems/sw5e/packs/Icons/Fighting%20Styles%20and%20Masteries/Berserk%20Mastery.webp","effects":[]}
{"_id":"Nr7mzeFLEUrqVK7G","name":"Akimbo Mastery","permission":{"default":0,"IpSq6HI4edO6e0Yw":3},"type":"fightingmastery","data":{"description":{"value":"<p>You've mastered fighting with two blasters, unleashing a volley of shots. While you are wielding separate weapons in each hand with which you are proficient, you gain the following benefits:</p><ul><li>When you roll the maximum on a weapon damage die against a creature, that creature suffers a -1 penalty on the first attack roll it makes before the start of your next turn.</li><li>You can engage in Two-Weapon Fighting even when the weapons you are wielding lack the light property.</li><li>You can reload two weapons when you would normally only be able to reload only one.</li><li>When you take the Attack action, you can choose to attack swiftly at the expense of accuracy. Your weapon attack is made without the aid of your proficiency bonus, but you can use your reaction to attack with a different weapon that you're holding in the other hand, also without your proficiency bonus. If you would make more than one attack when you take the Attack action, only one attack is made without your proficiency bonus.</li></ul>"},"source":{"value":"PHB"}},"flags":{},"img":"systems/sw5e/packs/Icons/Fighting%20Styles%20and%20Masteries/Akimbo%20Mastery.webp","effects":[]}