mirror of
https://github.com/correl/mage.git
synced 2025-04-14 09:09:38 -09:00
- Fixed an issue with AffinityEffect and multiplayer games. See #5931
This commit is contained in:
parent
30e8fec8df
commit
57cb023f78
1 changed files with 2 additions and 2 deletions
|
@ -30,8 +30,8 @@ public class AffinityEffect extends CostModificationEffectImpl {
|
||||||
SpellAbility spellAbility = (SpellAbility)abilityToModify;
|
SpellAbility spellAbility = (SpellAbility)abilityToModify;
|
||||||
Mana mana = spellAbility.getManaCostsToPay().getMana();
|
Mana mana = spellAbility.getManaCostsToPay().getMana();
|
||||||
if (mana.getGeneric() > 0) {
|
if (mana.getGeneric() > 0) {
|
||||||
//int count = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); // this doesn't work with Sen Triplets
|
// the following works with Sen Triplets and in multiplayer games
|
||||||
int count = game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game).size(); // this works with Sen Triplets
|
int count = game.getBattlefield().getActivePermanents(filter, abilityToModify.getControllerId(), source.getId(), game).size();
|
||||||
int newCount = mana.getGeneric() - count;
|
int newCount = mana.getGeneric() - count;
|
||||||
if (newCount < 0) {
|
if (newCount < 0) {
|
||||||
newCount = 0;
|
newCount = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue