It is currently 19 Apr 2024, 20:10
   
Text Size

Mutavault, Dragon Blood, Thran Dynamo

Post MTG Forge Related Programming Questions Here

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

Mutavault, Dragon Blood, Thran Dynamo

Postby zerker2000 » 09 Jul 2009, 11:14

I am still in the process of tackling my to-make cardList :P, so here's what I've been working on:

First, Mutavault(I think I promised that to someone in card requests):
Code: Select all
if(cardName.equals("Mutavault"))
    {
      final Command eot1 = new Command()
      {
      private static final long serialVersionUID = 5106629534549783845L;

      public void execute()
        {
          Card c = card;

          c.setBaseAttack(0);
          c.setBaseDefense(0);
          c.removeIntrinsicKeyword("Changeling");
          c.removeType("Creature");
        }
      };

      final SpellAbility a1 = new Ability(card, "1")
      {
        public boolean canPlayAI()
        {
          return false;
        }
        public void resolve()
        {
          Card c = card;

          c.setBaseAttack(2);
          c.setBaseDefense(2);

          //to prevent like duplication like "Changeling Changeling Creature Creature"
          if(! c.getIntrinsicKeyword().contains("Changeling"))
          {
            c.addIntrinsicKeyword("Changeling");
            c.addType("Creature");
          }
          AllZone.EndOfTurn.addUntil(eot1);
        }
      };//SpellAbility

      card.clearSpellAbility();
      card.addSpellAbility(a1);
      a1.setDescription("1: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.");
      a1.setStackDescription(card +" becomes a 2/2 creature with changeling until EOT");

      Command paid1 = new Command() {
      private static final long serialVersionUID = -601119544294387668L;
      public void execute() {AllZone.Stack.add(a1);}
     };

      a1.setBeforePayMana(new Input_PayManaCost_Ability(a1.getManaCost(), paid1));

    }
Then, Dragon Blood(I'm not sure why it ended up on my TODO in the first place, but I made it anyways):
Code: Select all
if(cardName.equals("Dragon Blood"))
    {
       Ability_Tap ability = new Ability_Tap(card, "3")
       {
          /**
          *
          */
         private static final long serialVersionUID = 1L;
         public void resolve()
          {
             if(getTargetCard() != null && getTargetCard().isCreature())
                getTargetCard().addCounter(Counters.P1P1,1);
          }
          public boolean canPlayAI()
          {
             CardList list = new CardList(AllZone.Computer_Play.getCards());
             setTargetCard(CardFactoryUtil.AI_getBestCreature(list));
             return (getTargetCard() != null);
          }
       };
       ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability));
       ability.setDescription("3, T: Put a +1/+1 counter on target creature.");
       ability.setStackDescription(card+": put a +1/+1 counter on target Creature.");
       card.addSpellAbility(ability);
    }
And finally, Thran Dynamo and the rest of the cards.txt entries:
Code: Select all
Thran Dynamo
4
Artifact
no text
tap: add 3

Dragon Blood
3
Artifact
no text

Mutavault
no cost
Land
no text
tap: add 1
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby Rob Cashwalker » 09 Jul 2009, 11:57

With the current mana pool implementation Thran Dynamo needs the keyword:
tap: add 1 1 1

and it could only tap for 1 when directly paying for a cost.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby apthaven » 09 Jul 2009, 14:28

Wow. Thanks for the Mutavault.

I requested it along with the other bunch of cards in the request section.
"I am a man and real men do not consume pink beverages. Get thee gone woman, and bring me something brown." - Jace Wayland
apthaven
Tester
 
Posts: 242
Joined: 20 Jun 2009, 12:34
Has thanked: 0 time
Been thanked: 1 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby zerker2000 » 09 Jul 2009, 23:19

Rob Cashwalker wrote:With the current mana pool implementation Thran Dynamo needs the keyword:
tap: add 1 1 1

and it could only tap for 1 when directly paying for a cost.
Erm, isn't this the current mana pool implementation? I updated it a bit since then bug-wise, and can post what I have currently, but the old code should be able to tackle stuff like "7, tap: add 2WUBRG" (though I haven't checked the cost-paying part yet, I do know it handled without problem a
Code: Select all
Lodestone
5
Artifact
no text
tap: add WUBRG
Untap:5
, quoted exactly, that I made for Cromat testing ... and I posted the code as I had it After I made Cromat).

EDIT: It seems I was correct in remembering:
I wrote:(I think I promised that to someone in card requests)
It really didn't take long(copy Faerie conclave, change "1U" to "1", "Flying" to "Changeling", "Toughness(1)" to "Toughness(2)", "tap: add U" to "tap: add 1", and remove "Comes into play tapped"), I was just busy with mPool and mAbility stuff.
Last edited by zerker2000 on 09 Jul 2009, 23:30, edited 1 time in total.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby Rob Cashwalker » 09 Jul 2009, 23:28

"ERM", no, I don't think your overhaul is in the current release. The mana pool that is in there is still my implementation, which needed the mana defined like this: "tap: add 111" for 3 mana. (it reads each character and adds three mana keywords to the mana pool)
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby zerker2000 » 10 Jul 2009, 06:32

Rob Cashwalker wrote:"ERM", no, I don't think your overhaul is in the current release. The mana pool that is in there is still my implementation, which needed the mana defined like this: "tap: add 111" for 3 mana. (it reads each character and adds three mana keywords to the mana pool)
Yes, sorry :oops:, I got confused when Dennis said he put my one-click-mPool code in, however it seems the actual release doesn't have it. However, by the time these cards are included, it probably will :P. Also, I ran a test on non-"tap:" mana abilities, and the following worked fine:
Code: Select all
TEST Universal Powerstone
1
Artifact
no text
tap: add 1
2, tap: add 4
5, tap: add 9
10, tap: add WUBRG
Untap:1
, however the middle 3 abilities didn't tap it :o, which was due to Input_PayManaCost having
Code: Select all
if(spell instanceof Ability_Tap)
, which now has to be
Code: Select all
if(spell.isTapAbility())
(and honestly should have been that in the first place).
I have also caught some other bugs in/resulting from my code, and shall post my final version of ManaPool/Ability_Mana/modifications when I set off to Russia on the 17th (or whatever I have at a given moment on request).
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby Rob Cashwalker » 10 Jul 2009, 11:31

Russia? Interesting vacation concept.. I was supposed to be starting off for miami, florida today to visit friends and family along the way and my wife's grandpa in miami. But alas, her car needed a new engine and the warranty backed out of covering the repair after they told the mechanic to go ahead, so we got stuck with the bill. So it's a stay-cation for us - beach and zoo.... So expect a few more spell ability keywords from me this next week, starting with spPumpTgt.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby Mr.Chaos » 10 Jul 2009, 17:17

Zerker, enjoy Russia. Not exactly a common choice but definately an interesting one.
Rob, sorry to hear about your stay-cation. (Nice word though. :wink: )
I hope you will enjoy yourselfs anyway.
Ever since Dennis Bergkamp came back to Holland for his vacation, we've had nothing but rain and tunderstorms here.
But I am sure that is just a coincidence. :?
Apologies for going off topic.
](*,) = coder at work, according to a coder.It does explain some of the bugs. :wink:
Mr.Chaos
Tester
 
Posts: 625
Joined: 06 Sep 2008, 08:15
Has thanked: 0 time
Been thanked: 0 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby zerker2000 » 10 Jul 2009, 20:12

Rob Cashwalker wrote:Russia? Interesting vacation concept.
Well, I Was born there, and they do have a (n allegedly) pretty good math summer camp that I'm going to :P.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby DennisBergkamp » 11 Jul 2009, 22:37

Actually, the first week here was pretty nice (sunny almost everyday). But true, this last week has been pretty crappy :)
I'm going to this dutch island called Terschelling tomorrow, so hopefully the weather will improve [-o<

I also hope you guys will have nice vacations (or stay-cations!). I'll try to fix some bugs and merge some code submissions while I'm there (I'm pretty sure I'll have internet there).
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby Rob Cashwalker » 12 Jul 2009, 01:43

Are you/have you partaken of the spoils of Amsterdam?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Mutavault, Dragon Blood, Thran Dynamo

Postby DennisBergkamp » 14 Jul 2009, 21:13

Not yet, and probably won't :)
The "spoils of Amsterdam" usually just aren't that exciting to dutch people in general.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 86 guests


Who is online

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

Login Form