UI Improvements, Round 2: Match UI
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: UI Improvements, Round 2: Match UI
by Doublestrike » 23 Dec 2011, 04:03
One more "aye" from my corner (re: removing old UI). Was secretly hoping this would be the case. 
Edit
Edit
+1 on this too. +1 for everything and everyone, in fact, while we're at it. *kingly hand gestures*I can't wait to not have to see the mana pool card
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: UI Improvements, Round 2: Match UI
by friarsol » 23 Dec 2011, 15:20
Hand Stacking:
It appears when cards in my hand go into two rows they are organized in up-down, left-right order instead of left-right, up-down order.
Example: I have 10 cards in my hand A-J
A B C D E
F G H I J
I click on the card in the lower left card(F) to discard it.
This is the new order I get:
A G H I J
B C D E
This is the order I was expecting:
A B C D E
G H I J
Since this is closer to my left-right reading style. Does that make sense? Hope so.
It appears when cards in my hand go into two rows they are organized in up-down, left-right order instead of left-right, up-down order.
Example: I have 10 cards in my hand A-J
A B C D E
F G H I J
I click on the card in the lower left card(F) to discard it.
This is the new order I get:
A G H I J
B C D E
This is the order I was expecting:
A B C D E
G H I J
Since this is closer to my left-right reading style. Does that make sense? Hope so.
Last edited by friarsol on 23 Dec 2011, 15:54, edited 1 time in total.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: Match UI
by Chris H. » 23 Dec 2011, 15:41
`friarsol wrote:Since this is closer to my left-right reading style. Does that make sense? Hope so.
Makes sense to me.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: UI Improvements, Round 2: Match UI
by Jaedayr » 23 Dec 2011, 18:46
Today I started a quest match and was very surprised to see the AI start with five lands on the battlefield. At the start of the second game it started with three lands in play. Is this correct?
Re: UI Improvements, Round 2: Match UI
by friarsol » 23 Dec 2011, 18:54
A quest or a challenge? Any specific opponent or all of them?Jaedayr wrote:Today I started a quest match and was very surprised to see the AI start with five lands on the battlefield. At the start of the second game it started with three lands in play. Is this correct?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: Match UI
by Jaedayr » 23 Dec 2011, 19:06
I have played three duels so far, no challenges and the AI started with land every time. It appears that whatever land is in the opening hand is played during the first turn of the game.
I don't remember the first opponent but the last two were king goldamer and crocodile dundee.
I don't remember the first opponent but the last two were king goldamer and crocodile dundee.
Re: UI Improvements, Round 2: Match UI
by friarsol » 23 Dec 2011, 19:12
Oh, I think the latest nightly build accidentally had the "unlimited land plays" enabled in the dev mode. Just disable it, I'm not sure how it got turned on.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: Match UI
by Chris H. » 23 Dec 2011, 19:19
`friarsol wrote:Oh, I think the latest nightly build accidentally had the "unlimited land plays" enabled in the dev mode. Just disable it, I'm not sure how it got turned on.
Rev 12814
hook up the Play Unlimited Lands DevMode button and save state on close. (?)
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: UI Improvements, Round 2: Match UI
by slapshot5 » 23 Dec 2011, 22:04
I missed the isHuman check when I reworked it. I had it initially. I'm stuck in the airport and can't fix. feel free.
slapshot5
slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: UI Improvements, Round 2: Match UI
by Chris H. » 24 Dec 2011, 00:22
`slapshot5 wrote:I missed the isHuman check when I reworked it. I had it initially. I'm stuck in the airport and can't fix. feel free.
I found the code section at Player.canPlayLand()
- Code: Select all
public final boolean canPlayLand() {
final ViewTopLevel t = ((GuiTopLevel) AllZone.getDisplay()).getController().getMatchController().getView();
if (t.getTabberController().getView().getLblUnlimitedLands().getEnabled()) {
return Phase.canCastSorcery(this);
}
// CantBeCast static abilities
final CardList allp = AllZoneUtil.getCardsIn(Zone.Battlefield);
for (final Card ca : allp) {
final ArrayList<StaticAbility> staticAbilities = ca.getStaticAbilities();
for (final StaticAbility stAb : staticAbilities) {
if (stAb.applyAbility("CantPlayLand", null, this)) {
return false;
}
}
}
return Phase.canCastSorcery(this)
&& ((this.numLandsPlayed < this.maxLandsToPlay) || (this.getCardsIn(Zone.Battlefield, "Fastbond")
.size() > 0));
}
I am trying to add the missing isHuman check but I may need a hint from someone with more experience.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: UI Improvements, Round 2: Match UI
by friarsol » 24 Dec 2011, 00:35
- Code: Select all
if (t.getTabberController().getView().getLblUnlimitedLands().getEnabled() && this.isHuman()) {
return Phase.canCastSorcery(this);
}
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: Match UI
by Chris H. » 24 Dec 2011, 00:47
`friarsol wrote:
- Code: Select all
if (t.getTabberController().getView().getLblUnlimitedLands().getEnabled() && this.isHuman()) {
return Phase.canCastSorcery(this);
}
Ah, it works, thank you.
I tried several variations other than
- Code: Select all
this.isHuman()
and none of them worked. I should have tried the obvious simpler form.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: UI Improvements, Round 2: Match UI
by friarsol » 24 Dec 2011, 00:50
Just gotta know what class you are in.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: Match UI
by slapshot5 » 24 Dec 2011, 02:46
I think it probably needs a:
-slapshot5
- Code: Select all
&& Constant.Runtime.DEV_MODE[0]
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: UI Improvements, Round 2: Match UI
by Chris H. » 24 Dec 2011, 03:09
`slapshot5 wrote:I think it probably needs a:Otherwise, if you play in dev mode, and turn it on, then play in not dev mode, it probably still lets you play multiple lands with no way to change it.
- Code: Select all
&& Constant.Runtime.DEV_MODE[0]
Good catch, tested scenario and you are right. Your fix takes care of the problem.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Who is online
Users browsing this forum: No registered users and 12 guests