It is currently 26 Apr 2024, 09:23
   
Text Size

Forge version 1.5.13

Post MTG Forge Related Programming Questions Here

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

Re: Forge version 1.5.13

Postby Hellfish » 09 Feb 2014, 17:35

Oops, the new TriggerReplacementBase wasn't properly added, it seems.
Sorry about that, does it work now? :oops:
Last edited by Hellfish on 09 Feb 2014, 17:35, edited 1 time in total.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Forge version 1.5.13

Postby Max mtg » 09 Feb 2014, 17:35

24775:

1 error remains:
Code: Select all
 
Description   Resource   Path   Location   Type
Type mismatch: cannot convert from element type ReplacementEffect to CardTraitBase   StaticEffects.java   /forge-game/src/main/java/forge/game   line 226   Java Problem
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.5.13

Postby Hellfish » 09 Feb 2014, 17:40

I'm not sure why you should be getting that since ReplacementEffect extends TriggerReplacementBase which extends CardTraitBase.. Does it conflict with your local changes somehow? :oops:
Still, I changed that line since I think IDEA was a little overzealous with refactoring.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Forge version 1.5.13

Postby Agetian » 09 Feb 2014, 17:41

Stock r24776 compiles for me now.

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.13

Postby Max mtg » 09 Feb 2014, 17:42

My local changes are fine now,
I'm able to fix that error myself (by adjusting the type of iterable element)

Stock r24776 passes compilation.
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.5.13

Postby Hellfish » 09 Feb 2014, 17:45

Great, thanks for notifying me. :)
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Forge version 1.5.13

Postby Agetian » 09 Feb 2014, 19:37

Am I correct assuming that Modern Masters should have 1 foil in every booster?
http://wiki.mtgsalvation.com/article/Modern_Masters
(I updated the chance representation so that it correctly corresponds to a 100% chance of getting a foil in MMA, just need a confirmation that the fact that every MMA booster has a foil in it is indeed correct).

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.13

Postby Max mtg » 09 Feb 2014, 20:09

Just commmited ai's desicionmaking moved away from SpellAbilities - that is no more methods like canPlayAi or doTrigger in purely game classes
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.5.13

Postby Agetian » 10 Feb 2014, 07:14

Ok, I'm a bit confused with the standard chance of a foil appearing in a booster... Please take a look here:
http://wiki.mtgsalvation.com/article/Foil_card
It says that "on the average there is a 1 in 70 chance of getting a foil in a booster pack". And then it says that it approximates to roughly "one in every six or seven booster packs". I don't get why the first equates to the second, to be honest, and I'm not sure what would be the closer approximation of foil generation in boosters for Forge:
1) either 1:6 (one in six chance of appearing) is 16.67%, which is the current Forge default (or 1:7, or whatever),
2) or 1:70 (one in seventy as in the first statement on MTG wiki) is much less - roughly 1.43%.

I understand that statistically 1:6 is probably more often than once in six or seven booster packs, but it feels like 1:70 is definitely much less than once in six or seven booster packs... Rolling 99 or 100 on a 100-sided die (which would represent a 2% chance) does not happen every six or seven rolls on the average, that's for sure. As of right now, 1:6 feels a bit like "too often", while 1:70 would most probably feel "too rare". :\

So, what should we do here? What would be a closer and sane approximation of the foil generation chance for Forge, does anyone know?

P.S. will probably switch to 1:70 for the default (per MTG wiki) for a while and see how that goes.

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.13

Postby Max mtg » 10 Feb 2014, 07:22

1:70 - means if you rip all boosters, every 70th card will be foiled. It evaluates to 0,2(142857) chance to have a foil per booster. Pretty matches my unboxing experience - 6-8 foils found in a booster box, with 1 rare, 2 uncommons, 4 commons, 1 basic land
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.5.13

Postby Agetian » 10 Feb 2014, 07:27

Ohh so it's 1:70 as far as cards go, not as far as boosters go (every 70th card). 0.2142857 per booster (21.4% chance of a foil in booster) would stand for approximately 1:5 then as far as boosters go if I understand correctly... Thanks for the clarification!

EDIT: r24792 now uses 21.43% as a chance of a foil appearing in a booster pack. Had to revert back to the original (uglier) representation of the chance in edition files for now though (since, for example, 21.43% is neither 1:5 [20%] nor 1:6 [16.7%]. So, for now, foil chance in edition files is represented as a fraction of 10000).

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.13

Postby Agetian » 10 Feb 2014, 07:49

Ok, there's still something odd going on in the booster generation that I can't solve, I would really welcome your assistance here... For some reason, sometimes two normal (non-foil) rares will be generated in Modern Masters boosters when a foil card (non-rare) is present (easily enough reproduced on booster drafts). Not sure how this happens, I'm yet unable to find the cause why this is happening. Here's an example:

weird-booster-generation.png


Vivid Grove is an uncommon foil generated in this booster pack. There are two rares to the left of it, which is odd. Please help if possible, thanks in advance!

P.S. This doesn't always happen. In many cases, only one rare will be generated (if it's a non-foil rare and the foil is non-rare). In many other cases, two rares will be generated, one foil and one non-foil. Both of these cases are correct. However, sometimes there will be two non-foil rares *and* a foil card (not rare) in a booster :\

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.13

Postby Max mtg » 10 Feb 2014, 08:19

There's a wrong booster specification
Code: Select all
Booster=10 Common, 3 Uncommon, 1 RareMythic, 1 Any
Remove "1 Any", change it to just 11 commons. with 100% chance to get a foil in COMMON slot this definition will work as intended

And there arises a question: which editions do not use FoilAlwaysInCommonSlot=True ? Can we just hardcode that foil always takes the common slot?
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.5.13

Postby Agetian » 10 Feb 2014, 08:37

Umm I wonder what that 1 Any was for... Anyhow, will remove it then.

And no, there were indeed two ways foils were printed (historically). According to MTG wiki:
Code: Select all
Prior to Time Spiral, if a booster pack contained a foil card it used to replace the card normally found in that rarity. (i.e. the card Shared Triumph is rare, if there was a foil version in a pack it would replace the card found in the rare slot). In every set starting with Time Spiral, a foil card replaces a common card regardless of the rarity of the foil card. [3] This means there is a chance of getting two (or three in the Innistrad or Dark Ascension packs due to the double sided card slot) rares (even mythics] in a single booster pack: one foil, and one regular (as well as one double sided in the aforementioned sets).
So, there are quite a few editions that work a different way from a foil always taking the common slot, so hardcoding it to always be in the common slot would not be correct...

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.13

Postby Max mtg » 10 Feb 2014, 10:10

"1 Any" used to replace that foil of random rarity.

Then - if there are only a few editions where foil card replaces a card of the same rarity, then it is _that_ setting which should become non-default. The line "FoilAlwaysInCommonSlot=True" found in new edition files looks somewhat ugly. Also it turns out that the current foil insertion algorithm is wrong for those editions.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 129 guests


Who is online

In total there are 129 users online :: 0 registered, 0 hidden and 129 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 129 guests

Login Form