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
|
|
@ -255,8 +255,10 @@ public class ChoiceImpl implements Choice {
|
|||
for (String needChoice : answers) {
|
||||
for (Map.Entry<String, String> currentChoice : this.getKeyChoices().entrySet()) {
|
||||
if (currentChoice.getKey().equals(needChoice)) {
|
||||
this.setChoiceByKey(needChoice, false);
|
||||
answers.remove(needChoice);
|
||||
if (removeSelectAnswerFromList) {
|
||||
this.setChoiceByKey(needChoice, false);
|
||||
answers.remove(needChoice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -266,8 +268,10 @@ public class ChoiceImpl implements Choice {
|
|||
for (String needChoice : answers) {
|
||||
for (Map.Entry<String, String> currentChoice : this.getKeyChoices().entrySet()) {
|
||||
if (currentChoice.getValue().startsWith(needChoice)) {
|
||||
this.setChoiceByKey(currentChoice.getKey(), false);
|
||||
answers.remove(needChoice);
|
||||
if (removeSelectAnswerFromList) {
|
||||
this.setChoiceByKey(currentChoice.getKey(), false);
|
||||
answers.remove(needChoice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -277,8 +281,10 @@ public class ChoiceImpl implements Choice {
|
|||
for (String needChoice : answers) {
|
||||
for (String currentChoice : this.getChoices()) {
|
||||
if (currentChoice.equals(needChoice)) {
|
||||
this.setChoice(needChoice, false);
|
||||
answers.remove(needChoice);
|
||||
if (removeSelectAnswerFromList) {
|
||||
this.setChoice(needChoice, false);
|
||||
answers.remove(needChoice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue