mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Merge pull request #4879 from spjspj/master
Add planechase to new tournament window as well.
This commit is contained in:
commit
4b4d7989cd
5 changed files with 31 additions and 7 deletions
|
|
@ -98,6 +98,7 @@ public class TournamentOptions implements Serializable {
|
|||
|
||||
public void setPlaneChase(boolean planeChase) {
|
||||
this.planeChase = planeChase;
|
||||
this.matchOptions.setPlaneChase(planeChase);
|
||||
}
|
||||
|
||||
public int getNumberRounds() {
|
||||
|
|
|
|||
|
|
@ -2499,7 +2499,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public PlanarDieRoll rollPlanarDie(Game game, ArrayList<UUID> appliedEffects) {
|
||||
return rollPlanarDie(game, appliedEffects, 1, 1);
|
||||
return rollPlanarDie(game, appliedEffects, 2, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2514,15 +2514,15 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public PlanarDieRoll rollPlanarDie(Game game, ArrayList<UUID> appliedEffects, int numberChaosSides, int numberPlanarSides) {
|
||||
int result = RandomUtil.nextInt(6) + 1;
|
||||
int result = RandomUtil.nextInt(9) + 1;
|
||||
PlanarDieRoll roll = PlanarDieRoll.NIL_ROLL;
|
||||
if (numberChaosSides + numberPlanarSides > 6) {
|
||||
numberChaosSides = 1;
|
||||
numberPlanarSides = 1;
|
||||
if (numberChaosSides + numberPlanarSides > 9) {
|
||||
numberChaosSides = 2;
|
||||
numberPlanarSides = 2;
|
||||
}
|
||||
if (result <= numberChaosSides) {
|
||||
roll = PlanarDieRoll.CHAOS_ROLL;
|
||||
} else if (result > 6 - numberPlanarSides) {
|
||||
} else if (result > 9 - numberPlanarSides) {
|
||||
roll = PlanarDieRoll.PLANAR_ROLL;
|
||||
}
|
||||
if (!game.isSimulation()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue