Skip to content

Commit

Permalink
Implementing work-around for inconsistent behavior of is.integer
Browse files Browse the repository at this point in the history
  • Loading branch information
njlyon0 committed May 6, 2024
1 parent 7beaff3 commit 6d11904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/xp_pool.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ xp_pool <- function(party_level = NULL, party_size = NULL, difficulty = NULL){
stop("Unrecognized difficulty level. Please use only one of 'easy', 'medium', 'hard', or 'deadly'")

# If party level is an integer, use the DMG's values
if(is.integer(party_level) == TRUE){
if(stringr::str_detect(string = party_level, pattern = "\\.") == TRUE){

# Define XP / player values from DMG
xp_df <- data.frame('pc_level' = 1:20,
Expand Down

0 comments on commit 6d11904

Please sign in to comment.