-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added new game type: Freeform Commander Two Player Duel (#5771)
- Loading branch information
Showing
9 changed files
with
159 additions
and
3 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
50 changes: 50 additions & 0 deletions
50
Mage.Server.Plugins/Mage.Game.FreeformCommanderDuel/pom.xml
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,50 @@ | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.mage</groupId> | ||
<artifactId>mage-server-plugins</artifactId> | ||
<version>1.4.35</version> | ||
</parent> | ||
|
||
<artifactId>mage-game-freeformcommanderduel</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Mage Game Freeform Commander Two Player</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>mage</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>src</sourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
<finalName>mage-game-freeformcommanderduel</finalName> | ||
</build> | ||
|
||
<properties/> | ||
|
||
</project> |
36 changes: 36 additions & 0 deletions
36
Mage.Server.Plugins/Mage.Game.FreeformCommanderDuel/src/mage/game/FreeformCommanderDuel.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,36 @@ | ||
package mage.game; | ||
|
||
import mage.constants.MultiplayerAttackOption; | ||
import mage.constants.RangeOfInfluence; | ||
import mage.game.match.MatchType; | ||
import mage.game.mulligan.Mulligan; | ||
|
||
/** | ||
* @author JayDi85 | ||
*/ | ||
public class FreeformCommanderDuel extends GameCommanderImpl { | ||
|
||
public FreeformCommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) { | ||
super(attackOption, range, mulligan, startLife); | ||
} | ||
|
||
public FreeformCommanderDuel(final FreeformCommanderDuel game) { | ||
super(game); | ||
} | ||
|
||
@Override | ||
public MatchType getGameType() { | ||
return new FreeformCommanderDuelType(); | ||
} | ||
|
||
@Override | ||
public int getNumPlayers() { | ||
return 2; | ||
} | ||
|
||
@Override | ||
public FreeformCommanderDuel copy() { | ||
return new FreeformCommanderDuel(this); | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
...ver.Plugins/Mage.Game.FreeformCommanderDuel/src/mage/game/FreeformCommanderDuelMatch.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,31 @@ | ||
package mage.game; | ||
|
||
import mage.game.match.MatchImpl; | ||
import mage.game.match.MatchOptions; | ||
import mage.game.mulligan.Mulligan; | ||
|
||
/** | ||
* @author JayDi85 | ||
*/ | ||
public class FreeformCommanderDuelMatch extends MatchImpl { | ||
|
||
public FreeformCommanderDuelMatch(MatchOptions options) { | ||
super(options); | ||
} | ||
|
||
@Override | ||
public void startGame() throws GameException { | ||
int startLife = 20; | ||
boolean alsoHand = true; | ||
boolean checkCommanderDamage = true; | ||
|
||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans()); | ||
FreeformCommanderDuel game = new FreeformCommanderDuel(options.getAttackOption(), options.getRange(), mulligan, startLife); | ||
game.setCheckCommanderDamage(checkCommanderDamage); | ||
game.setStartMessage(this.createGameStartMessage()); | ||
game.setAlsoHand(alsoHand); | ||
game.setAlsoLibrary(true); | ||
initGame(game); | ||
games.add(game); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...rver.Plugins/Mage.Game.FreeformCommanderDuel/src/mage/game/FreeformCommanderDuelType.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,29 @@ | ||
package mage.game; | ||
|
||
import mage.game.match.MatchType; | ||
|
||
/** | ||
* @author JayDi85 | ||
*/ | ||
public class FreeformCommanderDuelType extends MatchType { | ||
|
||
public FreeformCommanderDuelType() { | ||
this.name = "Freeform Commander Two Player Duel"; | ||
this.maxPlayers = 2; | ||
this.minPlayers = 2; | ||
this.numTeams = 0; | ||
this.useAttackOption = false; | ||
this.useRange = false; | ||
this.sideboardingAllowed = false; | ||
} | ||
|
||
protected FreeformCommanderDuelType(final FreeformCommanderDuelType matchType) { | ||
super(matchType); | ||
} | ||
|
||
@Override | ||
public FreeformCommanderDuelType copy() { | ||
return new FreeformCommanderDuelType(this); | ||
} | ||
|
||
} |
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
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