Sensei's Divining Top
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Sensei's Divining Top
by DennisBergkamp » 12 Oct 2008, 17:20
I made this card awhile ago... but since I've been busy with real life things lately, I haven't found much time to add that many new cards
So I figured, I might as well post this one for the people that know how to compile things!
In CardFactory.java:
So I figured, I might as well post this one for the people that know how to compile things!
In CardFactory.java:
- Code: Select all
//*************** START *********** START **************************
if(cardName.equals("Sensei's Divining Top"))
{
//ability2: Draw card, and put divining top on top of library
final SpellAbility ability2 = new Ability_Tap(card, "0")
{
public void resolve()
{
String player = card.getController();
String owner = card.getOwner();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, owner);
AllZone.GameAction.drawCard(player);
play.remove(card);
lib.add(card,0); //move divining top to top of library
card.untap();
}
public boolean canPlayAI()
{
return false;
}
public boolean canPlay()
{
if (AllZone.getZone(card).is(Constant.Zone.Play))
return true;
else
return false;
}//canPlay()
};//SpellAbility ability2
ability2.setBeforePayMana(new Input()
{
int check = -1;
public void showMessage()
{
AllZone.Stack.push(ability2);
stop();
}//showMessage()
});
//ability (rearrange top 3 cards) :
final SpellAbility ability1 = new Ability(card, "1")
{
public void resolve()
{
String player = card.getController();
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
if (lib.size() < 3)
return;
CardList topThree = new CardList();
//show top 3 cards:
topThree.add(lib.get(0));
topThree.add(lib.get(1));
topThree.add(lib.get(2));
Object o = AllZone.Display.getChoiceOptional("Put on top: ", topThree.toArray());
if(o != null)
{
Card c1 = (Card)o;
topThree.remove(c1);
lib.remove(c1);
lib.add(c1,0);
}
o = AllZone.Display.getChoiceOptional("Put second from top: ", topThree.toArray());
if(o != null)
{
Card c2 = (Card)o;
topThree.remove(c2);
lib.remove(c2);
lib.add(c2,1);
}
o = AllZone.Display.getChoiceOptional("Put third from top: ", topThree.toArray());
if(o != null)
{
Card c3 = (Card)o;
topThree.remove(c3);
lib.remove(c3);
lib.add(c3,2);
}
}
public boolean canPlayAI()
{
return false;
}
public boolean canPlay()
{
if (AllZone.getZone(card).is(Constant.Zone.Play))
return true;
else
return false;
}//canPlay()
};//SpellAbility ability1
ability1.setDescription("1: Look at the top three cards of your library, then put them back in any order.");
ability1.setStackDescription("Sensei's Divining Top - rearrange top 3 cards");
card.addSpellAbility(ability1);
ability1.setBeforePayMana(new Input_PayManaCost(ability1));
ability2.setDescription("tap: Draw a card, then put Sensei's Divining Top on top of its owner's library.");
ability2.setStackDescription("Sensei's Divining Top - draw a card, then put back on owner's library");
ability2.setBeforePayMana(new Input_NoCost_TapAbility((Ability_Tap) ability2));
card.addSpellAbility(ability2);
}
//*************** END ************ END **************************
- Code: Select all
Sensei's Divining Top
1
Artifact
no text
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Sensei's Divining Top
by Rob Cashwalker » 13 Oct 2008, 00:48
wow... that's amazing.
I recently just picked up my fourth Top, from a walmart promo re-pack... just in time for its banning.
I recently just picked up my fourth Top, from a walmart promo re-pack... just in time for its banning.
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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 175 guests