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

[ADD] Calculate AC #2

Closed
KingFruit85 opened this issue Oct 8, 2019 · 3 comments · Fixed by #47
Closed

[ADD] Calculate AC #2

KingFruit85 opened this issue Oct 8, 2019 · 3 comments · Fixed by #47

Comments

@KingFruit85
Copy link
Owner

@KingFruit85 KingFruit85 commented Oct 8, 2019

Take into account class features, armor & protental feats

@KingFruit85

This comment has been minimized.

Copy link
Owner Author

@KingFruit85 KingFruit85 commented Oct 10, 2019

function calculateArmorClass(character){

  let ac = 10;

  if(character.characterClass.equipment.armor === undefined){
    ac += character.abilityScores.dexMod;
    return ac;
  }else{
    ac = character.characterClass.equipment.armor.baseArmorClass;
    ac += character.abilityScores.dexMod;
  }
  return ac;
}

Something like that ^^

Should probably take into account feats (when variant human is implemented) and class abilities like unarmoured defence etc

@Cadesh

This comment has been minimized.

Copy link
Contributor

@Cadesh Cadesh commented Nov 16, 2019

Hi @KingFruit85 I can work on this.
Also if you like I can add some JEST tests to test the function to calculate AC.

@Cadesh

This comment has been minimized.

Copy link
Contributor

@Cadesh Cadesh commented Nov 16, 2019

It will be something like you proposed above:

  • if armor
    -- add base armor
    -- check dex limits for armor type
    --- add dex
  • no armor
    -- add dex
    -- check/add different professions bonus._
@Cadesh Cadesh mentioned this issue Nov 17, 2019
0 of 2 tasks complete
Dungeons & Dragons Random Character Creator automation moved this from To do to Done Nov 23, 2019
KingFruit85 added a commit that referenced this issue Nov 23, 2019
Fix #2: Added AC calculator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.