mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
* UI: improved prevention effect messages (now it shows source object name in message window);
This commit is contained in:
parent
f4a0c70cf3
commit
9cd3eeb898
1 changed files with 4 additions and 0 deletions
|
@ -756,7 +756,11 @@ public class ContinuousEffects implements Serializable {
|
||||||
effect.setValue("targetAbility", targetAbility);
|
effect.setValue("targetAbility", targetAbility);
|
||||||
if (effect.applies(event, sourceAbility, game)) {
|
if (effect.applies(event, sourceAbility, game)) {
|
||||||
if (!game.inCheckPlayableState() && !silentMode) {
|
if (!game.inCheckPlayableState() && !silentMode) {
|
||||||
|
MageObject sourceObject = sourceAbility.getSourceObject(game);
|
||||||
String message = effect.getInfoMessage(sourceAbility, event, game);
|
String message = effect.getInfoMessage(sourceAbility, event, game);
|
||||||
|
if (sourceObject != null) {
|
||||||
|
message = sourceObject.getIdName() + ": " + message;
|
||||||
|
}
|
||||||
if (message != null && !message.isEmpty()) {
|
if (message != null && !message.isEmpty()) {
|
||||||
if (effect.sendMessageToUser()) {
|
if (effect.sendMessageToUser()) {
|
||||||
Player player = game.getPlayer(event.getPlayerId());
|
Player player = game.getPlayer(event.getPlayerId());
|
||||||
|
|
Loading…
Reference in a new issue