mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
* Oath of Kaya - fixed that it doesn't triggers on attacks;
This commit is contained in:
parent
9ad7c4c83d
commit
e51b054249
3 changed files with 126 additions and 52 deletions
|
|
@ -1539,6 +1539,18 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean isPlaneswalkerAttacked(UUID defenderId, Game game) {
|
||||
for (CombatGroup group : groups) {
|
||||
if (group.defenderIsPlaneswalker) {
|
||||
Permanent permanent = game.getPermanent(group.getDefenderId());
|
||||
if (permanent.isControlledBy(defenderId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param attackerId
|
||||
* @return uuid of defending player or planeswalker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue