[DFT] Add Guidelight Matrix artifact

add static method from SaddleAbility to saddle a permanent
add common saddle effect
refactor Alacrian Armory with new saddle effect
This commit is contained in:
jmlundeen 2025-03-04 17:44:40 -06:00
parent 37fc173701
commit a472ff9f18
5 changed files with 130 additions and 16 deletions

View file

@ -48,6 +48,23 @@ public class SaddleAbility extends SimpleActivatedAbility {
this.value = ability.value;
}
public static boolean applySaddle(Permanent permanent, Game game) {
if (permanent == null) {
return false;
}
SaddleAbility saddleAbility = permanent.getAbilities().stream()
.filter(a -> a instanceof SaddleAbility)
.map(a -> (SaddleAbility) a)
.findFirst()
.orElse(null);
if (saddleAbility != null) {
SaddleEventEffect effect = new SaddleEventEffect();
effect.apply(game, saddleAbility);
return true;
}
return false;
}
@Override
public SaddleAbility copy() {
return new SaddleAbility(this);