mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Vanguard: Added Ink-Eyes, Servant of Oni Avatar and Maralen of the Mornsong Avatar
This commit is contained in:
71
src/main/java/forge/card/trigger/TriggerNewGame.java
Normal file
71
src/main/java/forge/card/trigger/TriggerNewGame.java
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Forge: Play Magic: the Gathering.
|
||||
* Copyright (C) 2011 Forge Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package forge.card.trigger;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Trigger_NewGame class.
|
||||
* </p>
|
||||
*
|
||||
* @author Forge
|
||||
* @version $Id: TriggerPhase.java 17802 2012-10-31 08:05:14Z Max mtg $
|
||||
*/
|
||||
public class TriggerNewGame extends Trigger {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Constructor for Trigger_NewGame.
|
||||
* </p>
|
||||
*
|
||||
* @param params
|
||||
* a {@link java.util.HashMap} object.
|
||||
* @param host
|
||||
* a {@link forge.Card} object.
|
||||
* @param intrinsic
|
||||
* the intrinsic
|
||||
*/
|
||||
public TriggerNewGame(final java.util.Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||
super(params, host, intrinsic);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final Trigger getCopy() {
|
||||
final Trigger copy = new TriggerNewGame(this.getMapParams(), this.getHostCard(), this.isIntrinsic());
|
||||
if (this.getOverridingAbility() != null) {
|
||||
copy.setOverridingAbility(this.getOverridingAbility());
|
||||
}
|
||||
|
||||
copyFieldsTo(copy);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final void setTriggeringObjects(final SpellAbility sa) {
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,8 @@ public enum TriggerType {
|
||||
PlanarDice(TriggerPlanarDice.class),
|
||||
PlaneswalkedTo(TriggerPlaneswalkedTo.class),
|
||||
PlaneswalkedFrom(TriggerPlaneswalkedFrom.class),
|
||||
SetInMotion(TriggerSetInMotion.class);
|
||||
SetInMotion(TriggerSetInMotion.class),
|
||||
NewGame(TriggerNewGame.class);
|
||||
|
||||
private final Class<? extends Trigger> classTrigger;
|
||||
private TriggerType(Class<? extends Trigger> clasz) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Map.Entry;
|
||||
import forge.Constant.Preferences;
|
||||
import forge.FThreads;
|
||||
import forge.Singletons;
|
||||
import forge.card.trigger.TriggerType;
|
||||
import forge.control.FControl;
|
||||
import forge.control.input.InputControl;
|
||||
import forge.deck.Deck;
|
||||
@@ -346,6 +347,9 @@ public class MatchController {
|
||||
public void afterMulligans()
|
||||
{
|
||||
currentGame.getAction().handleLeylinesAndChancellors();
|
||||
// Run Trigger beginning of the game
|
||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
currentGame.getTriggerHandler().runTrigger(TriggerType.NewGame, runParams, false);
|
||||
currentGame.setAge(GameAge.Play);
|
||||
getInput().clearInput();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user