Adds armorName to Monster entity.
Adds tests for armorName.
This commit is contained in:
@@ -21,7 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Monster : NSManagedObject
|
||||
|
||||
@property NSString *armorName;
|
||||
@property NSString *otherArmorDescription;
|
||||
@property NSString *hpText;
|
||||
@property NSString *speed;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
@implementation Monster
|
||||
|
||||
@synthesize armorName;
|
||||
@synthesize blindsightDistance;
|
||||
@synthesize burrowSpeed;
|
||||
@synthesize challengeRating;
|
||||
@@ -71,6 +70,7 @@
|
||||
self.type = [jsonRoot objectForKey:@"type"] ?: @"";
|
||||
self.subtype = [jsonRoot objectForKey:@"tag"] ?: @"";
|
||||
self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @"";
|
||||
self.armorName = [jsonRoot objectForKey:@"armorName"] ?: @"";
|
||||
tempNumber = [jsonRoot objectForKey:@"strPoints"];
|
||||
if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) {
|
||||
self.strengthScore = tempNumber.intValue;
|
||||
@@ -366,6 +366,7 @@
|
||||
self.intelligenceScore = monster.intelligenceScore;
|
||||
self.wisdomScore = monster.wisdomScore;
|
||||
self.charismaScore = monster.charismaScore;
|
||||
self.armorName = monster.armorName;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="16119" systemVersion="19G2021" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" usedWithCloudKit="YES" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Monster" representedClassName="Monster" syncable="YES" codeGenerationType="category">
|
||||
<attribute name="alignment" attributeType="String" defaultValueString=""/>
|
||||
<attribute name="armorName" optional="YES" attributeType="String" defaultValueString=""/>
|
||||
<attribute name="charismaScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="constitutionScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="dexterityScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
@@ -14,6 +15,6 @@
|
||||
<attribute name="wisdomScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="Monster" positionX="-63" positionY="-18" width="128" height="208"/>
|
||||
<element name="Monster" positionX="-63" positionY="-18" width="128" height="223"/>
|
||||
</elements>
|
||||
</model>
|
||||
Reference in New Issue
Block a user