It is currently 16 Apr 2024, 18:08
   
Text Size

Mutate and AI

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

Re: Mutate and AI

Postby gp66 » 16 Sep 2020, 20:45

Underdose wrote:Edit to add: The deck builder appears to be pretty broken in this build unfortunately - cannot add or remove cards by double clicking. Moving cards to/from sideboard or from the deck to the searcher to remove them does not actually move/remove them, only visually appears to. Searching doesn't show any results until you do something such as remove lands from results. Trying to use the text export/import feature at the moment to modify the deck list.
Sorry about that, i forgot to uncomment the array that holds the unfinished ZNR cards.

New build link in first post.
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 17 Sep 2020, 03:10

Thanks @Underdose and @emerald000.

I simply switched the under/over selection and the computer player always mutates over.
This played so much better! I gave the AI player a black/blue flash mutate deck and it wiped me off the board. #-o

Just in case, copying the images folder from the previous build to the new build will save you a bit of time.
mage-bundle\mage-client\plugins\images

New build link is in post #1.
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby Underdose » 17 Sep 2020, 15:22

New build looks great! Been testing for a few hours now and not seen a single mutate card fall off.

Have run into a lot of missing images - the card points to the image name without the number that xmage recently added (e.g. /IKO/Sea-Dasher Octopus.full.jpg, rather than /IKO/Sea-Dasher Octopus.66.full.jpg), but it's not consistent - it seems to depend on what it's mutated on to. I can give you a list of cards I saw with incorrect image directory, but honestly it was pretty much all of them and like I say, wildly inconsistent.

Otrimi has the Brokkos problem where casting it with mutate from the command zone just puts it straight onto the battlefield instead.

Speaking of Brokkos, although it doesn't work if you cast it with mutate from command zone or graveyard, it does if you cast it from hand or from exile (tested with Vivien, Champion of the Wilds).

Hope this at all helps! Thanks again for your hard work, looking fantastic so far :D
Underdose
 
Posts: 6
Joined: 25 Apr 2018, 10:42
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 17 Sep 2020, 17:45

Underdose wrote:New build looks great! Been testing for a few hours now and not seen a single mutate card fall off.

Have run into a lot of missing images - the card points to the image name without the number that xmage recently added (e.g. /IKO/Sea-Dasher Octopus.full.jpg, rather than /IKO/Sea-Dasher Octopus.66.full.jpg), but it's not consistent - it seems to depend on what it's mutated on to. I can give you a list of cards I saw with incorrect image directory, but honestly it was pretty much all of them and like I say, wildly inconsistent.

Otrimi has the Brokkos problem where casting it with mutate from the command zone just puts it straight onto the battlefield instead.

Speaking of Brokkos, although it doesn't work if you cast it with mutate from command zone or graveyard, it does if you cast it from hand or from exile (tested with Vivien, Champion of the Wilds).

Hope this at all helps! Thanks again for your hard work, looking fantastic so far :D
Thanks for the ongoing input, it really helps.

The problem with images and mutate stem from cards with multiple images (multiple card numbers). All mutate cards have multiple images and when you mutate 'over' a creature with only a single card (no multiple art cards) the image sometimes does not work. I wracked my brain over this one and like most mutate stuff could not get it working 100% of the time and only with standard legal cards and now C20. The image works 100% of the time when mutating under a creature.

Hope this sheds some light.
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby Underdose » 18 Sep 2020, 14:35

gp66 wrote:Thanks for the ongoing input, it really helps.

The problem with images and mutate stem from cards with multiple images (multiple card numbers). All mutate cards have multiple images and when you mutate 'over' a creature with only a single card (no multiple art cards) the image sometimes does not work. I wracked my brain over this one and like most mutate stuff could not get it working 100% of the time and only with standard legal cards and now C20. The image works 100% of the time when mutating under a creature.

Hope this sheds some light.
Ah yeah that makes sense and sounds like a difficult problem to solve. FWIW, I made an image of each mutate card without the extra number in its name and the image seems to always work now when mutating over, but of course this would require each user manually adding those images or xmage changing their imaging number system again, neither of which seems likely!
Underdose
 
Posts: 6
Joined: 25 Apr 2018, 10:42
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby adesst » 25 Sep 2020, 08:32

Hi @gp66,

i tested the mutate, "Gemrazer"

1. during cast, it ask me whether
- cast Gemrazer
- cast Gemrazer using mutate
2. i chose `cast Gemrazer using mutate`

Actual:
3. Gemrazer etb as a standalone card

Expected:
3. ask target of controll non-human creature
4. if target is valid then
5. ask to mutate on top or bottom of targeted creature
6. if resolved then ask target opponent, artifact or permanent
7. target opponent has to be ask or add target as many as the
successful target

Here is the snippet log:

2:40 PM, T9.M1: adesst78 puts Forest [e79] from hand onto the Battlefield
2:40 PM, T9.M1: adesst78 plays Forest [e79]
2:40 PM, T9.M1: adesst78 casts Gemrazer [b56] using mutate
2:40 PM, T9.M1: adesst78 puts Gemrazer [b56] from stack onto the Battlefield
Attachments
Screenshot_2020-09-25_15-31-58.png
adesst
 
Posts: 2
Joined: 25 Sep 2020, 08:26
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 25 Sep 2020, 15:46

adesst wrote:Hi @gp66,

i tested the mutate, "Gemrazer"

1. during cast, it ask me whether
- cast Gemrazer
- cast Gemrazer using mutate
2. i chose `cast Gemrazer using mutate`

Actual:
3. Gemrazer etb as a standalone card

Expected:
3. ask target of controll non-human creature
4. if target is valid then
5. ask to mutate on top or bottom of targeted creature
6. if resolved then ask target opponent, artifact or permanent
7. target opponent has to be ask or add target as many as the
successful target

Here is the snippet log:

2:40 PM, T9.M1: adesst78 puts Forest [e79] from hand onto the Battlefield
2:40 PM, T9.M1: adesst78 plays Forest [e79]
2:40 PM, T9.M1: adesst78 casts Gemrazer [b56] using mutate
2:40 PM, T9.M1: adesst78 puts Gemrazer [b56] from stack onto the Battlefield
.

Hi adesst,

Yeah, that happens to me once in awhile too, forgot to add this to post #4. Also, usually when the board is full, the mutate perm will lose all the merged cards. I was not able to solve these issues. See post #4 for a full list of what works and what doesn't.

Thanks for reporting this issue,

Gary
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby adesst » 25 Sep 2020, 16:50

Hi Gary,

I added some rules to Gemrazer, as the card to work on.
And the ability i am focusing is to target controlled non-human
creature.

The JUnitTest shows promissing result. I am testing with
the quick-duel-mode. But can not figure out why the `game`
stops/end at turn 6th.

And another thing is, how could i share my working progress?
Would push the progress to my forked Mage help? or any other
method.

thx.

-ade-
adesst
 
Posts: 2
Joined: 25 Sep 2020, 08:26
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 26 Sep 2020, 17:16

adesst wrote:Hi Gary,

I added some rules to Gemrazer, as the card to work on.
And the ability i am focusing is to target controlled non-human
creature.

The JUnitTest shows promissing result. I am testing with
the quick-duel-mode. But can not figure out why the `game`
stops/end at turn 6th.

And another thing is, how could i share my working progress?
Would push the progress to my forked Mage help? or any other
method.

thx.

-ade-
.
Mutate targeting will be handled in MutateAbility.java and the mutate triggered ability will be handled in MutatesSourceTriggeredAbility.java.

...\mage\Mage\src\main\java\mage\abilities\keyword\MutateAbility.java
...\mage\Mage\src\main\java\mage\abilities\common\MutatesSourceTriggeredAbility.java

I followed this pull request to get the basics working:
https://github.com/magefree/mage/pull/6567

As far as sharing your work, you can search Google to find some excellent tutorials, but just create a new local branch and then push to github.

Hope this helps.
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 08 Oct 2020, 22:33

I was able to get the computer player to mutate under or over based on power and toughness.
While playing a test match, Auspicious Starrix mutated over a 1/1 creature, then Migratory Greathorn mutated under.
A few simple 'if' statements did the trick. :D

New build link in post #1
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 22 Oct 2020, 03:14

fixed a null pointer error, new build link in post #1
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby thefnitalian » 18 Dec 2020, 18:32

Is there a any update on this build?
thefnitalian
 
Posts: 6
Joined: 13 Nov 2020, 23:14
Has thanked: 1 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 18 Dec 2020, 20:53

thefnitalian wrote:Is there a any update on this build?
Sorry, the build in post #1 is the last.
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

Re: Mutate and AI

Postby thefnitalian » 20 Dec 2020, 01:34

So what does that mean? Is the mutate code just being deprecated and not worked on?
Also, how do you connect to a server with the build in the first post?
thefnitalian
 
Posts: 6
Joined: 13 Nov 2020, 23:14
Has thanked: 1 time
Been thanked: 0 time

Re: Mutate and AI

Postby gp66 » 20 Dec 2020, 15:41

thefnitalian wrote:So what does that mean? Is the mutate code just being deprecated and not worked on?
Also, how do you connect to a server with the build in the first post?
Mutate has not been implemented as of yet for xmage.

The build in post #1 was me sharing a personal build. I am a coding newbie and wanted to learn Java and xmage code. Naively, i picked mutate as my first mechanic :oops: :D

I got busy at work and the devs updated a ton of code and I was unable to update to current version without a ton of errors. So, sadly, the build in post #1 is the last :(
gp66
 
Posts: 21
Joined: 26 Apr 2020, 23:37
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Developers Talk

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 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 6 guests

Login Form