Adds shieldBonus to Monster entity.

Adds tests for shieldBonus.
This commit is contained in:
2020-09-13 04:35:49 -07:00
parent 700724ce5b
commit 88927c9ddc
4 changed files with 24 additions and 5 deletions

View File

@@ -27,7 +27,6 @@
@synthesize hpText;
@synthesize isBlind;
@synthesize naturalArmorBonus;
@synthesize shieldBonus;
@synthesize speed;
@synthesize swimSpeed;
@synthesize telepathy;
@@ -95,6 +94,10 @@
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.charismaScore = tempNumber.intValue;
}
tempNumber = [jsonRoot objectForKey:@"shieldBonus"];
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.shieldBonus = tempNumber.intValue;
}
return self;
}
@@ -368,6 +371,7 @@
self.charismaScore = monster.charismaScore;
self.armorName = monster.armorName;
self.otherArmorDescription = monster.otherArmorDescription;
self.shieldBonus = monster.shieldBonus;
}
@end