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:
Evan Kranzler 2021-08-26 06:06:10 -04:00 committed by GitHub
parent 12219cff01
commit f8d030bef4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
97 changed files with 2641 additions and 553 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common;
import mage.MageObject;
@ -12,7 +11,6 @@ import mage.game.Game;
import mage.players.Player;
/**
*
* @author spjspj
*/
public class RollDiceEffect extends OneShotEffect {
@ -47,7 +45,7 @@ public class RollDiceEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
MageObject mageObject = game.getObject(source.getSourceId());
if (controller != null && mageObject != null) {
controller.rollDice(source, game, numSides);
controller.rollDice(outcome, source, game, numSides);
return true;
}
return false;
@ -58,8 +56,7 @@ public class RollDiceEffect extends OneShotEffect {
if (!staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("Roll a " + numSides + " sided dice");
return sb.toString();
return "Roll a " + numSides + " sided die";
}
@Override