mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
* Odric Master Tactician - Fixed that the game didn't leave the block phase controlled by the controller of Odric.
This commit is contained in:
parent
1a81c42441
commit
0d37d1593b
14 changed files with 39 additions and 25 deletions
|
|
@ -246,6 +246,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
|
||||
public void selectBlockers(Game game) {
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARING_BLOCKERS, attackerId, attackerId))) {
|
||||
|
||||
// !! Attention: Changes to this block must be also done in card "OdricMaster Tactician".
|
||||
Player player = game.getPlayer(attackerId);
|
||||
//20101001 - 509.1c
|
||||
checkBlockRequirementsBefore(player, game);
|
||||
|
|
@ -314,7 +316,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
UUID attackId = effect.mustBlockAttacker(ability, game);
|
||||
Player defender = game.getPlayer(creature.getControllerId());
|
||||
if (attackId != null && defender != null) {
|
||||
defender.declareBlocker(creature.getId(), attackId, game);
|
||||
defender.declareBlocker(defender.getId(), creature.getId(), attackId, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -345,7 +347,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
if (defender != null) {
|
||||
for (UUID attackingCreatureId : getAttackers()) {
|
||||
if (creature.canBlock(attackingCreatureId, game)) {
|
||||
defender.declareBlocker(creature.getId(), attackingCreatureId, game);
|
||||
defender.declareBlocker(defender.getId(), creature.getId(), attackingCreatureId, game);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
void pickCard(List<Card> cards, Deck deck, Draft draft);
|
||||
|
||||
void declareAttacker(UUID attackerId, UUID defenderId, Game game);
|
||||
void declareBlocker(UUID blockerId, UUID attackerId, Game game);
|
||||
void declareBlocker(UUID defenderId, UUID blockerId, UUID attackerId, Game game);
|
||||
List<Permanent> getAvailableAttackers(Game game);
|
||||
List<Permanent> getAvailableBlockers(Game game);
|
||||
|
||||
|
|
|
|||
|
|
@ -1390,10 +1390,10 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
}
|
||||
|
||||
@Override
|
||||
public void declareBlocker(UUID blockerId, UUID attackerId, Game game) {
|
||||
public void declareBlocker(UUID defenderId, UUID blockerId, UUID attackerId, Game game) {
|
||||
Permanent blocker = game.getPermanent(blockerId);
|
||||
CombatGroup group = game.getCombat().findGroup(attackerId);
|
||||
if (blocker != null && group != null && group.canBlock(blocker, game) && blocker.getControllerId().equals(playerId)) {
|
||||
if (blocker != null && group != null && group.canBlock(blocker, game) && blocker.getControllerId().equals(defenderId)) {
|
||||
group.addBlocker(blockerId, playerId, game);
|
||||
game.getCombat().addBlockingGroup(blockerId, attackerId, playerId, game);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue