Zur The Enchanter
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Zur The Enchanter
by GandoTheBard » 22 Oct 2008, 18:20
This card has several bugs.
1) It shows you a list of enchantments, not your deck. And I suspect if you have one enchantment card in your deck you dont even see that.
2) If you choose an enchantment aura the aura targets nothing.
3) if you have a Shadowmage Infiltrator attacking at the same time Zur's ability triggers twice.
1) It shows you a list of enchantments, not your deck. And I suspect if you have one enchantment card in your deck you dont even see that.
2) If you choose an enchantment aura the aura targets nothing.
3) if you have a Shadowmage Infiltrator attacking at the same time Zur's ability triggers twice.
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Zur The Enchanter
by DennisBergkamp » 22 Oct 2008, 18:56
Whoa, I'll look into those. Especially the Shadowmage Infiltrator bug seems strange.
Thanks for pointing them out
EDIT: It's not just Shadowmage Infiltrator that causes it to trigger twice, but any other creature that gets added as an attacker after Zur the Enchanter attacks. I'll fix this. The same problem occurs with Yore-Tiller Nephilim. I have to put a variable in the Card.java class that keeps track of whether a "trigger on attack" has already happened or not, then reset it next turn.
Thanks for pointing them out
EDIT: It's not just Shadowmage Infiltrator that causes it to trigger twice, but any other creature that gets added as an attacker after Zur the Enchanter attacks. I'll fix this. The same problem occurs with Yore-Tiller Nephilim. I have to put a variable in the Card.java class that keeps track of whether a "trigger on attack" has already happened or not, then reset it next turn.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Zur The Enchanter
by GandoTheBard » 22 Oct 2008, 20:12
When you do fix it post the fixed exe or jar file please oh and might as well include your version of cards.txt
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Zur The Enchanter
by DennisBergkamp » 22 Oct 2008, 20:46
I fixed #3, I'll look into #2... by the way, which auras did you have problems with?
#1 I could do several ways: either just show the whole library and whenever a non-enchantment card is picked, nothing happens. Or first show the whole library, then when the user clicks ok, I'll show a new list with enchantments cheaper or equal to a converted manacost of 3. What do you guys think?
I haven't been able to create JARs / executables yet... it generates a million warnings whenever I try compiling any of the source. I'm only able to just run directly from Eclipse.
I think jpb managed to compile his stuff and create a JAR file, maybe I'll gather all the updates posted here since 10-18, add everything into one big new version and either submit it to him, or try my luck creating a JAR again.
#1 I could do several ways: either just show the whole library and whenever a non-enchantment card is picked, nothing happens. Or first show the whole library, then when the user clicks ok, I'll show a new list with enchantments cheaper or equal to a converted manacost of 3. What do you guys think?
I haven't been able to create JARs / executables yet... it generates a million warnings whenever I try compiling any of the source. I'm only able to just run directly from Eclipse.
I think jpb managed to compile his stuff and create a JAR file, maybe I'll gather all the updates posted here since 10-18, add everything into one big new version and either submit it to him, or try my luck creating a JAR again.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Zur The Enchanter
by GandoTheBard » 22 Oct 2008, 21:32
the "Aura" I had a problem with is Oblivion Ring which is really not an Aura I guess but it acts like one in some ways. Though am certain I would have this problem with any aura or enchantment with targets.
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Zur The Enchanter
by DennisBergkamp » 23 Oct 2008, 14:40
I'm not 100% sure about this, but it looks like Oblivion Ring is the culprit in this case. I looked a bit at the code for it, and the way it works is that it wants you to select a target before paying the manacost.
What it really should do is let you select a target as it's coming into play. If that's how it was implemented, then it would trigger on Zur the Enchanter attacking.
What it really should do is let you select a target as it's coming into play. If that's how it was implemented, then it would trigger on Zur the Enchanter attacking.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Zur The Enchanter
by DennisBergkamp » 26 Oct 2008, 17:53
Here's the fix #3 for creatures attacking after Zur the Enchanter, oh and it also adds Yore-Tiller Nephilim:
In Card.java:
In Card.java:
- Code: Select all
private boolean creatureAttackedThisTurn = false;
public void setCreatureAttackedThisTurn(boolean b) { creatureAttackedThisTurn = b; }
public boolean getCreatureAttackedThisTurn() { return creatureAttackedThisTurn; }
- Code: Select all
private static void checkDeclareAttackers(Card c) //this method checks triggered effects of attacking creatures, right before defending player declares blockers
{
if (AllZone.Phase.getPhase().equals("Declare Attackers"))
{
if(c.getName().equals("Zur the Enchanter") && !c.getCreatureAttackedThisTurn())
{
PlayerZone library = AllZone.getZone(Constant.Zone.Library, c.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
CardList enchantments = new CardList(library.getCards());
enchantments = enchantments.getType("Enchantment");
if (enchantments.size() > 0) {
for(int i=0;i < enchantments.size();i++)
{
Card c1 = enchantments.get(i);
if (CardUtil.getConvertedManaCost(c1.getManaCost()) > 3)
enchantments.remove(c1); // get rid of all enchantments with a converted manacost higher than 3
}
if (c.getController().equals("Human"))
{
Object o = AllZone.Display.getChoiceOptional("Pick an enchantment to put into play", enchantments.toArray());
if(o != null)
{
library.remove(o);
play.add((Card)o);
AllZone.GameAction.shuffle(c.getController());
//we have to have cards like glorious anthem take effect immediately:
GameActionUtil.executeCardStateEffects();
}
}
else if (c.getController().equals("Computer"))
{
Card card = enchantments.get(0);
library.remove(card);
play.add(card);
AllZone.GameAction.shuffle(c.getController());
//we have to have cards like glorious anthem take effect immediately:
GameActionUtil.executeCardStateEffects();
}
} //enchantments.size > 0
c.setCreatureAttackedThisTurn(true);
}//Zur the enchanter
else if(c.getName().equals("Yore-Tiller Nephilim") && !c.getCreatureAttackedThisTurn())
{
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, c.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
CardList creatures = new CardList(grave.getCards());
creatures = creatures.getType("Creature");
if (creatures.size() > 0) {
if (c.getController().equals("Human"))
{
Object o = AllZone.Display.getChoiceOptional("Pick a creature to put into play", creatures.toArray());
if(o != null)
{
Card card = (Card)o;
grave.remove(card);
play.add(card);
card.tap();
AllZone.Combat.addAttacker(card);
//the card that gets put into play tapped and attacking might trigger another ability:
checkDeclareAttackers(card);
}
}
else if (c.getController().equals("Computer"))
{
Card card = creatures.get(0);
grave.remove(card);
play.add(card);
card.tap();
AllZone.Combat.addAttacker(card);
checkDeclareAttackers(card);
}
} //if (creatures.size() > 0)
c.setCreatureAttackedThisTurn(true);
}//Yore-Tiller Nephilim
}
}//checkDeclareAttackers
- Code: Select all
Yore-Tiller Nephilim
W U B R
Creature Nephilim
Whenever Yore-Tiller Nephilim attacks, return target creature card from your graveyard to play tapped and attacking.
2/2
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 181 guests