mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
Fix Slayer's cleaver implementation to check if attached permanent can be blocked instead of the equipment (#10327)
Co-authored-by: Ethan Ward <ethanandrewward@gmail.com>
This commit is contained in:
parent
c45a546526
commit
09892bf1f2
1 changed files with 7 additions and 1 deletions
|
@ -60,7 +60,13 @@ class SlayersCleaverEffect extends RequirementEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
return permanent.canBlock(source.getSourceId(), game) && permanent.hasSubtype(SubType.ELDRAZI, game);
|
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||||
|
if (equipment == null || equipment.getAttachedTo() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent attachedCreature = game.getPermanent(equipment.getAttachedTo());
|
||||||
|
return attachedCreature != null && attachedCreature.isAttacking()
|
||||||
|
&& permanent.canBlock(equipment.getAttachedTo(), game) && permanent.hasSubtype(SubType.ELDRAZI, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue