Moves ability scores to Core Data entity.

This commit is contained in:
2020-09-13 04:03:30 -07:00
parent e541fdcae3
commit a6f048cc2d
3 changed files with 7 additions and 13 deletions

View File

@@ -39,12 +39,6 @@ NS_ASSUME_NONNULL_BEGIN
@property NSString *truesightDistance;
@property NSString *understandsBut;
@property int strengthScore;
@property int dexterityScore;
@property int constitutionScore;
@property int intelligenceScore;
@property int wisdomScore;
@property int charismaScore;
@property int shieldBonus;
@property int naturalArmorBonus;
@property int hitDice;

View File

@@ -15,33 +15,27 @@
@synthesize blindsightDistance;
@synthesize burrowSpeed;
@synthesize challengeRating;
@synthesize charismaScore;
@synthesize climbSpeed;
@synthesize constitutionScore;
@synthesize customChallengeRating;
@synthesize customHP;
@synthesize customProficiencyBonus;
@synthesize customSpeed;
@synthesize customSpeedDescription;
@synthesize darkvisionDistance;
@synthesize dexterityScore;
@synthesize flySpeed;
@synthesize hitDice;
@synthesize hover;
@synthesize hpText;
@synthesize intelligenceScore;
@synthesize isBlind;
@synthesize naturalArmorBonus;
@synthesize otherArmorDescription;
@synthesize shieldBonus;
@synthesize speed;
@synthesize strengthScore;
@synthesize swimSpeed;
@synthesize telepathy;
@synthesize tremorsenseDistance;
@synthesize truesightDistance;
@synthesize understandsBut;
@synthesize wisdomScore;
+(int)abilityModifierForScore: (int)score {
return (int)floor((score - 10) / 2.0);

View File

@@ -2,12 +2,18 @@
<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="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"/>
<attribute name="intelligenceScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String" defaultValueString=""/>
<attribute name="size" attributeType="String" defaultValueString=""/>
<attribute name="strengthScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="subtype" attributeType="String" defaultValueString=""/>
<attribute name="type" attributeType="String" defaultValueString=""/>
<attribute name="wisdomScore" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
</entity>
<elements>
<element name="Monster" positionX="-63" positionY="-18" width="128" height="118"/>
<element name="Monster" positionX="-63" positionY="-18" width="128" height="208"/>
</elements>
</model>