Skip to content
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

Closed
wants to merge 118 commits into from

Conversation

paiva92
Copy link
Contributor

@paiva92 paiva92 commented Apr 13, 2024

Se implementan los ataques específicos al combate: Derribo, Inconciencia, Inutilizar, Desarmar, Presa, Ataque Apuntado.
Se añade la solicitud de tirada de dado al WebSocket del Combat Manager para las tiradas de Resistencia, y Crítico.
Se añade penalizadores de Dolor, Carencia física y Resistir el dolor para automatizar el efectos de los Críticos.
Se añade Macro para la carga de Zeon, preparar conjuro y liberar Zeon - mysticActMacro
Se añaden las metamagias y se automatizan las siguientes en el combate:

  • Incremento Destructivo: añade daño base a los hechizos
  • Erudición Defensiva: bono a la proyección mágica defensiva
  • Erudición Ofensiva: bono a la proyección mágica ofensiva
  • Proyección mágica determinada: sobrescribe la proyección mágica
  • Explotación de la energía: bono al ACT por punto de cansancio utilizado (implementado en mysticActMacro)

@paiva92 paiva92 requested a review from Eryx5502 April 13, 2024 07:06
@paiva92 paiva92 self-assigned this Apr 13, 2024
Base automatically changed from develop/new-combat-automation to feature/new-combat-automation May 7, 2024 07:26
Base automatically changed from feature/new-combat-automation to main May 7, 2024 07:26
@Eryx5502 Eryx5502 added this to the v1.19.0 milestone May 8, 2024
@Eryx5502 Eryx5502 linked an issue Jun 13, 2024 that may be closed by this pull request
Copy link
Contributor

@Eryx5502 Eryx5502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publico comentarios que tenía pendientes de cuando revisé la pr, por si son de utilidad al extraer de la misma funcionalidades.

"macros.combat.dialog.rollResistanceButton.title": "Roll Resistance",
"macros.combat.dialog.rollResistanceCriticButton.title": "Roll Critical Resist",
"macros.combat.dialog.rollOppousedCheckButton.title": "Roll Characteristic",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta errata está en muchos de los sitios en los que aparece. Habría que arreglarlos todos. Por otro lado... sabemos si este es el nombre oficial de "tirada enfrentada" en inglés?

Suggested change
"macros.combat.dialog.rollOppousedCheckButton.title": "Roll Characteristic",
"macros.combat.dialog.rollOpposedCheckButton.title": "Roll Characteristic",

"macros.mysticAct.dialog.spareActConfirm.body.title": "Do you want to make use of the Spare ACT?",
"macros.mysticAct.dialog.spareActConfirm.title": "You still have {spareAct} ACT",
"macros.mysticAct.dialog.message.title": "Accumulate <b>{act}</b> Zeon",
"macros.dialog.error.multipleSelectedToken.title": "Only can select one token",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"macros.dialog.error.multipleSelectedToken.title": "Only can select one token",
"macros.dialog.error.multipleSelectedToken.title": "You must select a single token",

Comment on lines +776 to +778
"macros.combat.dialog.oppousedCheck.characteristic.strength.title": "Fuerza",
"macros.combat.dialog.oppousedCheck.characteristic.agility.title": "Agilidad",
"macros.combat.dialog.oppousedCheck.characteristic.dexterity.title": "Destreza",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya existen traducciones para "Fuerza", "Destreza" y "Agilidad". Habría que usar esas (anima.ui.characteristics.[caracteristica]) en lugar de crear nuevas.

"macros.mysticAct.dialog.button.spareAct.title": "ACT Excedente",
"macros.mysticAct.dialog.button.releaseAct.title": "Liberar Zeon",
"macros.mysticAct.dialog.button.withstandPain.title": "Resistir Dolor",
"macros.mysticAct.dialog.spareActConfirm.body.title": "Quieres hacer uso del ACT Excedente",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En general, en otras preguntas, cerramos el signo de interrogación pero no lo abrimos. Quizá en castellano deberíamos poner también el signo de abrir interrogación...

Suggested change
"macros.mysticAct.dialog.spareActConfirm.body.title": "Quieres hacer uso del ACT Excedente",
"macros.mysticAct.dialog.spareActConfirm.body.title": "¿Quieres hacer uso del ACT Excedente?",

Comment on lines +123 to +142
html.find('.toggle-effects-button').click(async e => {
const { effectsItemId } = e.currentTarget.dataset;
const item = this.actor.items.get(effectsItemId);
const effects = this.actor.getEmbeddedCollection('ActiveEffect').contents;
const relevantEffects = effects.filter(effect =>
effect.origin.endsWith(effectsItemId)
);

if (relevantEffects.length === 0) {
return;
}

const newStatus = !item.system.activeEffect.enabled;

for (const effect of relevantEffects) {
await effect.update({ disabled: !newStatus });
}
return item.update({ 'system.activeEffect.enabled': newStatus });
});

Copy link
Contributor

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.

Copy link
Contributor

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?

distance
);
distance,
specialPorpuseAttack);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
specialPorpuseAttack);
specialPurposeAttack);

@@ -291,6 +333,7 @@ export class WSGMCombatManager extends WSCombatManager {
const { projectile } = result.values;
const { damage } = result.values;
const { distance } = result.values;
const { specialPorpuseAttack } = result.values;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { specialPorpuseAttack } = result.values;
const { specialPurposeAttack } = result.values;

distance
) {
distance,
specialPorpuseAttack) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
specialPorpuseAttack) {
specialPurposeAttack) {

@@ -336,7 +379,8 @@ export class WSGMCombatManager extends WSCombatManager {
visible,
projectile,
damage,
distance
distance,
specialPorpuseAttack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
specialPorpuseAttack
specialPurposeAttack

@@ -43,6 +47,16 @@ const getInitialData = (attacker, defender, options = {}) => {
enable: combatDistance,
check: false
},
specialPorpuseAttacks: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
specialPorpuseAttacks: [
specialPurposeAttacks: [

@Eryx5502
Copy link
Contributor

Eryx5502 commented Oct 2, 2024

Como dijimos, en lugar de resolver los conflictos vamos a extraer las funcionalidades para re-implementarlas por separado en las próximas versiones. He publicado los comentarios de revisión por si sirven de utilidad al extraer las funcionalidades.

@Eryx5502 Eryx5502 closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🇪🇸 - Feature request] Automatización ataques críticos
2 participants