From e721568312e5a7efc8e91d4c2a81660e021f2297 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 12 Sep 2022 00:10:31 +0200 Subject: [PATCH] Document the new abilities of shield spells --- .../ability/magic/spell/effect/ShieldSpell.java | 4 ++-- .../ability/magic/spell/effect/SpellType.java | 5 +++++ .../unicopia/spellbook/chapters/fire_magic.json | 17 +++++++++++------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/ShieldSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/ShieldSpell.java index 1024978e..6c347700 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/ShieldSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/ShieldSpell.java @@ -141,10 +141,10 @@ public class ShieldSpell extends AbstractSpell { valid &= !(entity instanceof PassiveEntity); } if (getTraits().get(Trait.BLOOD) > 0) { - valid &= entity instanceof HostileEntity; + valid &= !(entity instanceof HostileEntity); } if (getTraits().get(Trait.ICE) > 0) { - valid &= entity instanceof PlayerEntity; + valid &= !(entity instanceof PlayerEntity); } return valid; } diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java index 405ab73f..2f847780 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java @@ -176,6 +176,11 @@ public final class SpellType implements Affine, SpellPredicate< return this == EMPTY_KEY; } + @Override + public String toString() { + return getTranslationKey(); + } + @Deprecated(forRemoval = true) public static SpellType register(String name, Affinity affinity, int color, boolean obtainable, Factory factory) { return register(name, affinity, color, obtainable, SpellTraits.EMPTY, factory); diff --git a/src/main/resources/assets/unicopia/spellbook/chapters/fire_magic.json b/src/main/resources/assets/unicopia/spellbook/chapters/fire_magic.json index 4661d40d..a2083458 100644 --- a/src/main/resources/assets/unicopia/spellbook/chapters/fire_magic.json +++ b/src/main/resources/assets/unicopia/spellbook/chapters/fire_magic.json @@ -225,14 +225,19 @@ ] }, { - "title": "", - "level": 0, - "elements": [] + "title": "Protection II", + "level": 4, + "elements": [ + "By adding extra traits, I was able to slightly modify the shield to allow or deny certain parties into the effect range.", + "+ add life trait --> all animals may enter\n+ add blood trait --> all monsters may enter\n+ add ice trait --> all ponies may enter" + ] }, { - "title": "", - "level": 0, - "elements": [] + "title": "Protection III", + "level": 5, + "elements": [ + "+ add genorosity trait to attach the spell to a location rather than yourself" + ] }, { "title": "Scrap: 9th Jum '12",