It is currently 16 Apr 2024, 07:38
   
Text Size

Card Contributions

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Re: Card Contributions

Postby melvin » 22 May 2016, 01:54

@muppet Great job! Thanks for the card submissions :)

muppet wrote:Submitted Westvale Abbey, Ormendahl.
Thanks! Included in next release with a small tweak, so that the transform occurs before untap. The original submission had untap first.

muppet wrote:Submitted Sylvan Advocate. Can't do Declaration in Stone. I think the engine can't do Collected Company.
Included Sylvan Advocate, nice work with finding a script only solution without groovy. Declaration in Stone and Collected Company are doable with groovy code. Collected Company will need to use the MagicFromCardListChoice to select up to two creature. Putting cards in any order has never been allowed, cards will go to the bottom in the same order they were taken from the top.

muppet wrote:Gideon, Ally of Zendikar. Works fine has one extra variable it doesn't need so might need to be removed if this slows the game down much.
Looks good, thanks! This is a pretty complicated one. I've removed the extra variable, it doesn't slow the game down but it may be confusing to someone reading the groovy.

muppet wrote:engine won't do Transgress the Mind or Duskwatch Recruiter or Domoka's Command. I failed at Avacyn, and Loam Dryad.
The engine could do Transfress the Mind, the issue is that the AI doesn't know how to utilize reveal opponent's hand so we choose not to add such cards.

Duskwatch Recruiter is similar to Collected Company so it can be implemented with MagicFromCardListChoice as well.

"Choose two" is not supported.

"When transforms" can be implemented with BecomesStateTrigger, eg see https://github.com/magarena/magarena/bl ... igger.java

Loam Dryad is not supported as mana activation cost cannot have a choice.

muppet wrote:Almost got Thing in the Ice working. Is there a way to do things like when this transforms do x? That was a problem with avacyn too?
Yes, use the BecomesStateTrigger and check that state == MagicPermanentState.Transformed
Code: Select all
new BecomesStateTrigger() {
    @Override
    public boolean accept(final MagicPermanent permanent, final ChangeStateAction data) {
        return data.state == MagicPermanentState.Transformed;
    }
    @Override
    public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final ChangeStateAction data) {
       //return event of trigger
    }
}
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby muppet » 05 Jun 2016, 12:03

Did Ulamog, the Ceaseless Hunger.

the dbl target ability I had to make into two so it isn't correct with for example stifle.

Its fine for standard and modern. If there is a way to do exile target twice in one ability let me know and i'll update it.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby ShawnieBoy » 05 Jun 2016, 14:43

muppet wrote:Did Ulamog, the Ceaseless Hunger.

the dbl target ability I had to make into two so it isn't correct with for example stifle.

Its fine for standard and modern. If there is a way to do exile target twice in one ability let me know and i'll update it.
Unfortuantely he falls into the Multiple Targets, which we can't currently do :( Have a look at List of Unsupported Card Groups It's not just for cards like Stifle it's also cards that change targets, and trigger when targeted. Both targets need to be known and chosen at the same time.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Card Contributions

Postby PalladiaMors » 06 Jun 2016, 03:50

One small card group that I think may have a couple leftover viable cards is (are?) the cards with Clash, like Lash Out or Pollen Lullaby. I remember giving those a try way back, but at the time I couldn't find a groovy example of a card with clash (or didn't understand the ones I found, can't recall). Not sure how many of those are left, but I don't think the ones that required groovy were explored thoroughly, so there may be a few. If I understand correctly, Clash isn't targeted, so those should be ok? Would give it a try but since I didn't manage to do them them when I was "active", I don't think I'll manage to do it now that I'm rusty! Anyway, just a tip that could save some time looking for possible cards, I know that can be time consuming. Cheers guys!
PalladiaMors
 
Posts: 343
Joined: 12 Jul 2014, 17:40
Has thanked: 36 times
Been thanked: 22 times

Re: Card Contributions

Postby muppet » 06 Jun 2016, 13:41

there are lots of standard new cards that are doable I think and I will have another go at the ones above.

I'm doing Chandra, Flamecaller at the minute. Is x an allowed planeswalker ability cost that's the last bit I have to do not actually tried it yet.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby muppet » 06 Jun 2016, 17:46

hmm ok so it seems it is beyond me the first two parts were fine but the cost of x was not possible for me.

back to thing in the ice with the fix from above and duskwatch recruiter
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby muppet » 07 Jun 2016, 09:12

I finished the Chandra , the Flamecaller. But the last ability is -3 and needs to be -x.

It works well enough for me as I just have a -1-2-3-4-5-6 ability but that's not good enough for release so I uploaded it in case anyone can make it -x.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby ShawnieBoy » 09 Jun 2016, 17:22

I'll have a look at enabling removing X counters as a cost - it does appear on non-planeswalker cards as well.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Card Contributions

Postby muppet » 10 Jun 2016, 08:51

Got most of the second half of arlinn just having a problem where it works if I target a creature but refuses to flip or damage a player, checking Ajani vengent to see what I am doing wrong then its just the emblem to go which might be hard too :-).
think I found the problem and it might mean Ajani is actually slightly wrong in that it deals life to players not damage will check that.

Nope how do I do damage to players? the target part works fine but I only damage the permanent selected not player. I'll see if I can find a groovy with something that damages players and permanents.

Code: Select all
new MagicPlaneswalkerActivation(-1) {
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                NEG_TARGET_CREATURE_OR_PLAYER,
            new MagicDamageTargetPicker(3),
                this,
                "SN deals 3 damage to target creature or player\$, transform SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
         event.processTargetPermanent(game, {
            game.doAction(new DealDamageAction(event.getSource(),it,3));
            game.doAction(new TransformAction(event.getPermanent()));
         });
      }
}
is what I am using pretty much, I tried a few minor changes based on other cards, But it just doesn't damage the player even though I can target them fine and then the transform fails.

AHA in writing it out I spotted it is process target permanent not just process target that'll be it I just need to see how to make the transform still work if it stops. Nope still just works on creatures and not players although I can target them.

I'll do the emblem and hopefully someone can fix this bit.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby melvin » 13 Jun 2016, 01:35

Your right, the bug is that it should be processTarget and not processTargetPermanent, as players are not permanents.

In any case, for next release, loyalty abilities are supported in card script. The only ability on Arlinn Kord that isn't card scriptable is the emblem ability.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby muppet » 13 Jun 2016, 09:11

Ok I might hold off on planeswalkers then. I am back on thing in the ice at the minute I think I got the trigger to trigger just have to make it actually put stuff back in hand now.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby muppet » 13 Jun 2016, 14:12

"When transforms" can be implemented with BecomesStateTrigger, eg see https://github.com/magarena/magarena/bl ... igger.java

Loam Dryad is not supported as mana activation cost cannot have a choice.

muppet wrote:Almost got Thing in the Ice working. Is there a way to do things like when this transforms do x? That was a problem with avacyn too?
Yes, use the BecomesStateTrigger and check that state == MagicPermanentState.Transformed
Code: Select all
new BecomesStateTrigger() {
    @Override
    public boolean accept(final MagicPermanent permanent, final ChangeStateAction data) {
        return data.state == MagicPermanentState.Transformed;
    }
    @Override
    public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final ChangeStateAction data) {
       //return event of trigger
    }
}
sorry can't get this to work but its because I have no clue.
I tried a few things and nothing happens e.g.

Code: Select all
[
   new BecomesStateTrigger() {
      @Override
      public boolean accept(final MagicPermanent permanent, final ChangeStateAction data) {
         return data.state == MagicPermanentState.Transformed;
      }
      @Override
      public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final ChangeStateAction data) {
         return new MagicEvent(
         permanent,
         this,
         "return all non horror creatures to owners hand.")
        }
      @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> targets = CREATURE.filter(event);
            for (final MagicPermanent target : targets) {
                if (!target.hasSubType(MagicSubType.Kraken) &&
                    !target.hasSubType(MagicSubType.Leviathan) &&
                    !target.hasSubType(MagicSubType.Octopus) &&
                    !target.hasSubType(MagicSubType.Serpent)) {
                    game.doAction(new RemoveFromPlayAction(target,MagicLocationType.OwnersHand));
                }
            }
        }
   }
]
Not sure what I am missing do I need an If somewhere to query if it has transformed? Or am I not understanding where to put my event or is it in the wrong form ?
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby melvin » 14 Jun 2016, 00:27

There is a problem with the way triggers are loaded. By the time the back face triggers are active, the transform has already happened. Try putting the BecomesStateTrigger on the front face instead of the back face.

Btw the non horror check is incorrect.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby muppet » 14 Jun 2016, 10:52

ok I'll try the front face yes I knew I was just copying a card without changing it at all to make sure I hadn't done something mad changing it to horror.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Card Contributions

Postby muppet » 14 Jun 2016, 10:54

melvin wrote:Your right, the bug is that it should be processTarget and not processTargetPermanent, as players are not permanents.

In any case, for next release, loyalty abilities are supported in card script. The only ability on Arlinn Kord that isn't card scriptable is the emblem ability.
I also notice the event was a get permanentevent so I changed that too to get event but still no joy i'll leave it till the next release on this one.

I mean to have a go at collected company and duskwatch too with the code you showed me once I get a transform trigger to fire for the others.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Previous

Return to Magarena

Who is online

Users browsing this forum: No registered users and 22 guests


Who is online

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

Login Form