diff --git a/app/__pycache__/admin.cpython-38.pyc b/app/__pycache__/admin.cpython-38.pyc index 3ef2d18..81fc175 100644 Binary files a/app/__pycache__/admin.cpython-38.pyc and b/app/__pycache__/admin.cpython-38.pyc differ diff --git a/app/__pycache__/models.cpython-38.pyc b/app/__pycache__/models.cpython-38.pyc index 76cb6ef..0d97864 100644 Binary files a/app/__pycache__/models.cpython-38.pyc and b/app/__pycache__/models.cpython-38.pyc differ diff --git a/app/admin.py b/app/admin.py index f9c3162..27d062b 100644 --- a/app/admin.py +++ b/app/admin.py @@ -12,7 +12,8 @@ admin.site.register(itemWeaponMelee) admin.site.register(itemWeaponRanged) admin.site.register(itemArmor) -admin.site.register(charm) +admin.site.register(charmSolar) +admin.site.register(charmLunar) admin.site.register(merit) diff --git a/app/migrations/0010_auto_20200411_1711.py b/app/migrations/0010_auto_20200411_1711.py new file mode 100644 index 0000000..eb614de --- /dev/null +++ b/app/migrations/0010_auto_20200411_1711.py @@ -0,0 +1,58 @@ +# Generated by Django 3.0.5 on 2020-04-11 17:11 + +import app.models +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0009_auto_20200411_1706'), + ] + + operations = [ + migrations.CreateModel( + name='charmLunar', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', app.models.NameField(max_length=100, verbose_name='Name')), + ('description', app.models.DescriptionField(blank=True, max_length=1000, verbose_name='Description')), + ('levelEssence', app.models.NamedIntegerField(default=0, help_text=None, verbose_name='Essence Level')), + ('levelKey', app.models.NamedIntegerField(default=0, help_text=None, verbose_name='Key Level')), + ('active', app.models.NamedBooleanField(default=False, verbose_name='Active?')), + ('attribute', app.models.SingleChoiceField(blank=True, choices=[('Physical', (('STR', 'Srength'), ('DEX', 'Dexterity'), ('STA', 'Stamina'))), ('Social', (('CHA', 'Charisma'), ('MAN', 'Manipulation'), ('APP', 'Appearance'))), ('Mental', (('PER', 'Perception'), ('INT', 'Intelligence'), ('WIT', 'Wits')))], max_length=100, verbose_name='Key Attribute')), + ('character', app.models.NamedForeignKeyField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.characterBase', verbose_name='Character')), + ('modifierAbility', app.models.NamedManyToManyField(blank=True, to='app.modifierAbility', verbose_name='Abilities Modifiers')), + ('modifierAttribute', app.models.NamedManyToManyField(blank=True, to='app.modifierAttribute', verbose_name='Attribute Modifiers')), + ('modifierStatic', app.models.NamedManyToManyField(blank=True, to='app.modifierStatic', verbose_name='Statics Modifiers')), + ('rollConfiguration', app.models.NamedManyToManyField(blank=True, to='app.rollConfiguration', verbose_name='Roll Configurations')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='charmSolar', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', app.models.NameField(max_length=100, verbose_name='Name')), + ('description', app.models.DescriptionField(blank=True, max_length=1000, verbose_name='Description')), + ('levelEssence', app.models.NamedIntegerField(default=0, help_text=None, verbose_name='Essence Level')), + ('levelKey', app.models.NamedIntegerField(default=0, help_text=None, verbose_name='Key Level')), + ('active', app.models.NamedBooleanField(default=False, verbose_name='Active?')), + ('ability', 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='Key Ability')), + ('character', app.models.NamedForeignKeyField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.characterBase', verbose_name='Character')), + ('modifierAbility', app.models.NamedManyToManyField(blank=True, to='app.modifierAbility', verbose_name='Abilities Modifiers')), + ('modifierAttribute', app.models.NamedManyToManyField(blank=True, to='app.modifierAttribute', verbose_name='Attribute Modifiers')), + ('modifierStatic', app.models.NamedManyToManyField(blank=True, to='app.modifierStatic', verbose_name='Statics Modifiers')), + ('rollConfiguration', app.models.NamedManyToManyField(blank=True, to='app.rollConfiguration', verbose_name='Roll Configurations')), + ], + options={ + 'abstract': False, + }, + ), + migrations.DeleteModel( + name='charm', + ), + ] diff --git a/app/migrations/__pycache__/0010_auto_20200411_1711.cpython-38.pyc b/app/migrations/__pycache__/0010_auto_20200411_1711.cpython-38.pyc new file mode 100644 index 0000000..ea0549c Binary files /dev/null and b/app/migrations/__pycache__/0010_auto_20200411_1711.cpython-38.pyc differ diff --git a/app/models.py b/app/models.py index 2dc877e..f4f896d 100644 --- a/app/models.py +++ b/app/models.py @@ -589,15 +589,20 @@ class itemArmor(itemBase): #==============================================================================# #----------------------------------- CHARMS -----------------------------------# #==============================================================================# -class charm(models.Model): +class charmBase(models.Model): + class Meta: + abstract = True + def __str__(self): return self.name name = NameField() description = DescriptionField() - rollConfiguration = NamedManyToManyField("Roll Configurations", rollConfiguration) + levelEssence = NamedIntegerField("Essence Level") + levelKey = NamedIntegerField("Key Level") character = NamedForeignKeyField("Character", characterBase) active = NamedBooleanField("Active?") + rollConfiguration = NamedManyToManyField("Roll Configurations", rollConfiguration) modifierAttribute = NamedManyToManyField("Attribute Modifiers", modifierAttribute) modifierAbility = NamedManyToManyField("Abilities Modifiers", modifierAbility) modifierStatic = NamedManyToManyField("Statics Modifiers", modifierStatic) @@ -614,6 +619,12 @@ class charm(models.Model): output += modifierStatic.value return +class charmSolar(charmBase): + ability = SingleChoiceField("Key Ability", ABILITIES) + +class charmLunar(charmBase): + attribute = SingleChoiceField("Key Attribute", ATTRIBUTES) + #==============================================================================# #----------------------------------- MERITS -----------------------------------# #==============================================================================#