mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
Fixed handling of controlling player for asThough cast abilities (hope this will fix #363).
This commit is contained in:
parent
107848bc36
commit
e8ee9b70f0
1 changed files with 7 additions and 4 deletions
|
@ -920,9 +920,11 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
}
|
||||
if (zone != Zone.HAND) {
|
||||
if (zone != Zone.BATTLEFIELD && game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.CAST, game)) {
|
||||
for (ActivatedAbility ability: object.getAbilities().getActivatedAbilities(Zone.HAND)) {
|
||||
for (Ability ability: object.getAbilities()) {
|
||||
ability.setControllerId(this.getId());
|
||||
useable.put(ability.getId(), ability);
|
||||
if (ability instanceof ActivatedAbility && ability.getZone().match(Zone.HAND)) {
|
||||
useable.put(ability.getId(), (ActivatedAbility) ability);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1755,8 +1757,9 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
for (ExileZone exile: game.getExile().getExileZones()) {
|
||||
for (Card card: exile.getCards(game)) {
|
||||
if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.CAST, game)) {
|
||||
for (ActivatedAbility ability: card.getAbilities().getActivatedAbilities(Zone.HAND)) {
|
||||
if (ability instanceof SpellAbility || ability instanceof PlayLandAbility) {
|
||||
for (Ability ability: card.getAbilities()) {
|
||||
ability.setControllerId(this.getId()); // controller must be set for case owner != caster
|
||||
if (ability.getZone().match(Zone.HAND) && (ability instanceof SpellAbility || ability instanceof PlayLandAbility)) {
|
||||
playable.add(ability);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue