Adds otherArmorDescription to Monster entity.

Adds tests for otherArmorDescription.
This commit is contained in:
2020-09-13 04:25:08 -07:00
parent e309e15af4
commit 700724ce5b
3 changed files with 4 additions and 3 deletions

View File

@@ -21,7 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface Monster : NSManagedObject @interface Monster : NSManagedObject
@property NSString *otherArmorDescription;
@property NSString *hpText; @property NSString *hpText;
@property NSString *speed; @property NSString *speed;
@property NSString *burrowSpeed; @property NSString *burrowSpeed;

View File

@@ -27,7 +27,6 @@
@synthesize hpText; @synthesize hpText;
@synthesize isBlind; @synthesize isBlind;
@synthesize naturalArmorBonus; @synthesize naturalArmorBonus;
@synthesize otherArmorDescription;
@synthesize shieldBonus; @synthesize shieldBonus;
@synthesize speed; @synthesize speed;
@synthesize swimSpeed; @synthesize swimSpeed;
@@ -71,6 +70,7 @@
self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; self.subtype = [jsonRoot objectForKey:@"tag"] ?: @"";
self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @""; self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @"";
self.armorName = [jsonRoot objectForKey:@"armorName"] ?: @""; self.armorName = [jsonRoot objectForKey:@"armorName"] ?: @"";
self.otherArmorDescription = [jsonRoot objectForKey:@"otherArmorDesc"] ?: @"";
tempNumber = [jsonRoot objectForKey:@"strPoints"]; tempNumber = [jsonRoot objectForKey:@"strPoints"];
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
self.strengthScore = tempNumber.intValue; self.strengthScore = tempNumber.intValue;
@@ -367,6 +367,7 @@
self.wisdomScore = monster.wisdomScore; self.wisdomScore = monster.wisdomScore;
self.charismaScore = monster.charismaScore; self.charismaScore = monster.charismaScore;
self.armorName = monster.armorName; self.armorName = monster.armorName;
self.otherArmorDescription = monster.otherArmorDescription;
} }
@end @end

View File

@@ -8,6 +8,7 @@
<attribute name="dexterityScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> <attribute name="dexterityScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="intelligenceScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> <attribute name="intelligenceScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String" defaultValueString=""/> <attribute name="name" attributeType="String" defaultValueString=""/>
<attribute name="otherArmorDescription" optional="YES" attributeType="String" defaultValueString=""/>
<attribute name="size" attributeType="String" defaultValueString=""/> <attribute name="size" attributeType="String" defaultValueString=""/>
<attribute name="strengthScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> <attribute name="strengthScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="subtype" attributeType="String" defaultValueString=""/> <attribute name="subtype" attributeType="String" defaultValueString=""/>
@@ -15,6 +16,6 @@
<attribute name="wisdomScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> <attribute name="wisdomScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
</entity> </entity>
<elements> <elements>
<element name="Monster" positionX="-63" positionY="-18" width="128" height="223"/> <element name="Monster" positionX="-63" positionY="-18" width="128" height="238"/>
</elements> </elements>
</model> </model>