Fix #160 - Add new values...
This commit is contained in:
parent
7d46699c62
commit
cb896c9813
@ -62,6 +62,8 @@ export class PegasusActorSheet extends ActorSheet {
|
|||||||
levelRemainingList: this.actor.getLevelRemainingList(),
|
levelRemainingList: this.actor.getLevelRemainingList(),
|
||||||
maxLevelRemainingList: this.actor.getMaxLevelRemainingList(),
|
maxLevelRemainingList: this.actor.getMaxLevelRemainingList(),
|
||||||
disabledBonus: (this.actor.system.biodata.noautobonus) ? "" : "disabled",
|
disabledBonus: (this.actor.system.biodata.noautobonus) ? "" : "disabled",
|
||||||
|
mt: this.actor.getMT(),
|
||||||
|
kbv: this.actor.getKBV(),
|
||||||
containersTree: this.actor.containersTree,
|
containersTree: this.actor.containersTree,
|
||||||
encCurrent: this.actor.encCurrent,
|
encCurrent: this.actor.encCurrent,
|
||||||
encHindrance: this.actor.encHindrance,
|
encHindrance: this.actor.encHindrance,
|
||||||
|
@ -134,7 +134,14 @@ export class PegasusActor extends Actor {
|
|||||||
|
|
||||||
super._preUpdate(changed, options, user);
|
super._preUpdate(changed, options, user);
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getMT() {
|
||||||
|
return PegasusUtility.getDiceValue(this.system.statistics.mnd.value) + this.system.statistics.mnd.mod + PegasusUtility.getDiceValue(this.system.statistics.mnd.bonuseffect)
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getKBV() {
|
||||||
|
return this.system.statistics.phy.value + this.system.statistics.phy.mod + this.system.statistics.phy.bonuseffect
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getEncumbranceCapacity() {
|
getEncumbranceCapacity() {
|
||||||
return this.system.statistics.str.value * 25
|
return this.system.statistics.str.value * 25
|
||||||
@ -489,7 +496,10 @@ export class PegasusActor extends Actor {
|
|||||||
increaseRoleAbility() {
|
increaseRoleAbility() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
setBonusInformation( info) {
|
||||||
|
this.update( {'system.biodata.bonusselection': info})
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
addCDP( value) {
|
addCDP( value) {
|
||||||
let cdp = this.system.biodata.cdp
|
let cdp = this.system.biodata.cdp
|
||||||
@ -500,7 +510,8 @@ export class PegasusActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
addPPP(value) {
|
addPPP(value) {
|
||||||
let ppp = duplicate(this.system.ppp)
|
let ppp = duplicate(this.system.ppp)
|
||||||
ppp.availablePPP += value
|
console.log("PPP", ppp)
|
||||||
|
ppp.availablePPP += Number(value)
|
||||||
this.update({ 'system.ppp': ppp })
|
this.update({ 'system.ppp': ppp })
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1457,9 +1468,11 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
if (!this.isToken) {
|
if (!this.isToken) {
|
||||||
if (this.warnMorality != this.system.biodata.morality && this.system.biodata.morality < 0) {
|
if (this.warnMorality != this.system.biodata.morality && this.system.biodata.morality < 0) {
|
||||||
console.log("CHAR", this)
|
|
||||||
ChatMessage.create({ content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!" })
|
ChatMessage.create({ content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!" })
|
||||||
}
|
}
|
||||||
|
if (this.warnMorality != this.system.biodata.morality && this.system.biodata.morality == 0) {
|
||||||
|
ChatMessage.create({ content: "This character can no longer spend CDP until their Morality has reached 1 or higher" })
|
||||||
|
}
|
||||||
if (this.warnMorality != this.system.biodata.morality) {
|
if (this.warnMorality != this.system.biodata.morality) {
|
||||||
this.warnMorality = this.system.biodata.morality
|
this.warnMorality = this.system.biodata.morality
|
||||||
}
|
}
|
||||||
@ -1645,6 +1658,9 @@ export class PegasusActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async applyAbility(ability, updates = [], directUpdate = false) {
|
async applyAbility(ability, updates = [], directUpdate = false) {
|
||||||
// manage stat bonus
|
// manage stat bonus
|
||||||
|
if (!ability.system) {
|
||||||
|
ability.system = ability.data
|
||||||
|
}
|
||||||
if (ability.system.affectedstat != "notapplicable") {
|
if (ability.system.affectedstat != "notapplicable") {
|
||||||
let stat = duplicate(this.system.statistics[ability.system.affectedstat])
|
let stat = duplicate(this.system.statistics[ability.system.affectedstat])
|
||||||
stat.mod += Number(ability.system.statmodifier)
|
stat.mod += Number(ability.system.statmodifier)
|
||||||
@ -1775,9 +1791,9 @@ export class PegasusActor extends Actor {
|
|||||||
if (overCapacity > 0) {
|
if (overCapacity > 0) {
|
||||||
effectsList.push({ label: "Encumbrance Hindrance", type: "hindrance", foreign: true, actorId: this.id, applied: false, value: overCapacity })
|
effectsList.push({ label: "Encumbrance Hindrance", type: "hindrance", foreign: true, actorId: this.id, applied: false, value: overCapacity })
|
||||||
}
|
}
|
||||||
if (this.system.biodata.morality <= 0) {
|
/* Remove as per ticket #159if (this.system.biodata.morality <= 0) {
|
||||||
effectsList.push({ label: "Morality Hindrance", type: "hindrance", foreign: true, actorId: this.id, applied: false, value: 3 })
|
effectsList.push({ label: "Morality Hindrance", type: "hindrance", foreign: true, actorId: this.id, applied: false, value: 3 })
|
||||||
}
|
}*/
|
||||||
let effects = this.items.filter(item => item.type == 'effect')
|
let effects = this.items.filter(item => item.type == 'effect')
|
||||||
for (let effect of effects) {
|
for (let effect of effects) {
|
||||||
effect = duplicate(effect)
|
effect = duplicate(effect)
|
||||||
@ -1842,7 +1858,23 @@ export class PegasusActor extends Actor {
|
|||||||
if (isPowerDmg && effect.system.stataffected == "powerdmgroll") {
|
if (isPowerDmg && effect.system.stataffected == "powerdmgroll") {
|
||||||
this.pushEffect(rollData, effect)
|
this.pushEffect(rollData, effect)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
addRoleBonus(rollData, statKey, subKey) {
|
||||||
|
let role = this.getRole()
|
||||||
|
if (role.name.toLowerCase() == "ranged" && subKey == "ranged-dmg") {
|
||||||
|
rollData.effectsList.push({ label: "Ranged Role Bonus", type: "effect", applied: true, isdynamic: true, value: this.getRoleLevel() })
|
||||||
|
rollData.dicePool = rollData.dicePool.concat(PegasusUtility.buildDicePool("effect-bonus-dice", this.getRoleLevel(), 0, "Ranged Role Bonus"))
|
||||||
|
}
|
||||||
|
if (role.name.toLowerCase() == "defender" && subKey == "defence") {
|
||||||
|
rollData.effectsList.push({ label: "Defender Role Bonus", type: "effect", applied: true, isdynamic: true, value: this.getRoleLevel() })
|
||||||
|
rollData.dicePool = rollData.dicePool.concat(PegasusUtility.buildDicePool("effect-bonus-dice", this.getRoleLevel(), 0,"Defender Role Bonus"))
|
||||||
|
}
|
||||||
|
if (role.name.toLowerCase() == "scrapper" && statKey == "com") {
|
||||||
|
rollData.effectsList.push({ label: "Scrapper Role Bonus", type: "effect", applied: true, isdynamic: true, value: this.getRoleLevel() })
|
||||||
|
rollData.dicePool = rollData.dicePool.concat(PegasusUtility.buildDicePool("effect-bonus-dice", this.getRoleLevel(), 0,"Scrapper Role Bonus"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2026,6 +2058,7 @@ export class PegasusActor extends Actor {
|
|||||||
this.addArmorsShields(rollData, statKey, useShield, subKey)
|
this.addArmorsShields(rollData, statKey, useShield, subKey)
|
||||||
this.addWeapons(rollData, statKey, useShield)
|
this.addWeapons(rollData, statKey, useShield)
|
||||||
this.addEquipments(rollData, statKey)
|
this.addEquipments(rollData, statKey)
|
||||||
|
this.addRoleBonus(rollData, statKey, subKey)
|
||||||
this.processVehicleTargetMessage(rollData)
|
this.processVehicleTargetMessage(rollData)
|
||||||
|
|
||||||
console.log("ROLLDATA", rollData)
|
console.log("ROLLDATA", rollData)
|
||||||
|
@ -75,7 +75,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == "select-race") {
|
if (step == "select-race") {
|
||||||
let race = this.races.find(item => item._id == itemId);
|
let race = this.races.find(item => item._id == itemId);
|
||||||
this.currentRace = race;
|
this.currentRace = race;
|
||||||
this.actor.applyRace(race);
|
await this.actor.applyRace(race);
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
if (race.system.nboptionnal > 0 && race.system.optionnalabilities.length > 0) {
|
if (race.system.nboptionnal > 0 && race.system.optionnalabilities.length > 0) {
|
||||||
this.manageOptionnalAbilities(race);
|
this.manageOptionnalAbilities(race);
|
||||||
@ -93,7 +93,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-race-optionnal') {
|
if (step == 'select-race-optionnal') {
|
||||||
let ability = this.raceOptionnalAbilities.optionnalabilities.find(item => item._id == itemId);
|
let ability = this.raceOptionnalAbilities.optionnalabilities.find(item => item._id == itemId);
|
||||||
let update = []
|
let update = []
|
||||||
this.actor.applyAbility(ability, update);
|
await this.actor.applyAbility(ability, update);
|
||||||
this.actor.update(update)
|
this.actor.update(update)
|
||||||
this.actor.createEmbeddedDocuments('Item', [ability]);
|
this.actor.createEmbeddedDocuments('Item', [ability]);
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
@ -104,7 +104,7 @@ export class PegasusActorCreate {
|
|||||||
|
|
||||||
if (step == 'select-race-stats') {
|
if (step == 'select-race-stats') {
|
||||||
let statKey = $(event.currentTarget).data("stat-key");
|
let statKey = $(event.currentTarget).data("stat-key");
|
||||||
this.actor.modStat(statKey, 1);
|
await this.actor.modStat(statKey, 1);
|
||||||
this.raceSelectableStats.stats[statKey].used = true;
|
this.raceSelectableStats.stats[statKey].used = true;
|
||||||
this.raceSelectableStats.numberstats -= 1;
|
this.raceSelectableStats.numberstats -= 1;
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
@ -114,7 +114,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-race-perks') {
|
if (step == 'select-race-perks') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
let perk = this.racePerks.find(item => item._id == itemId);
|
let perk = this.racePerks.find(item => item._id == itemId);
|
||||||
this.actor.createEmbeddedDocuments('Item', [perk]);
|
await this.actor.createEmbeddedDocuments('Item', [perk]);
|
||||||
this.racePerks = this.racePerks.filter(item => item._id != itemId);
|
this.racePerks = this.racePerks.filter(item => item._id != itemId);
|
||||||
this.nbRacePerks -= 1;
|
this.nbRacePerks -= 1;
|
||||||
if (this.nbRacePerks == 0 || this.racePerks.length == 0) {
|
if (this.nbRacePerks == 0 || this.racePerks.length == 0) {
|
||||||
@ -127,7 +127,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-role') {
|
if (step == 'select-role') {
|
||||||
let role = this.roles.find(item => item._id == itemId);
|
let role = this.roles.find(item => item._id == itemId);
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
this.actor.applyRole(role);
|
await this.actor.applyRole(role);
|
||||||
this.currentRole = role;
|
this.currentRole = role;
|
||||||
this.nbRoleStat = 2;
|
this.nbRoleStat = 2;
|
||||||
this.roleStats = duplicate(role.system.statincreasechoice)
|
this.roleStats = duplicate(role.system.statincreasechoice)
|
||||||
@ -137,7 +137,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-role-start-spec') {
|
if (step == 'select-role-start-spec') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
let spec = this.roleSpecStart.find(item => item._id == itemId);
|
let spec = this.roleSpecStart.find(item => item._id == itemId);
|
||||||
this.actor.addIncSpec(spec, 1);
|
await this.actor.addIncSpec(spec, 1);
|
||||||
this.nbRoleSpecStart--;
|
this.nbRoleSpecStart--;
|
||||||
this.roleSpecStart = this.roleSpecStart.filter(item => item._id != itemId);//Remove selected spec
|
this.roleSpecStart = this.roleSpecStart.filter(item => item._id != itemId);//Remove selected spec
|
||||||
if (this.nbRoleSpecStart == 0) {
|
if (this.nbRoleSpecStart == 0) {
|
||||||
@ -150,7 +150,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-role-stat') {
|
if (step == 'select-role-stat') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
let statKey = $(event.currentTarget).data("stat-key");
|
let statKey = $(event.currentTarget).data("stat-key");
|
||||||
this.actor.valueStat(statKey, 1);
|
await this.actor.valueStat(statKey, 1);
|
||||||
|
|
||||||
for (let stat of this.roleStats) {
|
for (let stat of this.roleStats) {
|
||||||
if (stat.name.toLowerCase() == statKey.toLowerCase()) {
|
if (stat.name.toLowerCase() == statKey.toLowerCase()) {
|
||||||
@ -172,15 +172,15 @@ export class PegasusActorCreate {
|
|||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
let spec = this.roleSpec.find(item => item._id == itemId);
|
let spec = this.roleSpec.find(item => item._id == itemId);
|
||||||
if (this.nbDT2 > 0) {
|
if (this.nbDT2 > 0) {
|
||||||
this.actor.addIncSpec(spec, 2)
|
await this.actor.addIncSpec(spec, 2)
|
||||||
this.nbDT2--;
|
this.nbDT2--;
|
||||||
} else {
|
} else {
|
||||||
this.actor.addIncSpec(spec, 1)
|
await this.actor.addIncSpec(spec, 1)
|
||||||
this.nbDT1--;
|
this.nbDT1--;
|
||||||
}
|
}
|
||||||
this.roleSpec = this.roleSpec.filter(item => item._id != itemId);//Remove selected spec
|
this.roleSpec = this.roleSpec.filter(item => item._id != itemId);//Remove selected spec
|
||||||
if (this.nbDT1 == 0 || this.roleSpec.length == 0) {
|
if (this.nbDT1 == 0 || this.roleSpec.length == 0) {
|
||||||
this.rolePerks = this.getPerksFromRole(this.currentRole) // duplicate(this.currentRole.data.perks)
|
this.rolePerks = this.getPerksFromRole(this.currentRole)
|
||||||
this.nbPerks = 2;
|
this.nbPerks = 2;
|
||||||
this.showRolePerks()
|
this.showRolePerks()
|
||||||
} else {
|
} else {
|
||||||
@ -191,7 +191,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-role-perk') {
|
if (step == 'select-role-perk') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
let perk = this.rolePerks.find(item => item._id == itemId);
|
let perk = this.rolePerks.find(item => item._id == itemId);
|
||||||
this.actor.addIncPerk(perk, 1)
|
await this.actor.addIncPerk(perk, 1)
|
||||||
let excludedPerks = this.actor.items.filter(it => it.type == "perk" && !it.system.upgradable)
|
let excludedPerks = this.actor.items.filter(it => it.type == "perk" && !it.system.upgradable)
|
||||||
this.rolePerks = []
|
this.rolePerks = []
|
||||||
for (let perk of this.rolePerks) {
|
for (let perk of this.rolePerks) {
|
||||||
@ -216,7 +216,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-global-spec') {
|
if (step == 'select-global-spec') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
|
||||||
let spec = this.specs.find(item => item._id == itemId);
|
let spec = this.specs.find(item => item._id == itemId);
|
||||||
this.actor.addIncSpec(spec, 1)
|
await this.actor.addIncSpec(spec, 1)
|
||||||
this.nbGlobalSpec--;
|
this.nbGlobalSpec--;
|
||||||
if (this.nbGlobalSpec == 0) {
|
if (this.nbGlobalSpec == 0) {
|
||||||
this.nbGlobalStat = 5
|
this.nbGlobalStat = 5
|
||||||
@ -233,7 +233,7 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-global-stat') {
|
if (step == 'select-global-stat') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget))
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget))
|
||||||
let statKey = $(event.currentTarget).data("stat-key")
|
let statKey = $(event.currentTarget).data("stat-key")
|
||||||
this.actor.valueStat(statKey, 1)
|
await this.actor.valueStat(statKey, 1)
|
||||||
this.nbGlobalStat--
|
this.nbGlobalStat--
|
||||||
if (this.nbGlobalStat == 0) {
|
if (this.nbGlobalStat == 0) {
|
||||||
this.nbGlobalPerk = 1
|
this.nbGlobalPerk = 1
|
||||||
@ -250,13 +250,14 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-global-perk') {
|
if (step == 'select-global-perk') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget))
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget))
|
||||||
let perk = this.perks.find(item => item._id == itemId);
|
let perk = this.perks.find(item => item._id == itemId);
|
||||||
this.actor.addIncPerk(perk, 1)
|
await this.actor.addIncPerk(perk, 1)
|
||||||
this.nbGlobalPerk--;
|
this.nbGlobalPerk--;
|
||||||
if (this.nbGlobalPerk == 0) {
|
if (this.nbGlobalPerk == 0) {
|
||||||
this.nbGlobalStatus = 1
|
this.nbGlobalStatus = 1
|
||||||
if (this.forceVirtue) {
|
if (this.forceVirtue) {
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
} else {
|
} else {
|
||||||
|
this.statusCount = {}
|
||||||
this.showGlobalStatus()
|
this.showGlobalStatus()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -267,7 +268,8 @@ export class PegasusActorCreate {
|
|||||||
if (step == 'select-global-status') {
|
if (step == 'select-global-status') {
|
||||||
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget))
|
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget))
|
||||||
let statusKey = $(event.currentTarget).data("status-key")
|
let statusKey = $(event.currentTarget).data("status-key")
|
||||||
this.actor.addStatusBonus(statusKey, 1)
|
await this.actor.addStatusBonus(statusKey, 1)
|
||||||
|
this.statusCount[statusKey] = (this.statusCount[statusKey]) ? this.statusCount[statusKey]+1 : 1;
|
||||||
this.nbGlobalStatus--;
|
this.nbGlobalStatus--;
|
||||||
if (this.nbGlobalStatus == 0) {
|
if (this.nbGlobalStatus == 0) {
|
||||||
this.nbBonusSelection = 1
|
this.nbBonusSelection = 1
|
||||||
@ -286,48 +288,63 @@ export class PegasusActorCreate {
|
|||||||
let nextStep = $(event.currentTarget).data("bonus-key")
|
let nextStep = $(event.currentTarget).data("bonus-key")
|
||||||
this.forceVirtue = true
|
this.forceVirtue = true
|
||||||
if (nextStep == "bonus-statistic") {
|
if (nextStep == "bonus-statistic") {
|
||||||
|
this.actor.setBonusInformation("Stats Increased")
|
||||||
this.nbGlobalStat = 2
|
this.nbGlobalStat = 2
|
||||||
this.showGlobalStat()
|
this.showGlobalStat()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-specialisation") {
|
if (nextStep == "bonus-specialisation") {
|
||||||
|
this.actor.setBonusInformation("Specialisations Increased")
|
||||||
this.nbGlobalSpec = 4
|
this.nbGlobalSpec = 4
|
||||||
this.showGlobalSpec()
|
this.showGlobalSpec()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-perk") {
|
if (nextStep == "bonus-perk") {
|
||||||
|
this.actor.setBonusInformation("Perks - Check Effects & Perk Details.")
|
||||||
this.nbGlobalPerk = 2
|
this.nbGlobalPerk = 2
|
||||||
this.showGlobalPerk()
|
this.showGlobalPerk()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-status") {
|
if (nextStep == "bonus-status") {
|
||||||
|
this.actor.setBonusInformation("Status Modifiers")
|
||||||
this.nbGlobalStatus = 5
|
this.nbGlobalStatus = 5
|
||||||
|
this.statusCount = {}
|
||||||
this.showGlobalStatus()
|
this.showGlobalStatus()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-roleability") {
|
if (nextStep == "bonus-roleability") {
|
||||||
|
this.actor.setBonusInformation("Role Ability Level Increased")
|
||||||
this.actor.increaseRoleAbility()
|
this.actor.increaseRoleAbility()
|
||||||
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-ppp5") {
|
if (nextStep == "bonus-ppp5") {
|
||||||
|
this.actor.setBonusInformation("Power Purchase Points")
|
||||||
this.actor.addPPP(5)
|
this.actor.addPPP(5)
|
||||||
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-wealthy") {
|
if (nextStep == "bonus-wealthy") {
|
||||||
|
this.actor.setBonusInformation("x2 Starting Funds")
|
||||||
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with x2 Starting Funds" })
|
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with x2 Starting Funds" })
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-heirloom") {
|
if (nextStep == "bonus-heirloom") {
|
||||||
|
this.actor.setBonusInformation("Family Heirloom (Level 1 Bonus Dice Item)")
|
||||||
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with an item of choice (GM Must approve). This item provides a Level 1 Bonus Dice to a Stat of choice" })
|
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with an item of choice (GM Must approve). This item provides a Level 1 Bonus Dice to a Stat of choice" })
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-vehicle") {
|
if (nextStep == "bonus-vehicle") {
|
||||||
|
this.actor.setBonusInformation("Vehicle")
|
||||||
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with a Vehicle of Choice (GM Must approve)." })
|
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with a Vehicle of Choice (GM Must approve)." })
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-mount") {
|
if (nextStep == "bonus-mount") {
|
||||||
|
this.actor.setBonusInformation("Mount")
|
||||||
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with a Mount of Choice (GM Must approve)." })
|
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with a Mount of Choice (GM Must approve)." })
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-sidekick") {
|
if (nextStep == "bonus-sidekick") {
|
||||||
|
this.actor.setBonusInformation("Sidekick")
|
||||||
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with a Sidekick of Choice (GM Must approve)." })
|
ChatMessage.create({ content: "NOT AUTOMATED! Your character starts with a Sidekick of Choice (GM Must approve)." })
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
if (nextStep == "bonus-ambidextrious") {
|
if (nextStep == "bonus-ambidextrious") {
|
||||||
|
this.actor.setBonusInformation("Ambidextrious")
|
||||||
this.actor.setHandInformation("Ambidextrious")
|
this.actor.setHandInformation("Ambidextrious")
|
||||||
this.showVirtue()
|
this.showVirtue()
|
||||||
}
|
}
|
||||||
@ -411,9 +428,9 @@ export class PegasusActorCreate {
|
|||||||
manageSelectableStats(race) {
|
manageSelectableStats(race) {
|
||||||
this.raceSelectableStats = {
|
this.raceSelectableStats = {
|
||||||
"race": race,
|
"race": race,
|
||||||
"statsonlyonce": race.data.statsonlyonce,
|
"statsonlyonce": race.system.statsonlyonce,
|
||||||
"numberstats": race.data.numberstats,
|
"numberstats": race.system.numberstats,
|
||||||
"stats": duplicate(this.actor.data.data.statistics)
|
"stats": duplicate(this.actor.system.statistics)
|
||||||
}
|
}
|
||||||
this.processSelectableStats()
|
this.processSelectableStats()
|
||||||
}
|
}
|
||||||
@ -433,17 +450,17 @@ export class PegasusActorCreate {
|
|||||||
|
|
||||||
/* --------------- -------------------- --------- */
|
/* --------------- -------------------- --------- */
|
||||||
manageRacePerks(race) {
|
manageRacePerks(race) {
|
||||||
if (!this.currentRace.data.perksgained) {
|
if (!this.currentRace.system.perksgained) {
|
||||||
this.showRoles()
|
this.showRoles()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.racePerks) { // First init
|
if (!this.racePerks) { // First init
|
||||||
if (this.currentRace.data.perksall) {
|
if (this.currentRace.system.perksall) {
|
||||||
this.racePerks = duplicate(this.perks)
|
this.racePerks = duplicate(this.perks)
|
||||||
} else {
|
} else {
|
||||||
this.racePerks = duplicate(this.currentRace.data.perks)
|
this.racePerks = duplicate(this.currentRace.system.perks)
|
||||||
}
|
}
|
||||||
this.nbRacePerks = this.currentRace.data.perksnumber;
|
this.nbRacePerks = this.currentRace.system.perksnumber;
|
||||||
}
|
}
|
||||||
let formData = this.createFormData("select-race-perks")
|
let formData = this.createFormData("select-race-perks")
|
||||||
formData.raceperks = this.racePerks;
|
formData.raceperks = this.racePerks;
|
||||||
@ -474,8 +491,8 @@ export class PegasusActorCreate {
|
|||||||
/* --------------- ----------------------------- */
|
/* --------------- ----------------------------- */
|
||||||
manageOptionnalAbilities(race) {
|
manageOptionnalAbilities(race) {
|
||||||
this.raceOptionnalAbilities = {
|
this.raceOptionnalAbilities = {
|
||||||
"nboptionnal": race.data.nboptionnal,
|
"nboptionnal": race.system.nboptionnal,
|
||||||
"optionnalabilities": duplicate(race.data.optionnalabilities),
|
"optionnalabilities": duplicate(race.system.optionnalabilities),
|
||||||
}
|
}
|
||||||
this.processOptionnalAbilitiesStep()
|
this.processOptionnalAbilitiesStep()
|
||||||
}
|
}
|
||||||
@ -513,8 +530,6 @@ export class PegasusActorCreate {
|
|||||||
async showRoleStartSpec() {
|
async showRoleStartSpec() {
|
||||||
if (!this.roleSpecStart) {
|
if (!this.roleSpecStart) {
|
||||||
this.roleSpecStart = this.specs.filter(spec => spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease1.toUpperCase() || spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease2.toUpperCase())
|
this.roleSpecStart = this.specs.filter(spec => spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease1.toUpperCase() || spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease2.toUpperCase())
|
||||||
//console.log("SPEC FOUND", this.roleSpecStart)
|
|
||||||
//this.roleSpecStart = duplicate(this.currentRole.data.specialisationsplus1)
|
|
||||||
this.nbRoleSpecStart = 2;
|
this.nbRoleSpecStart = 2;
|
||||||
}
|
}
|
||||||
let formData = this.createFormData("select-role-start-spec")
|
let formData = this.createFormData("select-role-start-spec")
|
||||||
@ -589,7 +604,7 @@ export class PegasusActorCreate {
|
|||||||
formData.stats = {}
|
formData.stats = {}
|
||||||
for (let key in this.actor.system.statistics) {
|
for (let key in this.actor.system.statistics) {
|
||||||
let stat = this.actor.system.statistics[key]
|
let stat = this.actor.system.statistics[key]
|
||||||
if (stat.level < 5) {
|
if (stat.value < 5) {
|
||||||
formData.stats[key] = duplicate(stat)
|
formData.stats[key] = duplicate(stat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -620,8 +635,18 @@ export class PegasusActorCreate {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async showGlobalStatus() {
|
async showGlobalStatus() {
|
||||||
let formData = this.createFormData("select-global-status")
|
let formData = this.createFormData("select-global-status")
|
||||||
formData.status = duplicate(this.actor.system.secondary)
|
formData.status = {}
|
||||||
formData.status["nrg"] = duplicate(this.actor.system.nrg)
|
for(let statusKey in this.actor.system.secondary) {
|
||||||
|
if ( this.statusCount[statusKey] == undefined) {
|
||||||
|
this.statusCount[statusKey] = 0
|
||||||
|
}
|
||||||
|
if ( this.statusCount[statusKey] < 3) {
|
||||||
|
formData.status[statusKey] = duplicate(this.actor.system.secondary[statusKey])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( this.statusCount["nrg"] < 3) {
|
||||||
|
formData.status["nrg"] = duplicate(this.actor.system.nrg)
|
||||||
|
}
|
||||||
this.renderChatMessage(formData)
|
this.renderChatMessage(formData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "10.2.0",
|
"version": "10.2.1",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.2.0.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.2.1.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -168,6 +168,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ul class="stat-list alternate-list">
|
||||||
|
<li class="item flexrow list-item items-title-bg">
|
||||||
|
<span class="item-name-label-header-long">
|
||||||
|
<h3><label class="items-title-text">Status Thresholds</label></h3>
|
||||||
|
</span>
|
||||||
|
<span class="item-name-label-header-long">
|
||||||
|
<label class="items-title-text">Madness Threshold (MT): {{mt}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-name-label-header-long">
|
||||||
|
<label class="items-title-text">Knock Back Value (KBV): {{kbv}}</label>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ul class="stat-list alternate-list">
|
<ul class="stat-list alternate-list">
|
||||||
<li class="item flexrow list-item items-title-bg">
|
<li class="item flexrow list-item items-title-bg">
|
||||||
@ -410,7 +426,7 @@
|
|||||||
<h4>Power Purchase Points (PPP)</h4>
|
<h4>Power Purchase Points (PPP)</h4>
|
||||||
</span>
|
</span>
|
||||||
<span class="small-label padd-right packed-left">Available PPP</span><input type="text"
|
<span class="small-label padd-right packed-left">Available PPP</span><input type="text"
|
||||||
class="padd-right input-numeric-short" name="system.ppp.available" value="{{data.ppp.available}}"
|
class="padd-right input-numeric-short" name="system.ppp.availablePPP" value="{{data.ppp.availablePPP}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
|
||||||
<span class="small-label padd-right packed-left">Spent PPP</span><input type="text"
|
<span class="small-label padd-right packed-left">Spent PPP</span><input type="text"
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<li class="flexrow"><label class="generic-label">No perks allowed ?</label>
|
<li class="flexrow"><label class="generic-label">No perks allowed ?</label>
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.noperksallowed" {{checked data.noperksallowed}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.noperksallowed" {{checked data.noperksallowed}}/></label>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="generic-label">Locked (Only GM can change/edit) ?</label>
|
<li class="flexrow"><label class="generic-label">Permanent/Locked (Only GM can change/edit) ?</label>
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.locked" {{checked data.locked}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.locked" {{checked data.locked}}/></label>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="generic-label">Display Text when added to Actor</label>
|
<li class="flexrow"><label class="generic-label">Display Text when added to Actor</label>
|
||||||
|
@ -142,6 +142,7 @@
|
|||||||
<option value="none5">===== Other Circumstances</option>
|
<option value="none5">===== Other Circumstances</option>
|
||||||
<option value="d4">Concentrated<option>
|
<option value="d4">Concentrated<option>
|
||||||
<option value="d4">Off Hand d4<option>
|
<option value="d4">Off Hand d4<option>
|
||||||
|
<option value="d6">Higher Ground d6</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user