forked from External/mage
Adding dice rolling trigger/replacement (ready for review) (#7989)
* [AFR] Implemented DiceRolledTriggeredAbility * [AFR] Implemented Brazen Dwarf * [AFR] Implemented Feywild Trickster * [AFC] Implemented Reckless Endeavor * [AFR] Implemented Pixie Guide * [AFR] Implemented Critical Hit * [AFR] Implemented Netherese Puzzle Ward * [AFC] Implemented Neverwinter Hydra * [AFR] Implemented Farideh, Devil's Chosen * [AFR] Implemented Barbarian Class * [AFC] Implemented Vrondiss, Rage of Ancients * [AFC] Implemented Arcane Endeavor * Test framework: added planar die rolls support * Test framework: added random results set up support in AI simulated games; * AI: improved roll die results chooses in computer games; * Roll die: improved combo support for planar die and roll die effects; Co-authored-by: Daniel Bomar <dbdaniel42@gmail.com> Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
parent
12219cff01
commit
f8d030bef4
97 changed files with 2641 additions and 553 deletions
|
|
@ -7,7 +7,7 @@ import mage.abilities.effects.ContinuousEffect;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PlanarDieRoll;
|
||||
import mage.constants.PlanarDieRollResult;
|
||||
import mage.constants.Planes;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.CommandObject;
|
||||
|
|
@ -61,8 +61,8 @@ public class RollPlanarDieEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && mageObject != null) {
|
||||
PlanarDieRoll planarRoll = controller.rollPlanarDie(source, game);
|
||||
if (planarRoll == PlanarDieRoll.CHAOS_ROLL && chaosEffects != null && chaosTargets != null) {
|
||||
PlanarDieRollResult planarRoll = controller.rollPlanarDie(outcome, source, game);
|
||||
if (planarRoll == PlanarDieRollResult.CHAOS_ROLL && chaosEffects != null && chaosTargets != null) {
|
||||
for (int i = 0; i < chaosTargets.size(); i++) {
|
||||
Target target = chaosTargets.get(i);
|
||||
if (target != null) {
|
||||
|
|
@ -95,7 +95,7 @@ public class RollPlanarDieEffect extends OneShotEffect {
|
|||
done = true;
|
||||
}
|
||||
}
|
||||
} else if (planarRoll == PlanarDieRoll.PLANAR_ROLL) {
|
||||
} else if (planarRoll == PlanarDieRollResult.PLANAR_ROLL) {
|
||||
// Steps: 1) Remove the last plane and set its effects to discarded
|
||||
for (CommandObject cobject : game.getState().getCommand()) {
|
||||
if (cobject instanceof Plane) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue