Merge branch 'RIX' into 'master'

Fixed a few cards and added Peace Talks

See merge request core-developers/forge!64
This commit is contained in:
Michael Kamensky
2018-01-10 15:17:59 +00:00
14 changed files with 34 additions and 11 deletions

View File

@@ -260,6 +260,16 @@ public class EffectEffect extends SpellAbilityEffect {
else if (duration.equals("UntilEndOfCombat")) {
game.getEndOfCombat().addUntil(endEffect);
}
else if (duration.equals("ThisTurnAndNextTurn")) {
game.getUntap().addAt(new GameCommand() {
private static final long serialVersionUID = -5054153666503075717L;
@Override
public void run() {
game.getEndOfTurn().addUntil(endEffect);
}
});
}
}
if (imprintOnHost) {

View File

@@ -39,6 +39,7 @@ import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.replacement.ReplacementHandler;
import forge.game.replacement.ReplacementResult;
import forge.game.spellability.AbilityActivated;
import forge.game.spellability.SpellAbility;
import forge.game.staticability.StaticAbility;
import forge.game.trigger.Trigger;
@@ -1121,7 +1122,8 @@ public class Player extends GameEntity implements Comparable<Player> {
@Override
public final boolean canBeTargetedBy(final SpellAbility sa) {
if (hasKeyword("Shroud") || (!equals(sa.getActivatingPlayer()) && hasKeyword("Hexproof"))
|| hasProtectionFrom(sa.getHostCard())) {
|| hasProtectionFrom(sa.getHostCard())
|| (hasKeyword("You can't be the targets of spells or activated abilities") && (sa.isSpell() || (sa instanceof AbilityActivated)))) {
return false;
}
return true;

View File

@@ -57,7 +57,8 @@ public class StaticAbilityCantTarget {
}
}
if (params.containsKey("Spell") && !spellAbility.isSpell()) {
if (params.containsKey("ValidSA")
&& !spellAbility.isValid(params.get("ValidSA").split(","), hostCard.getController(), hostCard, spellAbility)) {
return false;
}