It is currently 08 Sep 2025, 21:09
   
Text Size

Forge version 1.4.3

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Forge version 1.4.3

Postby Chris H. » 28 Jun 2013, 13:00

Tentative target release date: Friday July 12.
User avatar
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: Forge version 1.4.3

Postby Max mtg » 28 Jun 2013, 15:30

Most wonderful!
Thanks for release, Chris!
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.4.3

Postby Agetian » 06 Jul 2013, 17:26

OK guys, I'm off on a two-week vacation, so I most likely won't be around by the time 1.4.3 is released. Good luck to everyone with the current projects! I'll finish up my stuff (foils would be the first on the list) when I'm back, so that'll likely go into v1.4.4+. The current state of things for my projects looks fine (foils are unfinished but should work at least as well as they did before in Random mode, with the difference that the cards from editions which never ever had foil cards in them will not be foiled anymore; the Planechase AI is basic but functional and I've played a couple dozen matches against the AI so I don't think there are any critical breaking bugs; the AI profiles are not quite up to their full power yet but whatever went in during this time is functional as well and seems to work fine).

It looks like there's currently a number of regressions in Forge, some of them rather serious. Please take these threads into consideration when deciding if there are any showstopper bugs potentially blocking the release:
viewtopic.php?f=52&t=10442
viewtopic.php?f=52&t=11012
Now, some of it may not actually be as critical to become a blocker, but I believe the event-related issues causing visual and audial disruption, as well as rule regressions, are better addressed before the release (just my two cents).

I'll see if I can do some playtesting/reporting during the vacation trip, but I most likely won't be on often (and I won't be coding, sadly...). Still, I have NetBeans + the Forge SVN checked out on my laptop just in case, and I'll be back soon and I'll continue my work on the project with you in a couple weeks from now! See you soon!

- Agetian
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Forge version 1.4.3

Postby Max mtg » 07 Jul 2013, 14:46

So... what exactly remains 'disrupted' after r22478?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.4.3

Postby friarsol » 08 Jul 2013, 00:02

Max mtg wrote:So... what exactly remains 'disrupted' after r22478?
Canceling spells/undoing mana payments still doesn't redraw.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Forge version 1.4.3

Postby friarsol » 10 Jul 2013, 15:17

If we're planning a M14 release for Friday, have all of the M14 rulings been updated?

# of Lands You can Play - Done (Existing)
Sideboarding - Done (Sol)

Indestructible now a Keyword (Code Changes + Script updates?) - Done (Sloth)
Rename Unblockable to can't be blocked. - Done via Card Detail Panel (Swordshine)
Legendary/Planeswalker Rule - Done (Max)

Edit: Updating list
Last edited by friarsol on 12 Jul 2013, 02:48, edited 2 times in total.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Forge version 1.4.3

Postby Max mtg » 10 Jul 2013, 15:26

Legendary/Planeswalker rule handling is rediculously easy.
Code: Select all
Index: main/java/forge/game/GameAction.java
===================================================================
--- main/java/forge/game/GameAction.java   (revision 22532)
+++ main/java/forge/game/GameAction.java   (working copy)
@@ -902,14 +902,16 @@
                 game.getStack().chooseOrderOfSimultaneousStackEntryAll();
             }
 
-            if (this.handleLegendRule()) {
-                checkAgain = true;
+            for(Player p : game.getPlayers() ) {
+                if (this.handleLegendRule(p)) {
+                    checkAgain = true;
+                }
+   
+                if (this.handlePlaneswalkerRule(p)) {
+                    checkAgain = true;
+                }
             }
 
-            if (this.handlePlaneswalkerRule()) {
-                checkAgain = true;
-            }
-
             if (!checkAgain) {
                 break; // do not continue the loop
             }
@@ -1139,9 +1141,9 @@
      * destroyPlaneswalkers.
      * </p>
      */
-    private boolean handlePlaneswalkerRule() {
+    private boolean handlePlaneswalkerRule(Player p) {
         // get all Planeswalkers
-        final List<Card> list = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS);
+        final List<Card> list = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS);
 
         boolean recheck = false;
         Card c;
@@ -1179,8 +1181,8 @@
      * destroyLegendaryCreatures.
      * </p>
      */
-    private boolean handleLegendRule() {
-        final List<Card> a = CardLists.getType(game.getCardsIn(ZoneType.Battlefield), "Legendary");
+    private boolean handleLegendRule(Player p) {
+        final List<Card> a = CardLists.getType(p.getCardsIn(ZoneType.Battlefield), "Legendary");
         if (a.isEmpty() || game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noLegendRule)) {
             return false;
         }
@@ -1190,7 +1192,7 @@
             a.removeAll(yamazaki);
         }
         while (!a.isEmpty()) {
-            List<Card> b = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals(a.get(0).getName()));
+            List<Card> b = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals(a.get(0).getName()));
             b = CardLists.getType(b, "Legendary");
             b = CardLists.filter(b, new Predicate<Card>() {
                 @Override
Didn't commit it
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.4.3

Postby jsv » 10 Jul 2013, 15:53

Max mtg wrote:Legendary/Planeswalker rule handling is rediculously easy.
Code: Select all
Index: main/java/forge/game/GameAction.java
===================================================================
--- main/java/forge/game/GameAction.java   (revision 22532)
+++ main/java/forge/game/GameAction.java   (working copy)
@@ -902,14 +902,16 @@
                 game.getStack().chooseOrderOfSimultaneousStackEntryAll();
             }
 
-            if (this.handleLegendRule()) {
-                checkAgain = true;
+            for(Player p : game.getPlayers() ) {
+                if (this.handleLegendRule(p)) {
+                    checkAgain = true;
+                }
+   
+                if (this.handlePlaneswalkerRule(p)) {
+                    checkAgain = true;
+                }
             }
 
-            if (this.handlePlaneswalkerRule()) {
-                checkAgain = true;
-            }
-
             if (!checkAgain) {
                 break; // do not continue the loop
             }
@@ -1139,9 +1141,9 @@
      * destroyPlaneswalkers.
      * </p>
      */
-    private boolean handlePlaneswalkerRule() {
+    private boolean handlePlaneswalkerRule(Player p) {
         // get all Planeswalkers
-        final List<Card> list = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS);
+        final List<Card> list = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS);
 
         boolean recheck = false;
         Card c;
@@ -1179,8 +1181,8 @@
      * destroyLegendaryCreatures.
      * </p>
      */
-    private boolean handleLegendRule() {
-        final List<Card> a = CardLists.getType(game.getCardsIn(ZoneType.Battlefield), "Legendary");
+    private boolean handleLegendRule(Player p) {
+        final List<Card> a = CardLists.getType(p.getCardsIn(ZoneType.Battlefield), "Legendary");
         if (a.isEmpty() || game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noLegendRule)) {
             return false;
         }
@@ -1190,7 +1192,7 @@
             a.removeAll(yamazaki);
         }
         while (!a.isEmpty()) {
-            List<Card> b = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals(a.get(0).getName()));
+            List<Card> b = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals(a.get(0).getName()));
             b = CardLists.getType(b, "Legendary");
             b = CardLists.filter(b, new Predicate<Card>() {
                 @Override
Didn't commit it
Wouldn't this destroy all plainswalkers/legends with the same name belonging to a particular player? Under the new rules the player is supposed to choose one of them that stays on the battlefield while the rest is destroyed.
jsv
 
Posts: 53
Joined: 29 May 2013, 03:20
Has thanked: 3 times
Been thanked: 6 times

Re: Forge version 1.4.3

Postby Sloth » 10 Jul 2013, 20:09

friarsol wrote:Indestructible now a Keyword (Code Changes + Script updates?)
Has been done.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Forge version 1.4.3

Postby Max mtg » 10 Jul 2013, 21:30

I've committed a slower-to-write but rightly implemented revision for this rule (r22539)

Please tell me how to handle Brothers Yamazaki under new rules? Should I enforce player to keep only one of them or two out of 3+ ?

Sloth, please pay a visit to the new class 'LegendaryRuleAi'... you'll probably want to improve it
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.4.3

Postby Marek14 » 10 Jul 2013, 22:46

Depends on how exactly is new legendary rule written, I've seen it also mentioned as "select one permanent to put into graveyard, repeat until there are no conflicts".

But I think that Brothers Yamazaki will definitely let you keep two since that is the whole point of the card.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Forge version 1.4.3

Postby friarsol » 10 Jul 2013, 23:27

Here is some current speculation:

"All the expected (and some unexpected) M14 errata is already in Gatherer. My understanding is that updating it is a non-trivial process, so it's done all in one go, meaning Brothers Yamazaki is unlikely to receive errata. [...]
The only case in which the new version of the legend rule would cause an issue is when two players each control one Brothers Yamazaki, which is probably unusual enough that it's not worth trying to shoehorn a two-per-player onto the card."

But since comprehensive rules haven't been updated yet, noone is sure.

Basically it sounds like, if more than 2 Brothers are on the battlefield, if a player has more than one of them they choose one and the rest are placed in the graveyard. So 3 Brothers controlled by one player turns into 1 left, not into 2 as Marek surmises (I was thinking it would as well).

This is similar to the 2004 ruling, just with an odd twist:
"12/1/2004 If a third Brothers Yamazaki enters the battlefield, the Legend rule applies again and all three are put into graveyards."
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Forge version 1.4.3

Postby swordshine » 12 Jul 2013, 02:03

State-based action for Brothers Yamazaki: if there are exactly two permanents named Brothers Yamazaki on the battlefield, remove them from the check, otherwise apply the legend rule.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Forge version 1.4.3

Postby Max mtg » 12 Jul 2013, 02:36

swordshine wrote:State-based action for Brothers Yamazaki: if there are exactly two permanents named Brothers Yamazaki on the battlefield, remove them from the check, otherwise apply the legend rule.
The code i commited reads quite the same :-)
There will remain only one if there were 3+ of them
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.4.3

Postby swordshine » 12 Jul 2013, 02:57

Max mtg wrote:The code i commited reads quite the same :-)
There will remain only one if there were 3+ of them
Current code cannot handle situation when each player has exactly two Brothers Yamazaki.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 44 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 44 users online :: 0 registered, 0 hidden and 44 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 44 guests

Login Form