Adds proficiency bonus to monster detail.

This commit is contained in:
2021-03-25 17:32:40 -07:00
parent f70390d585
commit 46e4b9a1f6

View File

@@ -231,6 +231,7 @@ struct MonsterDetail: View {
ResistancesAndImmunitiesView(monster: monster)
Group {
// Languages
if (!monsterLanguagesDescription.isEmpty) {
LabeledField("Languages") {
@@ -243,8 +244,11 @@ struct MonsterDetail: View {
LabeledField("Challenge") {
Text(monsterChallengeRatingDescription)
}
}
// TODO: add proficiency bonus
// Proficiency Bonus
LabeledField("Proficiency Bonus") {
Text(String(monster.proficiencyBonus))
}
// Abilities
@@ -261,7 +265,7 @@ struct MonsterDetail: View {
if (monsterActions.count > 0) {
VStack(alignment: .leading) {
Text("Actions")
.fontWeight(.bold)
.font(.system(size: 24, weight: .bold))
ForEach(monsterActions) { action in
VStack {
Markdown(Document(action.renderedText(monster)))
@@ -275,7 +279,7 @@ struct MonsterDetail: View {
if (monsterLegendaryActions.count > 0) {
VStack(alignment: .leading) {
Text("Legendary Actions")
.fontWeight(.bold)
.font(.system(size: 20, weight: .bold))
ForEach(monsterLegendaryActions) { action in
VStack {
Markdown(Document(action.renderedText(monster)))
@@ -284,7 +288,7 @@ struct MonsterDetail: View {
}
}
}
}
}
.padding(.horizontal)
.foregroundColor(kTextColor)