-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combat automation specific attacks #196
Changes from all commits
98b2614
c5125d2
f41a974
a388b41
aabe156
cb31fdc
71bef2b
afaf929
16f1cbd
f3747d5
d6eb742
22d1716
7e5bdf1
e0c6179
955c728
6fd2e58
ffb5b59
492c163
58a7a78
9c34db9
26cff91
c0ef608
474c284
04733d7
a1eaaba
1743d69
0c49037
a95ecc4
66ab55a
82cc682
49f90c9
9acf7d1
e4467cf
664e990
f422f05
d14eb65
e48cac5
7f87c6c
0b540af
3a128ba
d776e86
839f26a
ee46826
108bd86
1227728
9b48a4b
a0a29fe
0a448df
dff2a3f
d1d81f2
f093771
54b5d37
6f4b799
4180c95
7b18e1d
16778b1
fdecbba
7639975
7318c84
4faa356
a38c264
fa4a220
4814f83
c7cddce
9fcae48
71bd976
9f00995
309bfe6
83cfd5b
65de616
40dbcca
213c488
566beed
6a39947
ab3cba3
c5702d8
41bc4de
9dedaed
59237f6
ee6767f
56f7b82
fe8da8c
8999f41
43e1201
072c631
51302e6
b5fbfe8
42222ec
0b8d278
c885b4c
ea3bc32
c54470e
dcd3611
dd34b13
2f6e15d
d218f27
f75d900
05f6b04
724be63
cdf766e
43e8bbc
f998766
1cffd03
9160816
cebd160
9253e84
e9072c9
b44b255
8b2fdfb
e7e80aa
0a664de
d2b736b
cf238b5
f799d94
bd70bdc
d9332ac
d5a11c9
2774a6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ export const INITIAL_ACTOR_DATA = { | |
inhuman: { value: false }, | ||
zen: { value: false }, | ||
perceivePsychic: { value: false }, | ||
defenseType: { value: '' } | ||
defenseType: { value: '' }, | ||
immuneToCritic: false | ||
}, | ||
modifiers: { | ||
physicalActions: { | ||
|
@@ -80,8 +81,25 @@ export const INITIAL_ACTOR_DATA = { | |
value: 0 | ||
} | ||
}, | ||
penalties: { | ||
fatigue: { | ||
value: 0 | ||
}, | ||
pain: { | ||
value: 0 | ||
}, | ||
physicalDeficiency: { | ||
value: 0 | ||
}, | ||
withstandPain: { | ||
value: 0 | ||
} | ||
}, | ||
extraDamage: { | ||
value: 0 | ||
}, | ||
criticLevel: { | ||
value: 0 | ||
} | ||
}, | ||
destinyPoints: { | ||
|
@@ -127,6 +145,24 @@ export const INITIAL_ACTOR_DATA = { | |
value: 0 | ||
} | ||
}, | ||
body: { | ||
neck: { modifier: -80, weakspot: true, openArmor: false }, | ||
head: { modifier: -60, weakspot: true, openArmor: false }, | ||
elbow: { modifier: -60, weakspot: false, openArmor: false }, | ||
heart: { modifier: -60, weakspot: true, openArmor: false }, | ||
groin: { modifier: -60, weakspot: false, openArmor: false }, | ||
foot: { modifier: -50, weakspot: false, openArmor: false }, | ||
hand: { modifier: -40, weakspot: false, openArmor: false }, | ||
knee: { modifier: -40, weakspot: false, openArmor: false }, | ||
abdomen: { modifier: -20, weakspot: false, openArmor: false }, | ||
arm: { modifier: -20, weakspot: false, openArmor: false }, | ||
thigh: { modifier: -20, weakspot: false, openArmor: false }, | ||
calf: { modifier: -10, weakspot: false, openArmor: false }, | ||
torso: { modifier: -10, weakspot: false, openArmor: false }, | ||
eye: { modifier: -100, weakspot: false, openArmor: false }, | ||
wrist: { modifier: -40, weakspot: false, openArmor: false }, | ||
shoulder: { modifier: -30, weakspot: false, openArmor: false } | ||
}, | ||
Comment on lines
+148
to
+165
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Entiendo que esto está en la ficha porque es posible que para ciertas criaturas los modificadores sean distintos, no? |
||
advantages: [], | ||
contacts: [], | ||
inventory: [], | ||
|
@@ -205,6 +241,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -880,6 +919,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -888,6 +930,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -896,6 +941,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -987,6 +1035,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -995,6 +1046,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -1037,6 +1091,53 @@ export const INITIAL_ACTOR_DATA = { | |
value: 0 | ||
} | ||
}, | ||
metamagics: { | ||
arcaneWarfare: { | ||
empoweredShields: { sphere: 0, cost: 5, max: 2 }, | ||
mysticAccuracy: { sphere: 0, cost: [5, 10], max: 2 }, | ||
increasedDestruction: { sphere: 0, cost: 10, max: 2 }, | ||
expandedArea: { sphere: 0, cost: 10, max: 2 }, | ||
removeProtection: { sphere: 0, cost: 5, max: 3 }, | ||
defensiveExpertise: { sphere: 0, cost: 10, max: 3 }, | ||
offensiveExpertise: { sphere: 0, cost: 10, max: 3 }, | ||
doubleDamage: { sphere: 0, cost: 20, max: 1 } | ||
}, | ||
arcanePower: { | ||
combinedMagic: { sphere: 0, cost: 5, max: 1 }, | ||
persistentEffects: { sphere: 0, cost: 5, max: 1 }, | ||
definedMagicProjection: { sphere: 0, cost: 5, max: 7 }, | ||
exploitationOfNaturalEnergy: { sphere: 0, cost: 5, max: 2 }, | ||
advancedZeonRegeneration: { sphere: 0, cost: 5, max: 3 }, | ||
elevation: { sphere: 0, cost: 5, max: 1 }, | ||
avatar: { sphere: 0, cost: 20, max: 1 }, | ||
unlimitedZeon: { sphere: 0, cost: 20, max: 1 } | ||
}, | ||
arcaneEsoterica: { | ||
secureDefense: { sphere: 0, cost: 5, max: 1 }, | ||
lifeMagic: { sphere: 0, cost: 5, max: 2 }, | ||
feelMagic: { sphere: 0, cost: 5, max: 1 }, | ||
hiddenMagic: { sphere: 0, cost: 5, max: 1 }, | ||
spiritualLoop: { sphere: 0, cost: [15, 25], max: 2 }, | ||
controlSpace: { sphere: 0, cost: 10, max: 1 }, | ||
energyControl: { sphere: 0, cost: 10, max: 1 }, | ||
endureSupernaturalDamage: { sphere: 0, cost: 10, max: 1 }, | ||
transferMagic: { sphere: 0, cost: 10, max: 1 }, | ||
forceSpeed: { sphere: 0, cost: 5, max: 3 }, | ||
doubleInnateSpells: { sphere: 0, cost: 20, max: 1 }, | ||
naturalMaintenance: { sphere: 0, cost: 20, max: 1 } | ||
}, | ||
arcaneKnowledge: { | ||
mysticConcentration: { sphere: 0, cost: 5, max: 1 }, | ||
spellSpecialist: { sphere: 0, cost: 5, max: 7 }, | ||
pierceResistances: { sphere: 0, cost: 5, max: 2 }, | ||
increasedRange: { sphere: 0, cost: 5, max: 2 }, | ||
bindSpells: { sphere: 0, cost: 25, max: 1 }, | ||
maximizeSpells: { sphere: 0, cost: 10, max: 1 }, | ||
doubleSpell: { sphere: 0, cost: 20, max: 1 }, | ||
superiorInnateSpell: { sphere: 0, cost: 20, max: 1 }, | ||
highMagic: { sphere: 0, cost: 20, max: 1 } | ||
} | ||
}, | ||
Comment on lines
+1094
to
+1140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guardar estos datos aquí, en el objeto del personaje, hace que se repitan un montón (todos los personajes tendrán todos estos datos incluso si no son magos. Esto no tiene sentido y además no está pensado para modificarlos dentro de la ficha. Es mejor idea crear un nuevo tipo de objeto, la esfera metamágica, y crear un compendio de ellas con estos datos (quizá también deberían incluir los efectos que añaden a los jugadores cuando las tienen?). Luego, podría arrastrarse desde el compendio hasta el personaje y el personaje indicaría "cuántas" esferas de ese tipo tiene. Probablemente esto suponga cambiar todo el código que tiene que ver con las metamagias (habría que extraerlo de esta pr a otra rama para trabajar en ello independientemente). |
||
total: { | ||
value: 0 | ||
}, | ||
|
@@ -1083,7 +1184,6 @@ export const INITIAL_ACTOR_DATA = { | |
spellMaintenances: [], | ||
selectedSpells: [], | ||
summons: [], | ||
metamagics: [], | ||
preparedSpells: [] | ||
}, | ||
|
||
|
@@ -1234,6 +1334,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
@@ -1242,6 +1345,9 @@ export const INITIAL_ACTOR_DATA = { | |
base: { | ||
value: 0 | ||
}, | ||
special: { | ||
value: 0 | ||
}, | ||
final: { | ||
value: 0 | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
/** | ||
* @param {import('../../../../../../types/Actor').ABFActorDataSourceData} data | ||
*/ | ||
export const mutateCombatData = data => { | ||
data.combat.attack.final.value = | ||
data.combat.attack.base.value + | ||
data.general.modifiers.allActions.final.value + | ||
data.general.modifiers.physicalActions.final.value; | ||
const { combat: { attack, block, dodge }, general: { modifiers } } = data; | ||
|
||
data.combat.block.final.value = | ||
data.combat.block.base.value + | ||
data.general.modifiers.allActions.final.value + | ||
data.general.modifiers.physicalActions.final.value; | ||
attack.final.value = | ||
attack.base.value + | ||
attack.special.value + | ||
modifiers.allActions.final.value + | ||
modifiers.physicalActions.final.value; | ||
|
||
data.combat.dodge.final.value = | ||
data.combat.dodge.base.value + | ||
data.general.modifiers.allActions.final.value + | ||
data.general.modifiers.physicalActions.final.value; | ||
block.final.value = | ||
block.base.value + | ||
block.special.value + | ||
modifiers.allActions.final.value + | ||
modifiers.physicalActions.final.value; | ||
|
||
dodge.final.value = | ||
dodge.base.value + | ||
dodge.special.value + | ||
modifiers.allActions.final.value + | ||
modifiers.physicalActions.final.value; | ||
}; |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -4,8 +4,10 @@ import { calculateFatigue } from './calculations/calculateFatigue'; | |||
* @param { import('../../../../../../types/Actor').ABFActorDataSourceData} data | ||||
*/ | ||||
export const mutateAllActionsModifier = data => { | ||||
const { penalties, allActions } = data.general.modifiers; | ||||
|
||||
penalties.fatigue.value = calculateFatigue(data); | ||||
if (penalties.fatigue.value + penalties.pain.value === 0) { penalties.withstandPain.value = 0 }; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No estoy seguro de si es mejor que esto te borre automáticamente la casilla de soportar el dolor o que deje el dato en la casilla pero no lo aplique si no puede aplicarlo (que ya estaría implementado en las líneas que siguen. Deberíamos discutir qué queremos, que se borre sola la casilla o que no. Para mí es confuso que lo introduzcas a mano pero se borre solo. Pero igual es sólo para mi 🤷🏼♂️
Suggested change
|
||||
allActions.final.value = allActions.base.value + allActions.special.value + penalties.physicalDeficiency.value + Math.min(0, penalties.fatigue.value + penalties.pain.value + penalties.withstandPain.value); | ||||
|
||||
data.general.modifiers.allActions.final.value = | ||||
data.general.modifiers.allActions.base.value + | ||||
data.general.modifiers.allActions.special.value + calculateFatigue(data); | ||||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es posible que este código sea viejo y se haya quedado ahí residual? Creo que no hay ningún elemento del html con la clase
.toggle-effects-button
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Está en el groups.hbs... Se llega a usar en algún sitio?