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

Mule ability does not correctly update load maximums #76

Open
zxaos opened this issue Jul 21, 2023 · 1 comment
Open

Mule ability does not correctly update load maximums #76

zxaos opened this issue Jul 21, 2023 · 1 comment

Comments

@zxaos
Copy link
Contributor

zxaos commented Jul 21, 2023

A character that takes the cutter's "Mule" ability should have increased values for light/normal/heavy loadouts, but that changes is not reflected in the sheet

This does work in the base system sheet.

@JohanFalt
Copy link

If you replace code after row 433 in blades-alternatie-actor-sheet.js if works.

let mule_present=0;

    //look for Mule ability
    // @todo - fix translation.
    data.items.forEach(i => {
      if (i.type === "ability" && i.name === "(C) Mule") {
        mule_present = 1;
      }
    });

    //set encumbrance level
    if (mule_present) {
      switch (data.data.selected_load_level){
        case "BITD.Light":
          data.max_load = data.data.base_max_load + 5;
          break;
        case "BITD.Normal":
          data.max_load = data.data.base_max_load + 7;
          break;
        case "BITD.Heavy":
          data.max_load = data.data.base_max_load + 8;
          break;
        default:
          data.data.selected_load_level = "BITD.Normal";
          data.max_load = data.data.base_max_load + 7;
          break;
      }
    }
    else {
      switch (data.data.selected_load_level){
        case "BITD.Light":
          data.max_load = data.data.base_max_load + 3;
          break;
        case "BITD.Normal":
          data.max_load = data.data.base_max_load + 5;
          break;
        case "BITD.Heavy":
          data.max_load = data.data.base_max_load + 6;
          break;
        default:
          data.data.selected_load_level = "BITD.Normal";
          data.max_load = data.data.base_max_load + 5;
          break;
      }
    }

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

No branches or pull requests

2 participants