mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 13:37:58 +01:00
Fix: Fix casting
# Conflicts: # src/main/java/com/minelittlepony/unicopia/ability/UnicornCastingAbility.java # Conflicts: # src/main/java/com/minelittlepony/unicopia/ability/UnicornCastingAbility.java
This commit is contained in:
parent
7560df438c
commit
1f2df6daf5
1 changed files with 2 additions and 2 deletions
|
@ -107,8 +107,8 @@ public class UnicornCastingAbility extends AbstractSpellCastingAbility {
|
|||
}
|
||||
}
|
||||
|
||||
boolean hasExact = player.getSpellSlot().contains(spell);
|
||||
boolean removed = !spell.isStackable() && player.getSpellSlot().removeWhere(s -> s.findMatches(spell.type()).findAny().isPresent(), true);
|
||||
boolean hasExact = !spell.isStackable() && player.getSpellSlot().contains(s -> !s.getTypeAndTraits().isStackable() && spell.test(s));
|
||||
boolean removed = !spell.isStackable() && player.getSpellSlot().removeWhere(s -> !s.getTypeAndTraits().isStackable() && s.findMatches(spell.type()).findAny().isPresent(), true);
|
||||
player.subtractEnergyCost(removed ? 2 : 4);
|
||||
if (!hasExact && !spell.isEmpty()) {
|
||||
Spell s = spell.apply(player, CastingMethod.DIRECT);
|
||||
|
|
Loading…
Reference in a new issue