Merge pull request #3338 from tool4ever/supfealty

Support for Fealty to the Realm
This commit is contained in:
Anthony Calosa
2023-06-26 07:32:27 +08:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ public class AddTurnEffect extends SpellAbilityEffect {
sb.append(Lang.joinHomogenous(getTargetPlayers(sa)));
sb.append("takes ");
sb.append(" takes ");
sb.append(numTurns > 1 ? numTurns : "an");
sb.append(" extra turn");

View File

@@ -58,6 +58,7 @@ import forge.game.cost.Cost;
import forge.game.keyword.Keyword;
import forge.game.keyword.KeywordInterface;
import forge.game.player.Player;
import forge.game.player.PlayerCollection;
import forge.game.replacement.ReplacementEffect;
import forge.game.spellability.AbilityStatic;
import forge.game.spellability.SpellAbility;
@@ -606,7 +607,10 @@ public final class StaticAbilityContinuous {
// Gain control
if (layer == StaticAbilityLayer.CONTROL && params.containsKey("GainControl")) {
affectedCard.addTempController(hostCard.getController(), hostCard.getTimestamp());
final PlayerCollection gain = AbilityUtils.getDefinedPlayers(hostCard, params.get("GainControl"), stAb);
if (!gain.isEmpty()) {
affectedCard.addTempController(gain.get(0), hostCard.getTimestamp());
}
}
// Gain text from another card