- Vanguard: Added Ink-Eyes, Servant of Oni Avatar and Maralen of the Mornsong Avatar

This commit is contained in:
swordshine
2013-04-17 04:48:36 +00:00
parent a77dd8c547
commit db2327557f
6 changed files with 107 additions and 1 deletions

View 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) {
}
}

View File

@@ -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) {

View File

@@ -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();
}