Adds proficiency bonus to monster detail.
This commit is contained in:
@@ -231,60 +231,64 @@ struct MonsterDetail: View {
|
|||||||
|
|
||||||
ResistancesAndImmunitiesView(monster: monster)
|
ResistancesAndImmunitiesView(monster: monster)
|
||||||
|
|
||||||
// Languages
|
Group {
|
||||||
if (!monsterLanguagesDescription.isEmpty) {
|
// Languages
|
||||||
LabeledField("Languages") {
|
if (!monsterLanguagesDescription.isEmpty) {
|
||||||
Text(monsterLanguagesDescription)
|
LabeledField("Languages") {
|
||||||
}
|
Text(monsterLanguagesDescription)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Challenge Rating
|
|
||||||
if (!monsterChallengeRatingDescription.isEmpty) {
|
|
||||||
LabeledField("Challenge") {
|
|
||||||
Text(monsterChallengeRatingDescription)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add proficiency bonus
|
// Challenge Rating
|
||||||
}
|
if (!monsterChallengeRatingDescription.isEmpty) {
|
||||||
|
LabeledField("Challenge") {
|
||||||
// Abilities
|
Text(monsterChallengeRatingDescription)
|
||||||
if (monsterAbilities.count > 0) {
|
|
||||||
ForEach(monsterAbilities) { ability in
|
|
||||||
VStack {
|
|
||||||
Markdown(Document(ability.renderedText(monster)))
|
|
||||||
Divider()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Proficiency Bonus
|
||||||
// Actions
|
LabeledField("Proficiency Bonus") {
|
||||||
if (monsterActions.count > 0) {
|
Text(String(monster.proficiencyBonus))
|
||||||
VStack(alignment: .leading) {
|
}
|
||||||
Text("Actions")
|
|
||||||
.fontWeight(.bold)
|
// Abilities
|
||||||
ForEach(monsterActions) { action in
|
if (monsterAbilities.count > 0) {
|
||||||
|
ForEach(monsterAbilities) { ability in
|
||||||
VStack {
|
VStack {
|
||||||
Markdown(Document(action.renderedText(monster)))
|
Markdown(Document(ability.renderedText(monster)))
|
||||||
Divider()
|
Divider()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Legendary Actions
|
// Actions
|
||||||
if (monsterLegendaryActions.count > 0) {
|
if (monsterActions.count > 0) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("Legendary Actions")
|
Text("Actions")
|
||||||
.fontWeight(.bold)
|
.font(.system(size: 24, weight: .bold))
|
||||||
ForEach(monsterLegendaryActions) { action in
|
ForEach(monsterActions) { action in
|
||||||
VStack {
|
VStack {
|
||||||
Markdown(Document(action.renderedText(monster)))
|
Markdown(Document(action.renderedText(monster)))
|
||||||
Divider()
|
Divider()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legendary Actions
|
||||||
|
if (monsterLegendaryActions.count > 0) {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Text("Legendary Actions")
|
||||||
|
.font(.system(size: 20, weight: .bold))
|
||||||
|
ForEach(monsterLegendaryActions) { action in
|
||||||
|
VStack {
|
||||||
|
Markdown(Document(action.renderedText(monster)))
|
||||||
|
Divider()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.foregroundColor(kTextColor)
|
.foregroundColor(kTextColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user