mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge branch 'choosenum' into 'master'
fix ChooseNumberEffect range for random See merge request core-developers/forge!5253
This commit is contained in:
@@ -54,7 +54,8 @@ public class ChooseNumberEffect extends SpellAbilityEffect {
|
|||||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||||
int chosen;
|
int chosen;
|
||||||
if (random) {
|
if (random) {
|
||||||
chosen = MyRandom.getRandom().nextInt(max - min) + min;
|
chosen = MyRandom.getRandom().nextInt((max - min) + 1) + min;
|
||||||
|
//TODO more useful notify for RepeatEach -> ChooseNumber with random
|
||||||
p.getGame().getAction().notifyOfValue(sa, p, Integer.toString(chosen), null);
|
p.getGame().getAction().notifyOfValue(sa, p, Integer.toString(chosen), null);
|
||||||
} else {
|
} else {
|
||||||
String title = sa.hasParam("ListTitle") ? sa.getParam("ListTitle") : Localizer.getInstance().getMessage("lblChooseNumber");
|
String title = sa.hasParam("ListTitle") ? sa.getParam("ListTitle") : Localizer.getInstance().getMessage("lblChooseNumber");
|
||||||
|
|||||||
Reference in New Issue
Block a user