mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed Champion of Lambholt - gave ability only to itself. +1 test passed.
This commit is contained in:
parent
7445876ec5
commit
153a5df2a5
2 changed files with 9 additions and 5 deletions
|
@ -89,7 +89,7 @@ class ChampionOfLambholtEffect extends RestrictionEffect<ChampionOfLambholtEffec
|
|||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null && permanent.equals(sourcePermanent)) {
|
||||
if (sourcePermanent != null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -98,7 +98,11 @@ class ChampionOfLambholtEffect extends RestrictionEffect<ChampionOfLambholtEffec
|
|||
@Override
|
||||
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||
if (attacker != null && blocker != null) {
|
||||
return blocker.getPower().getValue() > attacker.getPower().getValue();
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
return attacker.getControllerId().equals(sourcePermanent.getControllerId())
|
||||
&& blocker.getPower().getValue() > attacker.getPower().getValue();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -187,13 +187,13 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase {
|
|||
|
||||
// non flying vs. flying
|
||||
attack(2, playerB, "Elite Vanguard");
|
||||
block(2, playerA, "Angelic Wall", "Elite Vanguard");
|
||||
block(2, playerA, "Angelic Wall", "Elite Vanguard"); // can't block
|
||||
// non flying vs. non flying
|
||||
attack(2, playerB, "Arbor Elf");
|
||||
block(2, playerA, "Llanowar Elves", "Arbor Elf");
|
||||
block(2, playerA, "Llanowar Elves", "Arbor Elf"); // can block
|
||||
// flying vs. flying
|
||||
attack(2, playerB, "Assault Griffin");
|
||||
block(2, playerA, "Air Elemental", "Assault Griffin");
|
||||
block(2, playerA, "Air Elemental", "Assault Griffin"); // can block
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
|
Loading…
Reference in a new issue