-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
forge-game/src/main/java/forge/game/replacement/ReplaceCascade.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package forge.game.replacement; | ||
|
||
import java.util.Map; | ||
|
||
import forge.game.ability.AbilityKey; | ||
import forge.game.card.Card; | ||
import forge.game.spellability.SpellAbility; | ||
|
||
public class ReplaceCascade extends ReplacementEffect { | ||
|
||
public ReplaceCascade(Map<String, String> map, Card host, boolean intrinsic) { | ||
super(map, host, intrinsic); | ||
} | ||
|
||
@Override | ||
public boolean canReplace(Map<AbilityKey, Object> runParams) { | ||
if (!matchesValidParam("ValidPlayer", runParams.get(AbilityKey.Affected))) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
@Override | ||
public void setReplacingObjects(Map<AbilityKey, Object> runParams, SpellAbility sa) { | ||
sa.setReplacingObject(AbilityKey.Player, runParams.get(AbilityKey.Affected)); | ||
sa.setReplacingObjectsFrom(runParams, AbilityKey.Cards); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters