mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Client Draft panel - Minor UI changes.
This commit is contained in:
parent
b3063e2c28
commit
f3551a1055
4 changed files with 30 additions and 18 deletions
|
@ -68,7 +68,7 @@
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="lblPack1" min="-2" max="-2" attributes="0"/>
|
<Component id="lblPack1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="txtPack1" min="-2" pref="112" max="-2" attributes="0"/>
|
<Component id="txtPack1" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="lblPack3" min="-2" max="-2" attributes="0"/>
|
<Component id="lblPack3" min="-2" max="-2" attributes="0"/>
|
||||||
|
@ -160,6 +160,9 @@
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="editable" type="boolean" value="false"/>
|
<Property name="editable" type="boolean" value="false"/>
|
||||||
<Property name="enabled" type="boolean" value="false"/>
|
<Property name="enabled" type="boolean" value="false"/>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[130, 22]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JCheckBox" name="chkPack1">
|
<Component class="javax.swing.JCheckBox" name="chkPack1">
|
||||||
|
@ -173,6 +176,9 @@
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="editable" type="boolean" value="false"/>
|
<Property name="editable" type="boolean" value="false"/>
|
||||||
<Property name="enabled" type="boolean" value="false"/>
|
<Property name="enabled" type="boolean" value="false"/>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[130, 22]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JCheckBox" name="chkPack2">
|
<Component class="javax.swing.JCheckBox" name="chkPack2">
|
||||||
|
@ -186,6 +192,9 @@
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="editable" type="boolean" value="false"/>
|
<Property name="editable" type="boolean" value="false"/>
|
||||||
<Property name="enabled" type="boolean" value="false"/>
|
<Property name="enabled" type="boolean" value="false"/>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[130, 22]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JCheckBox" name="chkPack3">
|
<Component class="javax.swing.JCheckBox" name="chkPack3">
|
||||||
|
|
|
@ -225,16 +225,19 @@ public class DraftPanel extends javax.swing.JPanel {
|
||||||
|
|
||||||
txtPack1.setEditable(false);
|
txtPack1.setEditable(false);
|
||||||
txtPack1.setEnabled(false);
|
txtPack1.setEnabled(false);
|
||||||
|
txtPack1.setPreferredSize(new java.awt.Dimension(130, 22));
|
||||||
|
|
||||||
lblPack2.setText("Pack 2:");
|
lblPack2.setText("Pack 2:");
|
||||||
|
|
||||||
txtPack2.setEditable(false);
|
txtPack2.setEditable(false);
|
||||||
txtPack2.setEnabled(false);
|
txtPack2.setEnabled(false);
|
||||||
|
txtPack2.setPreferredSize(new java.awt.Dimension(130, 22));
|
||||||
|
|
||||||
lblPack3.setText("Pack 3:");
|
lblPack3.setText("Pack 3:");
|
||||||
|
|
||||||
txtPack3.setEditable(false);
|
txtPack3.setEditable(false);
|
||||||
txtPack3.setEnabled(false);
|
txtPack3.setEnabled(false);
|
||||||
|
txtPack3.setPreferredSize(new java.awt.Dimension(130, 22));
|
||||||
|
|
||||||
lblCardNo.setText("Card #:");
|
lblCardNo.setText("Card #:");
|
||||||
|
|
||||||
|
@ -261,17 +264,17 @@ public class DraftPanel extends javax.swing.JPanel {
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||||
.addComponent(lblPack2)
|
.addComponent(lblPack2)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(txtPack2))
|
.addComponent(txtPack2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||||
.addComponent(lblPack1)
|
.addComponent(lblPack1)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(txtPack1, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(txtPack1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||||
.addComponent(lblPack3)
|
.addComponent(lblPack3)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(txtCardNo)
|
.addComponent(txtCardNo)
|
||||||
.addComponent(txtPack3)
|
.addComponent(txtPack3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(txtTimeRemaining))))
|
.addComponent(txtTimeRemaining))))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
package mage.sets.scarsofmirrodin;
|
package mage.sets.scarsofmirrodin;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
@ -43,6 +40,9 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
@ -62,11 +62,15 @@ public class MoltenTailMasticore extends CardImpl<MoltenTailMasticore> {
|
||||||
this.subtype.add("Masticore");
|
this.subtype.add("Masticore");
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, sacrifice Molten-Tail Masticore unless you discard a card.
|
||||||
this.addAbility(new MoltenTailMasticoreAbility());
|
this.addAbility(new MoltenTailMasticoreAbility());
|
||||||
|
// {4}, Exile a creature card from your graveyard: Molten-Tail Masticore deals 4 damage to target creature or player.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new GenericManaCost(4));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new GenericManaCost(4));
|
||||||
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
|
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard"))));
|
||||||
ability.addTarget(new TargetCreatureOrPlayer());
|
ability.addTarget(new TargetCreatureOrPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
// {2}: Regenerate Molten-Tail Masticore.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new GenericManaCost(2)));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new GenericManaCost(2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,14 +101,11 @@ class MoltenTailMasticoreAbility extends TriggeredAbilityImpl<MoltenTailMasticor
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE && event.getPlayerId().equals(this.controllerId)) {
|
return event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE && event.getPlayerId().equals(this.controllerId);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "At the beginning of your upkeep, sacrifice {this} unless you discard a card.";
|
return "At the beginning of your upkeep, sacrifice {this} unless you discard a card.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,17 +28,16 @@
|
||||||
package mage.sets.tenth;
|
package mage.sets.tenth;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue