Merge remote-tracking branch 'upstream/master'

This commit is contained in:
CCTV-1
2020-01-03 13:32:15 +08:00
23 changed files with 193 additions and 186 deletions

View File

@@ -88,7 +88,7 @@ public class HumanPlay {
sa = AbilityUtils.addSpliceEffects(sa);
if (sa.hasParam("Bestow")) {
if (sa.isBestow()) {
source.animateBestow();
}

View File

@@ -159,7 +159,7 @@ public class HumanPlaySpellAbility {
if (!prerequisitesMet) {
if (!ability.isTrigger()) {
rollbackAbility(fromZone, fromState, zonePosition, payment);
rollbackAbility(fromZone, zonePosition, payment);
if (ability.getHostCard().isMadness()) {
// if a player failed to play madness cost, move the card to graveyard
Card newCard = game.getAction().moveToGraveyard(c, null);
@@ -244,14 +244,13 @@ public class HumanPlaySpellAbility {
}
}
private void rollbackAbility(final Zone fromZone, final CardStateName fromState, final int zonePosition, CostPayment payment) {
private void rollbackAbility(final Zone fromZone, final int zonePosition, CostPayment payment) {
// cancel ability during target choosing
final Game game = ability.getActivatingPlayer().getGame();
if (fromZone != null) { // and not a copy
// add back to where it came from
game.getAction().moveTo(fromZone, ability.getHostCard(), zonePosition >= 0 ? Integer.valueOf(zonePosition) : null, null);
ability.getHostCard().setState(fromState, true);
}
clearTargets(ability);

View File

@@ -1496,7 +1496,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
game.getTracker().freeze(); // refreeze if the tracker was frozen prior to this update
}
final List<SpellAbilityView> choices = new ArrayList<>(spellViewCache.keySet());
final String modeTitle = localizer.getMessage("PlayerActivatedCardChooseMode", sa.getActivatingPlayer().toString(), CardTranslation.getTranslatedName(sa.getHostCard().getName()));
final String modeTitle = localizer.getMessage("lblPlayerActivatedCardChooseMode", sa.getActivatingPlayer().toString(), sa.getHostCard().toString());
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
for (int i = 0; i < num; i++) {
SpellAbilityView a;