mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 01:38:13 +00:00
Merge pull request #2477 from kevlahnota/newmaster2
fix ClashEffect message and update NotifyValue message
This commit is contained in:
@@ -55,6 +55,7 @@ public class ChoosePlayerEffect extends SpellAbilityEffect {
|
||||
if (sa.hasParam("RememberChosen")) {
|
||||
card.addRemembered(chosen);
|
||||
}
|
||||
p.getGame().getAction().notifyOfValue(sa, p, Localizer.getInstance().getMessage("lblPlayerPickedChosen", sa.getActivatingPlayer(), chosen), null);
|
||||
|
||||
// SubAbility that only fires if a player is chosen
|
||||
SpellAbility chosenSA = sa.getAdditionalAbility("ChooseSubAbility");
|
||||
|
||||
@@ -8,6 +8,7 @@ import forge.game.ability.AbilityKey;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollection;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.trigger.TriggerType;
|
||||
@@ -87,6 +88,7 @@ public class ClashEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
final StringBuilder reveal = new StringBuilder();
|
||||
reveal.append("OVERRIDE "); //will return substring with the original message parsed here..
|
||||
Card pCard = null;
|
||||
Card oCard = null;
|
||||
|
||||
@@ -104,7 +106,7 @@ public class ClashEffect extends SpellAbilityEffect {
|
||||
pCMC = pCard.getCMC();
|
||||
|
||||
reveal.append(player).append(" " + Localizer.getInstance().getMessage("lblReveals") + ": ").append(pCard.getName()).append(". " + Localizer.getInstance().getMessage("lblCMC") + "= ").append(pCMC);
|
||||
reveal.append("\r\n");
|
||||
reveal.append("\n");
|
||||
clashMoveToTopOrBottom(player, pCard, sa);
|
||||
}
|
||||
else {
|
||||
@@ -114,21 +116,27 @@ public class ClashEffect extends SpellAbilityEffect {
|
||||
oCMC = oCard.getCMC();
|
||||
|
||||
reveal.append(opponent).append(" " + Localizer.getInstance().getMessage("lblReveals") + ": ").append(oCard.getName()).append(". " + Localizer.getInstance().getMessage("lblCMC") + "= ").append(oCMC);
|
||||
reveal.append("\r\n\r\n");
|
||||
reveal.append("\n");
|
||||
clashMoveToTopOrBottom(opponent, oCard, sa);
|
||||
}
|
||||
else {
|
||||
oCMC = -1;
|
||||
}
|
||||
final CardCollection toReveal = new CardCollection();
|
||||
if (pCard != null)
|
||||
toReveal.add(pCard);
|
||||
if (oCard != null)
|
||||
toReveal.add(oCard);
|
||||
|
||||
// no winner
|
||||
// no winner, still show the revealed cards rather than do nothing
|
||||
if (pCMC == oCMC) {
|
||||
reveal.append(Localizer.getInstance().getMessage("lblNoWinner"));
|
||||
player.getGame().getAction().revealTo(toReveal, player.getGame().getPlayers(), reveal.toString());
|
||||
return null;
|
||||
}
|
||||
|
||||
reveal.append(player).append(pCMC > oCMC ? " " + Localizer.getInstance().getMessage("lblWinsClash") + "." : " " + Localizer.getInstance().getMessage("lblLosesClash") + ".");
|
||||
player.getGame().getAction().notifyOfValue(sa, source, reveal.toString(), null);
|
||||
|
||||
reveal.append(pCMC > oCMC ? player + " " + Localizer.getInstance().getMessage("lblWinsClash") + "." : opponent + " " + Localizer.getInstance().getMessage("lblWinsClash") + ".");
|
||||
player.getGame().getAction().revealTo(toReveal, player.getGame().getPlayers(), reveal.toString());
|
||||
return pCMC > oCMC ? player : opponent;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,9 @@ public class MessageUtil {
|
||||
}
|
||||
String choser = StringUtils.capitalize(mayBeYou(player, target));
|
||||
switch(sa.getApi()) {
|
||||
case ChoosePlayer:
|
||||
case ChooseDirection:
|
||||
case Clash:
|
||||
case DigMultiple:
|
||||
return value;
|
||||
case ChooseColor:
|
||||
|
||||
@@ -769,9 +769,6 @@ lblColorBias=Farbneigung (1-100%)
|
||||
ttColorBias=Anteil der Karten zu Beginn in der von dir gewählten Farben.
|
||||
lblPenaltyforLoss=Strafe für Niederlage
|
||||
lblMoreDuelChoices=Mehr Duellauswahl
|
||||
lblCommon=Häufig
|
||||
lblUncommon=Nicht so häufig
|
||||
lblRare=Selten
|
||||
lblSpecialBoosters=Spezielle Booster
|
||||
ttSpecialBoosters=Erlaubt spezielle Farbbooster im Laden und als Belohnungen.
|
||||
lblMaximumPacks=Maximale Anzahl Packs
|
||||
@@ -1431,6 +1428,7 @@ btnNextGame=Nächstes Spiel
|
||||
btnStartNewMatch=Starte neue Partie
|
||||
btnQuitMatch=Beende Partie
|
||||
lblItsADraw=Es ist ein Unentschieden!
|
||||
lblNoWinner=Kein Gewinner!
|
||||
lblTeamWon=Team %s hat gewonnen!
|
||||
lblWinnerWon=%s hat gewonnen!
|
||||
lblGameLog=Spiel-Bericht
|
||||
@@ -1572,8 +1570,6 @@ lblDestroyed=Zerstört
|
||||
lblDestroyer=Zerstörer
|
||||
#TriggerDevoured.java
|
||||
lblDevoured=Verschlungen
|
||||
#TriggerDiscarded.java
|
||||
lblDiscarded=Abgeworfen
|
||||
#TriggerEvolved.java
|
||||
lblEvolved=Weiterentwickelt
|
||||
#TriggerExerted.java
|
||||
@@ -1723,7 +1719,6 @@ lblAlreadyDeckName=Es existiert bereits ein Deck '
|
||||
lblOverwriteConfirm='. Überschreiben?
|
||||
lblOverwriteDeck=Deck überschreiben?
|
||||
lblEndDraftConfirm=Dies wird den laufenden Draft beenden und du kannst nicht zurückkehren.\n\nTrotzdem verlassen?
|
||||
lblLeaveDraft=Verlasse Draft
|
||||
#Match.java
|
||||
lblAICantPlayCards=Die KI hat Probleme mit folgenden Karten:
|
||||
lblAnteCardsRemoved=Die Ante-Karten wurden entfernt
|
||||
|
||||
@@ -1433,6 +1433,7 @@ btnNextGame=Next Game
|
||||
btnStartNewMatch=Start New Match
|
||||
btnQuitMatch=Quit Match
|
||||
lblItsADraw=It''s a draw!
|
||||
lblNoWinner=No Winner!
|
||||
lblTeamWon=Team %s won!
|
||||
lblWinnerWon=%s won!
|
||||
lblGameLog=Game Log
|
||||
@@ -2938,9 +2939,6 @@ lblTempHitPoints=Temporary Hit Points
|
||||
lblChosenColors=Chosen colors:
|
||||
lblLoyalty=Loyalty
|
||||
#Achievement.java
|
||||
lblCommon=Common
|
||||
lblUncommon=Uncommon
|
||||
lblRare=Rare
|
||||
lblMythic=Mythic
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblZoom=Zoom
|
||||
|
||||
@@ -1429,6 +1429,7 @@ btnNextGame=Siguiente juego
|
||||
btnStartNewMatch=Nueva partida
|
||||
btnQuitMatch=Salir de la partida
|
||||
lblItsADraw=¡Es un empate!
|
||||
lblNoWinner=¡Sin ganador!
|
||||
lblTeamWon=¡El equipo %s ha ganado!
|
||||
lblWinnerWon=¡%s ha ganado!
|
||||
lblGameLog=Registro del juego
|
||||
@@ -2931,14 +2932,11 @@ lblWinLossRatio=Relación de pérdidas
|
||||
lblHeal=Curar
|
||||
lblTempHitPoints=Puntos de golpe temporales
|
||||
#CardDetailUtil.java
|
||||
lblChosenColors=Chosen colors:
|
||||
lblLoyalty=Loyalty
|
||||
lblChosenColors=Colores elegidos:
|
||||
lblLoyalty=Lealtad
|
||||
#Achievement.java
|
||||
lblCommon=Common
|
||||
lblUncommon=Uncommon
|
||||
lblRare=Rare
|
||||
lblMythic=Mythic
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblMythic=Mítico
|
||||
lblAchievementEarned=Logro ganado
|
||||
lblZoom=Zoom
|
||||
lblEffect=Efecto
|
||||
lblEmblem=Emblem
|
||||
|
||||
@@ -1430,6 +1430,7 @@ btnNextGame=Prochaine partie
|
||||
btnStartNewMatch=Commencer une nouvelle correspondance
|
||||
btnQuitMatch=Quitter la correspondance
|
||||
lblItsADraw=C''est un match nul !
|
||||
lblNoWinner=Pas de gagnant!
|
||||
lblTeamWon=l''équipe %s a gagné !
|
||||
lblWinnerWon=%s a gagné !
|
||||
lblGameLog=Journal du jeu
|
||||
@@ -2936,9 +2937,6 @@ lblTempHitPoints=Points de vie temporaires
|
||||
lblChosenColors=Couleurs choisies :
|
||||
lblLoyalty=Loyauté
|
||||
#Achievement.java
|
||||
lblCommon=Commun
|
||||
lblUncommon=Peu commun
|
||||
lblRare=Rare
|
||||
lblMythic=Mythique
|
||||
lblAchievementEarned=Succès obtenu
|
||||
lblZoom=Zoom
|
||||
|
||||
@@ -1429,6 +1429,7 @@ btnNextGame=Prossima partita
|
||||
btnStartNewMatch=Inizia un nuovo incontro
|
||||
btnQuitMatch=Abbandona incontro
|
||||
lblItsADraw=È un pareggio!
|
||||
lblNoWinner=Nessun vincitore!
|
||||
lblTeamWon=La squadra %s ha vinto!
|
||||
lblWinnerWon= %s ha vinto!
|
||||
lblGameLog=Registro di gioco
|
||||
@@ -2934,13 +2935,10 @@ lblWinLossRatio=Rapporto per perdite vincenti
|
||||
lblHeal=Guarire
|
||||
lblTempHitPoints=Punti ferita temporanei
|
||||
#CardDetailUtil.java
|
||||
lblChosenColors=Chosen colors:
|
||||
lblLoyalty=Loyalty
|
||||
lblChosenColors=Colori scelti:
|
||||
lblLoyalty=Lealtà
|
||||
#Achievement.java
|
||||
lblCommon=Common
|
||||
lblUncommon=Uncommon
|
||||
lblRare=Rare
|
||||
lblMythic=Mythic
|
||||
lblMythic=Mitico
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblZoom=Ingrandisci
|
||||
lblEffect=Effetto
|
||||
|
||||
@@ -1430,6 +1430,7 @@ btnNextGame=次の対戦
|
||||
btnStartNewMatch=新しい試合
|
||||
btnQuitMatch=試合終了
|
||||
lblItsADraw=それは引き分けです!
|
||||
lblNoWinner=勝者はいません!
|
||||
lblTeamWon=チーム %s の勝利!
|
||||
lblWinnerWon=%sの勝利!
|
||||
lblGameLog=ゲームログ
|
||||
@@ -2930,17 +2931,14 @@ lblWinLossRatio=損失率を獲得しました
|
||||
lblHeal=癒し
|
||||
lblTempHitPoints=一時的なヒットポイント
|
||||
#CardDetailUtil.java
|
||||
lblChosenColors=Chosen colors:
|
||||
lblLoyalty=Loyalty
|
||||
lblChosenColors=選ばれた色:
|
||||
lblLoyalty=忠誠心
|
||||
#Achievement.java
|
||||
lblCommon=Common
|
||||
lblUncommon=Uncommon
|
||||
lblRare=Rare
|
||||
lblMythic=Mythic
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblMythic=神話
|
||||
lblAchievementEarned=獲得した達成
|
||||
lblZoom=ズーム
|
||||
lblEffect=効果
|
||||
lblEmblem=エンブレム
|
||||
lblBoon=ブーン
|
||||
lblExitToWoldMap=世界地図に終了しますか?
|
||||
lblWouldYouLikeDestroy=Would you like to destroy {0} ?
|
||||
lblWouldYouLikeDestroy={0}を破壊しますか?
|
||||
@@ -1465,6 +1465,7 @@ btnNextGame=Próximo Jogo
|
||||
btnStartNewMatch=Iniciar Nova Partida
|
||||
btnQuitMatch=Sair da Partida
|
||||
lblItsADraw=É um empate\!
|
||||
lblNoWinner=Sem vencedor\!
|
||||
lblTeamWon=Time %s venceu\!
|
||||
lblWinnerWon=%s venceu\!
|
||||
lblGameLog=Registro do Jogo
|
||||
@@ -3020,12 +3021,9 @@ lblWinLossRatio=Taxa de Vitória Derrota
|
||||
lblHeal=Curar
|
||||
lblTempHitPoints=Pontos de vida temporários
|
||||
#CardDetailUtil.java
|
||||
lblChosenColors=Chosen colors:
|
||||
lblLoyalty=Loyalty
|
||||
lblChosenColors=Cores escolhidas:
|
||||
lblLoyalty=Lealdade
|
||||
#Achievement.java
|
||||
lblCommon=Common
|
||||
lblUncommon=Uncommon
|
||||
lblRare=Rare
|
||||
lblMythic=Mythic
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblZoom=Ampliação
|
||||
|
||||
@@ -1431,6 +1431,7 @@ btnNextGame=下一局游戏
|
||||
btnStartNewMatch=开始新的比赛
|
||||
btnQuitMatch=退出比赛
|
||||
lblItsADraw=平局!
|
||||
lblNoWinner=没有赢家!
|
||||
lblTeamWon=队伍%s胜利了!
|
||||
lblWinnerWon=%s胜利了!
|
||||
lblGameLog=游戏日志
|
||||
@@ -2916,9 +2917,6 @@ lblTempHitPoints=临时生命值
|
||||
lblChosenColors=选择的颜色:
|
||||
lblLoyalty=忠诚指示物
|
||||
#Achievement.java
|
||||
lblCommon=铁
|
||||
lblUncommon=银
|
||||
lblRare=金
|
||||
lblMythic=秘稀
|
||||
lblAchievementEarned=获得的成就
|
||||
lblZoom=飞涨
|
||||
|
||||
@@ -1691,8 +1691,17 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
||||
if (sa != null && sa.isManaAbility()) {
|
||||
getGame().getGameLog().add(GameLogEntryType.LAND, message);
|
||||
} else {
|
||||
getGui().message(message,
|
||||
sa == null || sa.getHostCard() == null ? "" : CardView.get(sa.getHostCard()).toString());
|
||||
if (sa != null && sa.getHostCard() != null && GuiBase.getInterface().isLibgdxPort()) {
|
||||
CardView cardView;
|
||||
IPaperCard iPaperCard = sa.getHostCard().getPaperCard();
|
||||
if (iPaperCard != null)
|
||||
cardView = CardView.getCardForUi(iPaperCard);
|
||||
else
|
||||
cardView = sa.getHostCard().getView();
|
||||
getGui().confirm(cardView, message, ImmutableList.of(localizer.getMessage("lblOk")));
|
||||
} else {
|
||||
getGui().message(message, sa == null || sa.getHostCard() == null ? "" : CardView.get(sa.getHostCard()).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user