Adds charismaScore and charismaModifier to Monster.
Adds tests for charismaScore and charismaModifier.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user