When there is a godswar in Pantheon more than 3 dice are rolled. When there is a triple in this set, the goddess of magic will grant multiple relics.
For example from my current game where my rolls had been 6,3,3,3,2:
Player 1 invades Rus from Varangia
Godswar!
Player 1 completes a Labor for the Goddess of Magic (roll at least 3 of the same number)
Player 1 completes a Labor for the Goddess of Magic (roll at least 3 of the same number)
Player 1 completes a Labor for the Goddess of Magic (roll at least 3 of the same number)
Result: 56 vs. 10
God of War is defeated
Player 1 completes a Labor for the God of the Sky (defeat an enemy god on your turn)
Player 1, by the Goddess of Magic, invokes The Book of the Dead
Player 1, by the Goddess of Magic, invokes The Tablets of Destiny
Player 1, by the Goddess of Magic, invokes The Tree of Life
I went and took a look at the code last night. As best I can tell what happens is that there was a triple rolled during the Godswar and a 1 was also rolled. Since the reroll of 1s happens after the Godswar happens, another artifact is given each time a reroll is processed.
The changes listed below should fix the problem by making afterRoll non-reentrant. I think the spirit of the rules is that a triple should be evaluated after rerolling any 1s.
What can be done to fix it is to change the rerollOnes method to:
public void rerollOnes(List dice) throws EndGameException {
for( Die die : dice ) {
while( die.getValue() == 1 ) {
die.roll(board.getRandom());
}
}
Collections.sort(dice);
Collections.reverse(dice);
}
and change afterRoll to:
public void afterRoll(Force attackForce, Force defenseForce)
throws EndGameException {
if( board.getAttackingTerritory().getForce().getSpecialUnits().contains(MAGIC)
|| hasCardInPlay(board.getAttackingTerritory().getOwner(), GungnirSpearOfOdin.class) ) {
if( hasOne(board.getAttackerDice()) ) {
rerollOnes(board.getAttackerDice());
}
}
if( board.getDefendingTerritory().getForce().getSpecialUnits().contains(MAGIC)
|| board.getDefendingTerritory().getForce().getSpecialUnits().contains(TEMPLE)
|| hasCardInPlay(board.getDefendingTerritory().getOwner(), GungnirSpearOfOdin.class) ) {
if( hasOne(board.getDefenderDice()) ) {
rerollOnes(board.getDefenderDice());
}
}
if( hasTriple(board.getAttackerDice()) ) {
laborCompleted(MAGIC, board.getAttackingTerritory().getOwner(),
"roll at least 3 of the same number");
}
if( hasTriple(board.getDefenderDice()) ) {
laborCompleted(MAGIC, board.getDefendingTerritory().getOwner(),
"roll at least 3 of the same number");
}
}
Nice job figuring that out.
"I think the spirit of the rules is that a triple should be evaluated after rerolling any 1s."
--- Actually when I researched this on the internet (the official FAQ and forum for Godstorm), it is supposed to be allowed that you could...
* Roll 1 1 1 for a battle
* Draw a relic that makes you reroll ones
* Then you immediately reroll ones.
(and you could potentially roll another triple)
I agree that it seems weird that you could get "double credit" for a triple just by rerolling a different die. For example:
* Roll 2 2 2 1 for a battle
* Draw a relic that makes you reroll ones
* Reroll the 1 and your dice still have a triple (= another relic?!)
The problem is if we "fixed" the second scenario, it also eliminates the first one. As you noted, it's a matter of how the rules are to be interpreted.
Perhaps a combination is possible:
When you roll the dice, if there are any sets of 3+ dice with the same number, get a relic. Then remove them from consideration after any rerolls unless they are rerolled.
--- though this is probably more complicated than it's worth. For the purpose of Invade Earth, your solution is probably the simplest and best.
Unfortunately, I can't update Invade Earth at the moment anyway, because my personal computer is not connected to the internet. If you want to be added to the Sourceforge development list so you can make changes to I.E., let me know.
Re: Goddess of Magic can give wrong number of relics
Thanks for the bug report. I'll look into it.
In theory it is possible to get multiple relics if you roll 1's and have to reroll some dice, I think. But it does seem unlikely that you would get 3 in a row on the same roll.