mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
* Fixed some problems with blocking requirements (fixes #355).
This commit is contained in:
parent
2dd26a9075
commit
db1521d30c
8 changed files with 24 additions and 12 deletions
|
|
@ -91,7 +91,7 @@ class RevengeOfTheHuntedEffect extends RequirementEffect<RevengeOfTheHuntedEffec
|
|||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
return true;
|
||||
return permanent.canBlock(source.getFirstTarget(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -92,10 +92,9 @@ class FeralContestEffect extends RequirementEffect<FeralContestEffect> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (creature != null) {
|
||||
return true;
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
if (permanent.getId().equals(source.getTargets().get(1).getFirstTarget())) {
|
||||
return permanent.canBlock(source.getFirstTarget(), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,10 @@ class GrapplingHookEffect extends RequirementEffect<GrapplingHookEffect> {
|
|||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
if (permanent.getId().equals(source.getFirstTarget())) {
|
||||
return true;
|
||||
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
return permanent.canBlock(equipment.getAttachedTo(), game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue