Adds charismaScore and charismaModifier to Monster.

Adds tests for charismaScore and charismaModifier.
This commit is contained in:
2020-09-13 03:39:55 -07:00
parent efaf492e41
commit d66e5140e7
2 changed files with 30 additions and 2 deletions

View File

@@ -97,6 +97,11 @@
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.wisdomScore = tempNumber.intValue;
}
tempNumber = [jsonRoot objectForKey:@"chaPoints"];
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.charismaScore = tempNumber.intValue;
}
return self;
}
@@ -160,9 +165,10 @@
}
-(int)charismaModifier {
@throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil];
return [Monster abilityModifierForScore:self.charismaScore];
}
//getArmorClass
-(NSString*)armorClassDescription {
@throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil];
@@ -365,6 +371,7 @@
self.constitutionScore = monster.constitutionScore;
self.intelligenceScore = monster.intelligenceScore;
self.wisdomScore = monster.wisdomScore;
self.charismaScore = monster.charismaScore;
}
@end