mirror of
https://github.com/correl/mage.git
synced 2025-04-11 17:00:08 -09:00
* Some adjustments for the colorless mana symbol.
This commit is contained in:
parent
3a01e97d6e
commit
b23ddd99a0
3 changed files with 23 additions and 19 deletions
Mage.Client/src/main/java
Mage.Sets/src/mage/sets/avacynrestored
|
@ -580,7 +580,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
manaCountLabelX.setText("0");
|
||||
manaLabels.put("X", manaCountLabelX);
|
||||
r = new Rectangle(12, 12);
|
||||
BufferedImage imageManaX = ManaSymbols.getManaSymbolImageSmall("X");
|
||||
BufferedImage imageManaX = ManaSymbols.getManaSymbolImageSmall("C");
|
||||
HoverButton btnColorlessMana = new HoverButton(null, imageManaX, imageManaX, imageManaX, r);
|
||||
btnColorlessMana.setToolTipText("Colorless mana");
|
||||
btnColorlessMana.setOpaque(false);
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
package org.mage.card.arcane;
|
||||
|
||||
import mage.cards.repository.ExpansionRepository;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.client.util.ImageHelper;
|
||||
import mage.client.util.gui.BufferedImageBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.mage.plugins.card.constants.Constants;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
@ -16,6 +11,13 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.imageio.ImageIO;
|
||||
import mage.cards.repository.ExpansionRepository;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.client.util.ImageHelper;
|
||||
import mage.client.util.gui.BufferedImageBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.mage.plugins.card.constants.Constants;
|
||||
|
||||
public class ManaSymbols {
|
||||
|
||||
|
@ -30,10 +32,10 @@ public class ManaSymbols {
|
|||
public static void loadImages() {
|
||||
String[] symbols = new String[]{"0", "1", "10", "11", "12", "15", "16", "2", "3", "4", "5", "6", "7", "8", "9", "B", "BG",
|
||||
"BR", "G", "GU", "GW", "R", "RG", "RW", "S", "T", "U", "UB", "UR", "W", "WB", "WU",
|
||||
"WP", "UP", "BP", "RP", "GP", "X" /*, "Y", "Z", "slash"*/};
|
||||
"WP", "UP", "BP", "RP", "GP", "X", "C" /*, "Y", "Z", "slash"*/};
|
||||
|
||||
for (String symbol : symbols) {
|
||||
File file = new File(getSymbolsPath() + Constants.RESOURCE_PATH_MANA_MEDIUM + "/" + symbol + ".jpg");
|
||||
File file = new File(getSymbolsPath() + Constants.RESOURCE_PATH_MANA_MEDIUM + "/" + symbol + ".jpg");
|
||||
Rectangle r = new Rectangle(11, 11);
|
||||
try {
|
||||
Image image = UI.getImageIcon(file.getAbsolutePath()).getImage();
|
||||
|
@ -198,6 +200,7 @@ public class ManaSymbols {
|
|||
}
|
||||
|
||||
public enum Type {
|
||||
|
||||
CARD,
|
||||
TOOLTIP,
|
||||
PAY
|
||||
|
|
|
@ -28,23 +28,24 @@
|
|||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
*/
|
||||
|
@ -96,18 +97,18 @@ class SigardaHostOfHeronsEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.SACRIFICE_PERMANENT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getPlayerId().equals(source.getControllerId())) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object instanceof PermanentCard) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((PermanentCard)object).getControllerId())) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((PermanentCard) object).getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (object instanceof Spell) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((Spell)object).getControllerId())) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((Spell) object).getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue