Adds saving throws to monster card display.
Adds proficiencyBonus implementation to Monster. The proficiency bonus relies on CR and defaults to 0 until the CR fields are implemented
This commit is contained in:
@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterIntelligence;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterWisdom;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterCharisma;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterSavingThrows;
|
||||
|
||||
@property Monster* monster;
|
||||
|
||||
|
||||
@@ -105,6 +105,14 @@ NSString* makeHTMLFragmentString(NSString* format, ...) {
|
||||
if (self.monsterCharisma) {
|
||||
self.monsterCharisma.text = self.monster.charismaDescription;
|
||||
}
|
||||
if (self.monsterSavingThrows) {
|
||||
NSString *savingThrowsDescription = self.monster.savingThrowsDescription;
|
||||
if (savingThrowsDescription == nil) {
|
||||
self.monsterSavingThrows.text = @"";
|
||||
} else {
|
||||
self.monsterSavingThrows.attributedText = [HTMLHelper attributedStringFromHTML:makeHTMLFragmentString(@"<b>Saving Throws</b> %@", savingThrowsDescription)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue {
|
||||
|
||||
Reference in New Issue
Block a user