Document the new abilities of shield spells

This commit is contained in:
Sollace 2022-09-12 00:10:31 +02:00
parent 5d31446c54
commit e721568312
3 changed files with 18 additions and 8 deletions

View file

@ -141,10 +141,10 @@ public class ShieldSpell extends AbstractSpell {
valid &= !(entity instanceof PassiveEntity); valid &= !(entity instanceof PassiveEntity);
} }
if (getTraits().get(Trait.BLOOD) > 0) { if (getTraits().get(Trait.BLOOD) > 0) {
valid &= entity instanceof HostileEntity; valid &= !(entity instanceof HostileEntity);
} }
if (getTraits().get(Trait.ICE) > 0) { if (getTraits().get(Trait.ICE) > 0) {
valid &= entity instanceof PlayerEntity; valid &= !(entity instanceof PlayerEntity);
} }
return valid; return valid;
} }

View file

@ -176,6 +176,11 @@ public final class SpellType<T extends Spell> implements Affine, SpellPredicate<
return this == EMPTY_KEY; return this == EMPTY_KEY;
} }
@Override
public String toString() {
return getTranslationKey();
}
@Deprecated(forRemoval = true) @Deprecated(forRemoval = true)
public static <T extends Spell> SpellType<T> register(String name, Affinity affinity, int color, boolean obtainable, Factory<T> factory) { public static <T extends Spell> SpellType<T> register(String name, Affinity affinity, int color, boolean obtainable, Factory<T> factory) {
return register(name, affinity, color, obtainable, SpellTraits.EMPTY, factory); return register(name, affinity, color, obtainable, SpellTraits.EMPTY, factory);

View file

@ -225,14 +225,19 @@
] ]
}, },
{ {
"title": "", "title": "Protection II",
"level": 0, "level": 4,
"elements": [] "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": "", "title": "Protection III",
"level": 0, "level": 5,
"elements": [] "elements": [
"+ add genorosity trait to attach the spell to a location rather than yourself"
]
}, },
{ {
"title": "Scrap: 9th Jum '12", "title": "Scrap: 9th Jum '12",