Don't harm entities the pegasus is carrying when doing a rainboom

This commit is contained in:
Sollace 2024-03-03 14:15:45 +00:00
parent 5348e12aca
commit 385c412a9d
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -9,7 +9,6 @@ import com.minelittlepony.unicopia.ability.magic.Caster;
import com.minelittlepony.unicopia.ability.magic.spell.effect.*; import com.minelittlepony.unicopia.ability.magic.spell.effect.*;
import com.minelittlepony.unicopia.entity.damage.UDamageTypes; import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.entity.player.Pony;
import com.minelittlepony.unicopia.item.FriendshipBraceletItem;
import com.minelittlepony.unicopia.particle.OrientedBillboardParticleEffect; import com.minelittlepony.unicopia.particle.OrientedBillboardParticleEffect;
import com.minelittlepony.unicopia.particle.ParticleSpawner; import com.minelittlepony.unicopia.particle.ParticleSpawner;
import com.minelittlepony.unicopia.particle.TargetBoundParticleEffect; import com.minelittlepony.unicopia.particle.TargetBoundParticleEffect;
@ -60,9 +59,7 @@ public class RainboomAbilitySpell extends AbstractSpell {
} }
} }
source.findAllEntitiesInRange(RADIUS) source.findAllEntitiesInRange(RADIUS, e -> !source.isOwnerOrFriend(e)).forEach(e -> {
.filter(e -> !FriendshipBraceletItem.isComrade(source, e))
.forEach(e -> {
e.damage(source.damageOf(UDamageTypes.RAINBOOM, source), 6); e.damage(source.damageOf(UDamageTypes.RAINBOOM, source), 6);
}); });
EFFECT_RANGE.translate(source.getOrigin()).getBlockPositions().forEach(pos -> { EFFECT_RANGE.translate(source.getOrigin()).getBlockPositions().forEach(pos -> {