mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Rampaging Cyclops - Fixed that its power was not reduced if blocked by 2 or more blockers.
This commit is contained in:
parent
8f45bb71f4
commit
ec90f35e0f
1 changed files with 4 additions and 17 deletions
|
@ -34,11 +34,11 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
@ -83,24 +83,11 @@ enum RampagingCyclopsCondition implements Condition {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId());
|
||||
if (permanent == null) {
|
||||
if (permanent == null || !permanent.isAttacking()) {
|
||||
return false;
|
||||
}
|
||||
for (CombatGroup group : game.getCombat().getBlockingGroups()) {
|
||||
if (group.getAttackers().contains(permanent.getId())) {
|
||||
int blockerCount = 0;
|
||||
for (UUID blockerId : group.getBlockers()) {
|
||||
Permanent blocker = game.getPermanent(blockerId);
|
||||
if (blocker != null) {
|
||||
blockerCount++;
|
||||
}
|
||||
if (blockerCount > 1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
CombatGroup combatGroup = game.getCombat().findGroup(permanent.getId());
|
||||
return combatGroup != null && combatGroup.getBlockers().size() > 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue