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
by zerker2000 » 09 Jul 2009, 11:14
I am still in the process of tackling my to-make cardList , so here's what I've been working on:
First, Mutavault(I think I promised that to someone in card requests):
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));
}
- 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);
}
- 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
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
by 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.
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.
-
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
by 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 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
Re: Mutavault, Dragon Blood, Thran Dynamo
by zerker2000 » 09 Jul 2009, 23:19
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 aRob 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.
- Code: Select all
Lodestone
5
Artifact
no text
tap: add WUBRG
Untap:5
EDIT: It seems I was correct in remembering:
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.I wrote:(I think I promised that to someone in card requests)
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
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
by 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.
-
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
by zerker2000 » 10 Jul 2009, 06:32
Yes, sorry , 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 . Also, I ran a test on non-"tap:" mana abilities, and the following worked fine: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)
- 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
- Code: Select all
if(spell instanceof Ability_Tap)
- Code: Select all
if(spell.isTapAbility())
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
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
by 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.
-
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
by 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. )
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.
Rob, sorry to hear about your stay-cation. (Nice word though. )
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.
- 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
by zerker2000 » 10 Jul 2009, 20:12
Well, I Was born there, and they do have a (n allegedly) pretty good math summer camp that I'm going to .Rob Cashwalker wrote:Russia? Interesting vacation concept.
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
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
by 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
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).
I'm going to this dutch island called Terschelling tomorrow, so hopefully the weather will improve
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).
-
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
by Rob Cashwalker » 12 Jul 2009, 01:43
Are you/have you partaken of the spoils of Amsterdam?
The Force will be with you, Always.
-
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
by 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.
The "spoils of Amsterdam" usually just aren't that exciting to dutch people in general.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 25 guests