mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
* Ondu Rising - Fixed that the attacking creatures did not get lifelink.
This commit is contained in:
parent
84757f132c
commit
5a8ca36916
4 changed files with 83 additions and 6 deletions
|
|
@ -927,15 +927,15 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean declareAttacker(UUID attackerId, UUID defenderId, UUID playerId, Game game) {
|
||||
Permanent attacker = game.getPermanent(attackerId);
|
||||
public boolean declareAttacker(UUID creatureId, UUID defenderId, UUID playerId, Game game) {
|
||||
Permanent attacker = game.getPermanent(creatureId);
|
||||
if (!attacker.getAbilities().containsKey(VigilanceAbility.getInstance().getId())) {
|
||||
if (!attacker.isTapped()) {
|
||||
attacker.tap(game);
|
||||
}
|
||||
}
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, attackerId, playerId))) {
|
||||
return addAttackerToCombat(attackerId, defenderId, game);
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, creatureId, playerId))) {
|
||||
return addAttackerToCombat(creatureId, defenderId, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,12 @@ public class GameEvent implements Serializable {
|
|||
COUNTER,
|
||||
COUNTERED,
|
||||
DECLARING_ATTACKERS, DECLARED_ATTACKERS,
|
||||
/* DECLARE_ATTACKER
|
||||
REPLACE EVENT - can be used to replace attack declaration
|
||||
targetId id of the defending player or planeswalker attacked
|
||||
sourceId id of the attacking creature
|
||||
playerId player defining the attacking creatures
|
||||
*/
|
||||
DECLARE_ATTACKER,
|
||||
/* ATTACKER_DECLARED
|
||||
targetId id of the defending player or planeswalker attacked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue