Add customizable rolls to items
This commit is contained in:
@@ -28,7 +28,7 @@ export default class M5ModAggregate {
|
||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.ADD_100, value: data.attributes.pa.bonus }, characterString)
|
||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.ADD_100, value: data.attributes.wk.bonus }, characterString)
|
||||
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defense.value }, characterString)
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defenseBonus.value }, characterString)
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.ATTACK, operation: M5ModOperation.SET, value: calc.stats.attackBonus.value }, characterString)
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DAMAGE, operation: M5ModOperation.SET, value: calc.stats.damageBonus.value }, characterString)
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movementBonus.value }, characterString)
|
||||
@@ -59,19 +59,10 @@ export default class M5ModAggregate {
|
||||
source: source
|
||||
}
|
||||
|
||||
let key = mod.id
|
||||
// if (mod.type === M5ModType.ATTRIBUTE) {
|
||||
// key = M5Attributes[mod.id] as string
|
||||
// console.log("M5ModType.ATTRIBUTE", mod.id, key)
|
||||
// } else if (mod.type === M5ModType.STAT) {
|
||||
// key = M5Stats[mod.id] as string
|
||||
// console.log("M5ModType.STAT", mod.id, key)
|
||||
// }
|
||||
|
||||
if (map.has(key))
|
||||
map.get(key).push(pair)
|
||||
if (map.has(mod.id))
|
||||
map.get(mod.id).push(pair)
|
||||
else
|
||||
map.set(key, [pair])
|
||||
map.set(mod.id, [pair])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user