Skip to content

Commit

Permalink
Hit points display was decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjohnson committed Mar 6, 2024
1 parent 20e7098 commit a57f7c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api_v2/models/characterclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def hit_points(self):
hit_dice_name = "1{} per {} level".format(self.hit_dice, self.name)
split_dice = self.hit_dice.lower().split("d")[1]
hit_points_at_1st_level = "{} + your Constitution modifier".format(split_dice)
half_plus_one = str(int(split_dice)/2 + 1)
half_plus_one = str(int(split_dice)//2 + 1)
hit_points_at_higher_levels = "1{} (or {}) + your Constitution modifier per {} level after 1st".format(self.hit_dice, half_plus_one, self.name.lower())

return {
Expand Down
24 changes: 12 additions & 12 deletions data/v2/wizards-of-the-coast/srd/CharacterClass.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Barbarian",
"document": "srd",
"subclass_of": null,
"hit_dice": "D12"
"hit_dice": "d12"
}
},
{
Expand All @@ -16,7 +16,7 @@
"name": "Bard",
"document": "srd",
"subclass_of": null,
"hit_dice": "D8"
"hit_dice": "d8"
}
},
{
Expand Down Expand Up @@ -46,7 +46,7 @@
"name": "Cleric",
"document": "srd",
"subclass_of": null,
"hit_dice": "D8"
"hit_dice": "d8"
}
},
{
Expand Down Expand Up @@ -76,7 +76,7 @@
"name": "Druid",
"document": "srd",
"subclass_of": null,
"hit_dice": "D8"
"hit_dice": "d8"
}
},
{
Expand All @@ -86,7 +86,7 @@
"name": "Fighter",
"document": "srd",
"subclass_of": null,
"hit_dice": "D10"
"hit_dice": "d10"
}
},
{
Expand Down Expand Up @@ -116,7 +116,7 @@
"name": "Monk",
"document": "srd",
"subclass_of": null,
"hit_dice": "D8"
"hit_dice": "d8"
}
},
{
Expand All @@ -136,7 +136,7 @@
"name": "Paladin",
"document": "srd",
"subclass_of": null,
"hit_dice": "D10"
"hit_dice": "d10"
}
},
{
Expand All @@ -156,7 +156,7 @@
"name": "Ranger",
"document": "srd",
"subclass_of": null,
"hit_dice": "D10"
"hit_dice": "d10"
}
},
{
Expand All @@ -166,7 +166,7 @@
"name": "Rogue",
"document": "srd",
"subclass_of": null,
"hit_dice": "D8"
"hit_dice": "d8"
}
},
{
Expand All @@ -186,7 +186,7 @@
"name": "Sorcerer",
"document": "srd",
"subclass_of": null,
"hit_dice": "D6"
"hit_dice": "d6"
}
},
{
Expand Down Expand Up @@ -216,7 +216,7 @@
"name": "Warlock",
"document": "srd",
"subclass_of": null,
"hit_dice": "D8"
"hit_dice": "d8"
}
},
{
Expand All @@ -236,7 +236,7 @@
"name": "Wizard",
"document": "srd",
"subclass_of": null,
"hit_dice": "D6"
"hit_dice": "d6"
}
}
]

0 comments on commit a57f7c0

Please sign in to comment.