This commit is contained in:
Sollace 2022-09-01 22:57:19 +02:00
parent 53c0f1aff8
commit 46e4d14bb0
2 changed files with 11 additions and 2 deletions

View file

@ -86,6 +86,11 @@ public class CastSpellEntity extends LightEmittingEntity implements Caster<Livin
return Caster.of(getMaster()).map(Caster::getLevel).orElse(LEVELS);
}
@Override
public LevelStore getCorruption() {
return Caster.of(getMaster()).map(Caster::getCorruption).orElse(LEVELS);
}
@Override
public Affinity getAffinity() {
return getSpellSlot().get(true).map(Spell::getAffinity).orElse(Affinity.NEUTRAL);

View file

@ -9,8 +9,7 @@ import org.jetbrains.annotations.Nullable;
import com.minelittlepony.unicopia.Affinity;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.WeaklyOwned;
import com.minelittlepony.unicopia.ability.magic.Affine;
import com.minelittlepony.unicopia.ability.magic.Levelled;
import com.minelittlepony.unicopia.ability.magic.*;
import com.minelittlepony.unicopia.ability.magic.spell.Spell;
import com.minelittlepony.unicopia.ability.magic.spell.effect.TargetSelecter;
import com.minelittlepony.unicopia.entity.ai.BreakHeartGoal;
@ -209,6 +208,11 @@ public class Creature extends Living<LivingEntity> implements WeaklyOwned<Living
return LEVELS;
}
@Override
public LevelStore getCorruption() {
return LEVELS;
}
@Override
public boolean subtractEnergyCost(double amount) {
getMaster().damage(DamageSource.MAGIC, (int)amount/2);