Adds ability scores to monster cards.

This commit is contained in:
2020-09-26 23:06:03 -07:00
parent 0912ac0fd8
commit 2a9b936d0d
5 changed files with 191 additions and 32 deletions

View File

@@ -18,6 +18,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) IBOutlet UILabel *monsterArmorClass;
@property (weak, nonatomic) IBOutlet UILabel *monsterHitPoints;
@property (weak, nonatomic) IBOutlet UILabel *monsterSpeed;
@property (weak, nonatomic) IBOutlet UILabel *monsterStrength;
@property (weak, nonatomic) IBOutlet UILabel *monsterDexterity;
@property (weak, nonatomic) IBOutlet UILabel *monsterConstitution;
@property (weak, nonatomic) IBOutlet UILabel *monsterIntelligence;
@property (weak, nonatomic) IBOutlet UILabel *monsterWisdom;
@property (weak, nonatomic) IBOutlet UILabel *monsterCharisma;
@property Monster* monster;

View File

@@ -87,6 +87,24 @@ NSString* makeHTMLFragmentString(NSString* format, ...) {
self.monsterSpeed.attributedText = [HTMLHelper attributedStringFromHTML:makeHTMLFragmentString(@"<b>Speed</b> %@", speedDescription)];
}
}
if (self.monsterStrength) {
self.monsterStrength.text = self.monster.strengthDescription;
}
if (self.monsterDexterity) {
self.monsterDexterity.text = self.monster.dexterityDescription;
}
if (self.monsterConstitution) {
self.monsterConstitution.text = self.monster.constitutionDescription;
}
if (self.monsterIntelligence) {
self.monsterIntelligence.text = self.monster.intelligenceDescription;
}
if (self.monsterWisdom) {
self.monsterWisdom.text = self.monster.wisdomDescription;
}
if (self.monsterCharisma) {
self.monsterCharisma.text = self.monster.charismaDescription;
}
}
- (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue {