diff --git a/app/__pycache__/models.cpython-38.pyc b/app/__pycache__/models.cpython-38.pyc index 4b7163f..02b9b68 100644 Binary files a/app/__pycache__/models.cpython-38.pyc and b/app/__pycache__/models.cpython-38.pyc differ diff --git a/app/migrations/0015_auto_20200411_1431.py b/app/migrations/0015_auto_20200411_1431.py new file mode 100644 index 0000000..447513c --- /dev/null +++ b/app/migrations/0015_auto_20200411_1431.py @@ -0,0 +1,34 @@ +# Generated by Django 3.0.5 on 2020-04-11 14:31 + +import app.models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0014_auto_20200411_1428'), + ] + + operations = [ + migrations.AlterField( + model_name='charm', + name='modifierAbility', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAbility', verbose_name='Abilities Modifiers'), + ), + migrations.AlterField( + model_name='charm', + name='modifierAttribute', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAttribute', verbose_name='Attribute Modifiers'), + ), + migrations.AlterField( + model_name='charm', + name='modifierStatic', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierStatic', verbose_name='Statics Modifiers'), + ), + migrations.AlterField( + model_name='charm', + name='rollConfiguration', + field=app.models.NamedManyToManyField(blank=True, to='app.rollConfiguration', verbose_name='Roll Configurations'), + ), + ] diff --git a/app/migrations/0016_auto_20200411_1439.py b/app/migrations/0016_auto_20200411_1439.py new file mode 100644 index 0000000..bc27bce --- /dev/null +++ b/app/migrations/0016_auto_20200411_1439.py @@ -0,0 +1,39 @@ +# Generated by Django 3.0.5 on 2020-04-11 14:39 + +import app.models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0015_auto_20200411_1431'), + ] + + operations = [ + migrations.AddField( + model_name='merit', + name='modifierAbility', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAbility', verbose_name='Abilities Modifiers'), + ), + migrations.AddField( + model_name='merit', + name='modifierAttribute', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierAttribute', verbose_name='Attribute Modifiers'), + ), + migrations.AddField( + model_name='merit', + name='modifierStatic', + field=app.models.NamedManyToManyField(blank=True, to='app.modifierStatic', verbose_name='Statics Modifiers'), + ), + migrations.AddField( + model_name='merit', + name='rollConfiguration', + field=app.models.NamedManyToManyField(blank=True, to='app.rollConfiguration', verbose_name='Roll Configurations'), + ), + migrations.AddField( + model_name='speciality', + name='ability', + field=app.models.SingleChoiceField(blank=True, choices=[('War', (('ARCHERY', 'Archery'), ('ATHLETICS', 'Athletics'), ('AWARENESS', 'Awareness'), ('BRAWL', 'Brawl'), ('DODGE', 'Dodge'), ('INTEGRITY', 'Integrity'), ('MELEE', 'Melee'), ('RESISTANCE', 'Resistance'), ('THROWN', 'Thrown'), ('WAR', 'War'))), ('Life', (('CRAFT', 'Craft'), ('LARCENY', 'Larceny'), ('LINGUISTICS', 'Linguistics'), ('PERFORMANCE', 'Performance'), ('PRESENCE', 'Presence'), ('RIDE', 'Ride'), ('SAIL', 'Sail'), ('SOCIALISE', 'Socialise'), ('STEALTH', 'Stealth'), ('SURVIVAL', 'Survival'))), ('Wisdom', (('BUREAUCRACY', 'Bureaucracy'), ('INVESTIGATION', 'Investigation'), ('LORE', 'Lore'), ('MEDICINE', 'Medicine'), ('OCCULT', 'Occult')))], max_length=100, verbose_name='Ability'), + ), + ] diff --git a/app/migrations/__pycache__/0015_auto_20200411_1431.cpython-38.pyc b/app/migrations/__pycache__/0015_auto_20200411_1431.cpython-38.pyc new file mode 100644 index 0000000..f1821b3 Binary files /dev/null and b/app/migrations/__pycache__/0015_auto_20200411_1431.cpython-38.pyc differ diff --git a/app/migrations/__pycache__/0016_auto_20200411_1439.cpython-38.pyc b/app/migrations/__pycache__/0016_auto_20200411_1439.cpython-38.pyc new file mode 100644 index 0000000..5506cb2 Binary files /dev/null and b/app/migrations/__pycache__/0016_auto_20200411_1439.cpython-38.pyc differ diff --git a/app/models.py b/app/models.py index c1119d3..0338a35 100644 --- a/app/models.py +++ b/app/models.py @@ -323,12 +323,21 @@ class modifierBase(models.Model): value = NamedIntegerField("Modifier Value") class modifierAttribute(modifierBase): + def __str__(self): + return "{} [{}]".format(self.attribute, self.value) + attribute = SingleChoiceField("Attribute", ATTRIBUTES) class modifierAbility(modifierBase): + def __str__(self): + return "{} [{}]".format(self.ability, self.value) + ability = SingleChoiceField("Ability", ABILITIES) class modifierStatic(modifierBase): + def __str__(self): + return "{} [{}]".format(self.static, self.value) + static = SingleChoiceField("Static", STATICS) #==============================================================================# @@ -338,6 +347,9 @@ class itemBase(models.Model): class Meta: abstract = True + def __str__(self): + return self.name + name = NameField() description = DescriptionField() @@ -384,6 +396,9 @@ class itemArmor(itemBase): #----------------------------------- CHARMS -----------------------------------# #==============================================================================# class charm(models.Model): + def __str__(self): + return self.name + name = NameField() description = DescriptionField() modifierAttribute = NamedManyToManyField("Attribute Modifiers", modifierAttribute) @@ -395,21 +410,27 @@ class charm(models.Model): #----------------------------------- MERITS -----------------------------------# #==============================================================================# class merit(models.Model): + def __str__(self): + return self.name + name = NameField() description = DescriptionField() dots = DotField("Dots") - # modifierAttribute - # modifierAbility - # modifierStatic - # rollConfiguration + modifierAttribute = NamedManyToManyField("Attribute Modifiers", modifierAttribute) + modifierAbility = NamedManyToManyField("Abilities Modifiers", modifierAbility) + modifierStatic = NamedManyToManyField("Statics Modifiers", modifierStatic) + rollConfiguration = NamedManyToManyField("Roll Configurations", rollConfiguration) #==============================================================================# #-------------------------------- SPECIALITIES --------------------------------# #==============================================================================# class speciality(models.Model): + def __str__(self): + return "[{}] {}".format(self.ability, self.name) + modifier = 2 name = NameField() - # ability + ability = SingleChoiceField("Ability", ABILITIES) #==============================================================================# #--------------------------------- INTIMACIES ---------------------------------# @@ -418,13 +439,14 @@ class intimacyBase(models.Model): class Meta: abstract = True + def __str__(self): + return "[{}] {}".format(self.description, self.intensity) + description = DescriptionField() intensity = SingleChoiceField("Intensity", INTENSITIES) - pass class intimacyTie(intimacyBase): target = NamedCharField("Target") - pass class intimacyPrincipal(intimacyBase): pass @@ -436,6 +458,9 @@ class characterBase(models.Model): class Meta: abstract = True + def __str__(self): + return self.name + #============ GENERAL =============# name = NameField()