Skip to content

Commit

Permalink
Fixing spell school marked incorrectly.
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjohnson committed Mar 19, 2024
1 parent 0b5cacf commit 215c996
Show file tree
Hide file tree
Showing 10 changed files with 1,208 additions and 1,195 deletions.
596 changes: 298 additions & 298 deletions data/v2/en-publishing/a5esrd/Spell.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions data/v2/en-publishing/a5esrd/SpellSchool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"model": "api_v2.spellschool",
"pk": "transformation",
"fields": {
"name": "Transformation",
"desc": "No description provided by A5e.",
"document": "a5esrd"
}
}
]
864 changes: 432 additions & 432 deletions data/v2/kobold-press/deep-magic/Spell.json

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions data/v2/kobold-press/dmag-e/Spell.json

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions data/v2/kobold-press/kp/Spell.json

Large diffs are not rendered by default.

150 changes: 75 additions & 75 deletions data/v2/kobold-press/toh/Spell.json

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions data/v2/kobold-press/warlock/Spell.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions data/v2/open5e/o5e/Spell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"desc": "For the spell's Duration, your eyes turn black and veins of dark energy lace your cheeks. One creature of your choice within 60 feet of you that you can see must succeed on a Wisdom saving throw or be affected by one of the listed Effects of your choice for the Duration. On each of your turns until the spell ends, you can use your action to target another creature but can't target a creature again if it has succeeded on a saving throw against this casting of Eyebite.\n\nAsleep: The target is rendered Unconscious. It wakes up if it takes any damage or if another creature uses its action to jostle the sleeper awake.\n\nPanicked: The target is Frightened of you. On each of its turns, the Frightened creature must take the Dash action and move away from you by the safest and shortest possible route, unless there is no place to move. If the target is at least 60 feet away from you and can no longer see you, this effect ends.\n\nSickened: The target has disadvantage on Attack rolls and Ability Checks. At the end of each of its turns, it can make another Wisdom saving throw. If it succeeds, the effect ends.\n\n*(This Open5e spell replaces a like-named non-SRD spell from an official source.*",
"document": "o5e",
"level": 6,
"school": "evocation",
"school": "necromancy",
"higher_level": "",
"target_type": "creature",
"range": "Self",
Expand Down Expand Up @@ -38,7 +38,7 @@
"desc": "A ray of green light appears at your fingertip, arcing towards a target within range.\n\nMake a ranged spell attack against the target. On a hit, the target takes 2d8 poison damage and must make a Constitution saving throw. On a failed save, it is also poisoned until the end of your next turn.\n\n*(This Open5e spell replaces a like-named non-SRD spell from an official source.*",
"document": "o5e",
"level": 1,
"school": "evocation",
"school": "necromancy",
"higher_level": "When you cast this spell using a spell slot of 2nd level or higher, the damage increases by 1d8 for each slot level above 1st.",
"target_type": "creature",
"range": "60 feet",
Expand Down
518 changes: 259 additions & 259 deletions data/v2/wizards-of-the-coast/srd/Spell.json

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions scripts/data_manipulation/remapschool.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from api import models as v1
from api_v2 import models as v2


Expand All @@ -7,11 +8,12 @@
def remapschool():
print("REMAPPING RARITY FOR ITEMS")
for spell in v2.Spell.objects.all():
for ss in v2.SpellSchool.objects.all():
if spell.school_old == ss.key:
mapped_s = ss

print("key:{} size_int:{} mapped_size:{}".format(spell.key,spell.school_old,mapped_s.name))
spell.school = ss
spell.school.save()
spell_v1 = v1.Spell.objects.filter(slug=spell.key).first()

print("key:{} v2school:{} v1school:{}".format(spell.key,spell.school,spell_v1.school))

spell.school = v2.SpellSchool.objects.get(key=spell_v1.school.lower())
spell.save()
#spell.school = ss
#spell.school.save()

0 comments on commit 215c996

Please sign in to comment.