Starting out with a few cards missing from my Krenko EDH
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
Starting out with a few cards missing from my Krenko EDH
by BursegSardaukar » 13 Sep 2015, 06:29
I just found out about you guys' software this week, and am quickly falling in love. During the construction of my Krenko EDH deck, I found a few cards missing, and figured I'd take a crack at them. I started implementation on a couple cards, specifically Goblin Wizard and Magewright's Stone.
Wizard was pretty straightforward, I duplicated the triggered ability from Goblin Lackey, and made it an activated one. Can't seem to find its card number in The Dark set, though.
Magewright is another beast entirely. As far as I could find in other cards, there was no way to filter for a creature with a specific activated ability cost. I made a hack within the AbilityPredicate class that "works," but certainly isn't the solution.
Wizard was pretty straightforward, I duplicated the triggered ability from Goblin Lackey, and made it an activated one. Can't seem to find its card number in The Dark set, though.
Magewright is another beast entirely. As far as I could find in other cards, there was no way to filter for a creature with a specific activated ability cost. I made a hack within the AbilityPredicate class that "works," but certainly isn't the solution.
- Code: Select all
@Override
public boolean apply(MageObject input, Game game) {
Abilities<Ability> abilities;
if (input instanceof Card){
abilities = ((Card)input).getAbilities(game);
} else {
abilities = input.getAbilities();
}
for (Ability ability : abilities) {
if (abilityClass.equals(ability.getClass())) {
//Burseg Hack: Magewright's Stone [DIS] specifically looks for activated ability containing {T}
//As of 9/13/2015, no other AbilityPredicate is filtering for SimpleActivatedAbility
if (abilityClass.equals(SimpleActivatedAbility.class) && ability.getCosts().size() > 0){
for (Cost cost : ability.getCosts()) {
if (cost instanceof TapSourceCost) {
return true;
}
}
return false;
} else {
return true;
}
}
}
return false;
}
- BursegSardaukar
- Posts: 2
- Joined: 13 Sep 2015, 06:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Starting out with a few cards missing from my Krenko EDH
by LoneFox » 13 Sep 2015, 06:58
XMage uses card numbering from magiccards.info for cards that don't have official card number. For Goblin Wizard it is 68. The gen-card.pl script should handle this automatically, but there are some errors in its database.BursegSardaukar wrote:Wizard was pretty straightforward, I duplicated the triggered ability from Goblin Lackey, and made it an activated one. Can't seem to find its card number in The Dark set, though.
Not all activated abilities are SimpleActivatedAbilities. I believe that instead of that AbilityClass thingMagewright is another beast entirely. As far as I could find in other cards, there was no way to filter for a creature with a specific activated ability cost. I made a hack within the AbilityPredicate class that "works," but certainly isn't the solution.I was unable to find any other filter that was searching for SimpleActivatedAbiity, so this hack is literally only for the Magewright stone. Let me know what the proper solution for this would be.
- Code: Select all
@Override
public boolean apply(MageObject input, Game game) {
Abilities<Ability> abilities;
if (input instanceof Card){
abilities = ((Card)input).getAbilities(game);
} else {
abilities = input.getAbilities();
}
for (Ability ability : abilities) {
if (abilityClass.equals(ability.getClass())) {
//Burseg Hack: Magewright's Stone [DIS] specifically looks for activated ability containing {T}
//As of 9/13/2015, no other AbilityPredicate is filtering for SimpleActivatedAbility
if (abilityClass.equals(SimpleActivatedAbility.class) && ability.getCosts().size() > 0){
for (Cost cost : ability.getCosts()) {
if (cost instanceof TapSourceCost) {
return true;
}
}
return false;
} else {
return true;
}
}
}
return false;
}
- Code: Select all
if(ability instanceof ActivatedAbilityImpl)
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests