Add Shaman's Trance

This commit is contained in:
Lyu Zong-Hong
2021-04-16 08:22:37 +09:00
parent f3ee08ab9a
commit a1f69f0732
3 changed files with 44 additions and 1 deletions

View File

@@ -265,7 +265,10 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
public SpellAbility getAbilityToPlay(final Card hostCard, final List<SpellAbility> abilities,
final ITriggerEvent triggerEvent) {
// make sure another human player can't choose opponents cards just because he might see them
if (triggerEvent != null && !hostCard.isInZone(ZoneType.Battlefield) && !hostCard.getOwner().equals(player) && !hostCard.getController().equals(player) && hostCard.mayPlay(player).size() == 0) {
if (triggerEvent != null && !hostCard.isInZone(ZoneType.Battlefield) && !hostCard.getOwner().equals(player) &&
!hostCard.getController().equals(player) && hostCard.mayPlay(player).size() == 0 &&
// If player cast Shaman's Trance, they can play spells from any Graveyard (if other effects allow it to be cast)
(!player.hasKeyword("Shaman's Trance") || !hostCard.isInZone(ZoneType.Graveyard))) {
return null;
}
spellViewCache = SpellAbilityView.getMap(abilities);