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

Automatically Getting Target's DR #42

Closed
MulliganStu opened this issue Oct 9, 2024 · 1 comment
Closed

Automatically Getting Target's DR #42

MulliganStu opened this issue Oct 9, 2024 · 1 comment

Comments

@MulliganStu
Copy link
Contributor

MulliganStu commented Oct 9, 2024

I noticed that you had to enter the defender's DR manually. So, I added these lines of code in attack-dialog.js to grab the targetted actor's DR and put it in the box for the defender's DR.

let target = Array.from(game.user.targets)[0];
let targetActorId = target.document.actorId;
let actor = game.actors.get(targetActorId);
defenderDR = actor.system.defenseRating;

I'm sure there's a prettier or easier way to do this, but I wanted to see if something like this could be implemented so I didn't have to stop and look at the defender's DR every time and put it in.

Thank you

@MulliganStu
Copy link
Contributor Author

MulliganStu commented Oct 17, 2024

45 fixes this

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

1 participant