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

Variable open and fumble range #127

Merged
merged 9 commits into from
May 7, 2022

Conversation

JordiAlonsoLlovet
Copy link
Contributor

Changelog:

  • Added fields to modify the range of open and fumbled rolls.

  • The ActorData is now included with all 1d100xa rolls so the ranges can be checked.

  • Changed all instances of 1d100xaturn to 1d100Initiative.

  • If an ability with a base value above 200 is rolled the fumble range goes down by 1 (unless the range was already 1 or lower).

  • ABFFoundryRoll has a getter called fumbled that checks if the roll is a fumble.

  • In combat, the attack hook now includes a boolean indicating if it was a fumble (unused for now).

  • The fumble modifiers for Initiative rolls now include the value of the first roll, so it adds up to (Initiative - fumble) instead of (initiative + first roll - fumble).

  • Tweaked the initiative sorting so that a characters that fumble are allways at the bottom of the initiative, even if their final initiative is not the lowest.

…sheet; fumble range and openRoll range. ABFEExploderRoll will use this values when available instead of DEFAULT_FUMBLE_RANGE and DEFAULT_OPEN_RANGE. When rolling an ability > 200 the fumble range decreases by 1.
…can be checked if an ABFFoundryRoll fumbled and it is included in the combat attack hook (but it's not being used yet), a fumble in Initiative will deduct 75/100/125 AND the value of the first roll, and combatants who got a fumble are put on the bottom of initiative even if their final initiative is not the lowest.
…astery the word 'mastery' must be included in the formula
@JordiAlonsoLlovet JordiAlonsoLlovet requested a review from Linkaynn May 7, 2022 12:38
Copy link
Contributor

@Linkaynn Linkaynn left a comment

Choose a reason for hiding this comment

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

Muchas gracias por la feat, brutal lo de la iniciativa!

Te he dejado un par de comentarios

src/lang/en.json Outdated Show resolved Hide resolved
src/module/actor/ABFActorSheet.ts Outdated Show resolved Hide resolved
a: Combatant,
b: Combatant
): number {
var initiativeA = a.initiative || -9999;
Copy link
Contributor

Choose a reason for hiding this comment

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

Por aquí el let igual

@@ -231,8 +234,14 @@ export class CombatAttackDialog extends FormApplication<FormApplicationOptions,

const counterAttackBonus = this.data.attacker.counterAttackBonus ?? 0;

//const complexWeapon = (weapon?.data.special.value.includes("Compleja"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Se te colo un comentario por aquí

}

//const complexWeapon = (weapon?.data.special.value.includes("Compleja"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Por aquí otro

}));

this.foundryRoll.recalculateTotal();

// if (this.fumbled) {
// this.foundryRoll.recalculateTotal(this.calculateFumbledMod()-this.foundryRoll.firstResult);
Copy link
Contributor

Choose a reason for hiding this comment

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

Otro comentario por aquí

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No los quería quitar porque pensé que se podría usar en el futuro

Copy link
Contributor

Choose a reason for hiding this comment

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

No pasa nada, en git se queda registrado. ¡Gracias por el curro!

JordiAlonsoLlovet and others added 3 commits May 7, 2022 19:25
Co-authored-by: Jesé Romero Arbelo <jeseromeroarbelo@gmail.com>
Co-authored-by: Jesé Romero Arbelo <jeseromeroarbelo@gmail.com>
@JordiAlonsoLlovet JordiAlonsoLlovet merged commit 52e4aa5 into main May 7, 2022
@JordiAlonsoLlovet JordiAlonsoLlovet deleted the variable_open_and_fumble_range branch May 7, 2022 17:37
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.

2 participants