Solar and Lunar charms now separate subclass of charmBase
This commit is contained in:
parent
3d9ba0d598
commit
c1abed0a0c
Binary file not shown.
Binary file not shown.
@ -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)
|
||||
|
||||
|
58
app/migrations/0010_auto_20200411_1711.py
Normal file
58
app/migrations/0010_auto_20200411_1711.py
Normal file
@ -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',
|
||||
),
|
||||
]
|
Binary file not shown.
@ -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 -----------------------------------#
|
||||
#==============================================================================#
|
||||
|
Loading…
Reference in New Issue
Block a user