Adds wisdomScore and wisdomModifier to Monster.

Adds tests for wisdomScore and wisdomModifier.
This commit is contained in:
2020-09-13 03:33:14 -07:00
parent 05b3ad1280
commit a26031a04f
2 changed files with 28 additions and 2 deletions

View File

@@ -93,6 +93,10 @@
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.intelligenceScore = tempNumber.intValue;
}
tempNumber = [jsonRoot objectForKey:@"wisPoints"];
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.wisdomScore = tempNumber.intValue;
}
return self;
}
@@ -152,7 +156,7 @@
}
-(int)wisdomModifier {
@throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil];
return [Monster abilityModifierForScore:self.wisdomScore];
}
-(int)charismaModifier {
@@ -360,6 +364,7 @@
self.dexterityScore = monster.dexterityScore;
self.constitutionScore = monster.constitutionScore;
self.intelligenceScore = monster.intelligenceScore;
self.wisdomScore = monster.wisdomScore;
}
@end