Bug reports
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Re: Bug reports
by jerichopumpkin » 25 Feb 2014, 19:44
catched a bug on Rhystic Study: if opponent does not pay, it forces you to draw the card, but that should be optional
- jerichopumpkin
- Posts: 212
- Joined: 12 Sep 2013, 11:21
- Has thanked: 19 times
- Been thanked: 13 times
Re: Bug reports
by ShawnieBoy » 26 Feb 2014, 02:56
Good find - I've submitted a fix, but here it is too: - It's not pretty, but it works
- Code: Select all
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return permanent.isEnemy(cardOnStack) ?
new MagicEvent(
permanent,
cardOnStack.getController(),
new MagicMayChoice(
"Pay {1}?",
new MagicPayManaCostChoice(MagicManaCost.create("{1}"))
),
this,
"PN may\$ pay {1}\$. If PN doesn't, "+permanent.getController().toString()+" may draw a card."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isNo()) {
final MagicPermanent enchantment = event.getPermanent();
game.addEvent(new MagicEvent(
enchantment,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.DRAW_CARDS,
1,
MagicSimpleMayChoice.DEFAULT_YES
),
{
final MagicGame G, final MagicEvent E ->
if (E.isYes()) {
G.doAction(new MagicDrawAction(E.getPermanent().getController()));
}
},
enchantment.getController().toString()+" may\$ Draw a card."
));
game.doAction(new MagicDrawAction(event.getPermanent().getController()));
}
}
}
]
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Bug reports
by melvin » 26 Feb 2014, 03:32
A simpler version using MagicRuleEventAction,
- Code: Select all
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return permanent.isEnemy(cardOnStack) ?
new MagicEvent(
permanent,
cardOnStack.getController(),
new MagicMayChoice(
"Pay {1}?",
new MagicPayManaCostChoice(MagicManaCost.create("{1}"))
),
permanent.getController(),
this,
"PN may\$ pay {1}\$. If PN doesn't, RN may draw a card."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isNo()) {
game.addEvent(MagicRuleEventAction.create("PN may draw a card.").getEvent(event.getSource()));
}
}
}
]
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
-
muaddib - Tester
- Posts: 118
- Joined: 03 Mar 2011, 08:37
- Location: Russia
- Has thanked: 0 time
- Been thanked: 5 times
Re: Bug reports
by hong yie » 01 Mar 2014, 16:59
2_1_white_Cleric_enchantment_creature_token.txt use wrong picture
- Code: Select all
name=2/1 white Cleric enchantment creature token
token=Cleric
image=http://magiccards.info/extras/token/theros/satyr.jpg
value=2
type=Enchantment,Creature
subtype=Cleric
color=u
cost={0}
pt=2/1
- Code: Select all
name=2/1 white Cleric enchantment creature token
token=Cleric
image=http://magiccards.info/extras/token/theros/cleric.jpg
value=2
type=Enchantment,Creature
subtype=Cleric
color=u
cost={0}
pt=2/1
-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Bug reports
by hong yie » 02 Mar 2014, 07:04
sorry, just notice another mistake,
still from the cleric token
2_1_white_Cleric_enchantment_creature_token.txt
still from the cleric token
2_1_white_Cleric_enchantment_creature_token.txt
- Code: Select all
name=2/1 white Cleric enchantment creature token
token=Cleric
image=http://magiccards.info/extras/token/theros/satyr.jpg
value=2
type=Enchantment,Creature
subtype=Cleric
color=u
cost={0}
pt=2/1
- Code: Select all
name=2/1 white Cleric enchantment creature token
token=Cleric
image=http://magiccards.info/extras/token/theros/satyr.jpg
value=2
type=Enchantment,Creature
subtype=Cleric
color=W
cost={0}
pt=2/1
-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
Re: Bug reports
by ShawnieBoy » 02 Mar 2014, 07:44
Thanks again - God knows what my brain was doing when I did that!
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Bug reports
by hong yie » 02 Mar 2014, 13:11
God knows what my brain was doing when i missed the color propertyShawnieBoy wrote:Thanks again - God knows what my brain was doing when I did that!
-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
Re: Bug reports
by hong yie » 02 Mar 2014, 17:45
i have ajani's chosen, i cast an enchant land aura.
the aura triggers a cat token, than a question showed, "attach enchant land to cat"
i think this trigger should be limited only to enchant creature aura.
the aura triggers a cat token, than a question showed, "attach enchant land to cat"
i think this trigger should be limited only to enchant creature aura.

-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
Re: Bug reports
by ShawnieBoy » 02 Mar 2014, 17:53
Uhm, actually - looking at the card, it's kinda doing what it should. Strangely enough, attaching an aura is different from casting onto a target. Just trying to find some rules about Auras being attached to permanents.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Bug reports
by ShawnieBoy » 02 Mar 2014, 18:16
Here's the most relevant part:
I'd say keep the prompt there - It's possible that the cat token could be a land, (or artifact etc.) when it comes into play, so an 'enchant land', 'enchant artifact' etc would need to still trigger. There's also lots of Auras which can target creatures which aren't 'enchant creature' - Aggression, Animate Wall, Armor of Thorns, Artifact Possession, Confiscate, Controlled Instincts etc.
I know it seems weird, but I guess that's why the card doesn't specify 'If that enchantment is an Aura with "enchant creature"'.
303.4i If an effect attempts to attach an Aura on the battlefield to an object or player, that object or
player must be able to be enchanted by it. If the object or player can’t be, the Aura doesn’t
move.
So even if you choose 'Yes' to move the enchant land to the cat, it should stay where it is; not move, then fall off and go to the graveyard.303.4. Some enchantments have the subtype “Aura.” An Aura enters the battlefield attached to an
object or player. What an Aura can be attached to is defined by its enchant keyword ability (see rule
702.5, “Enchant”). Other effects can limit what a permanent can be enchanted by.
303.4a An Aura spell requires a target, which is defined by its enchant ability.
I'd say keep the prompt there - It's possible that the cat token could be a land, (or artifact etc.) when it comes into play, so an 'enchant land', 'enchant artifact' etc would need to still trigger. There's also lots of Auras which can target creatures which aren't 'enchant creature' - Aggression, Animate Wall, Armor of Thorns, Artifact Possession, Confiscate, Controlled Instincts etc.
I know it seems weird, but I guess that's why the card doesn't specify 'If that enchantment is an Aura with "enchant creature"'.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Bug reports
by hong yie » 03 Mar 2014, 03:08
i tried click yes, and the enchantment did jump to the cat & fall off, i lost an enchant land, so i click "undo" (remedy to almost all problem) and try click "NO" (obviously).So even if you choose 'Yes' to move the enchant land to the cat, it should stay where it is; not move, then fall off and go to the graveyard.
I'd say keep the prompt there - It's possible that the cat token could be a land, (or artifact etc.) when it comes into play, so an 'enchant land', 'enchant artifact' etc would need to still trigger. There's also lots of Auras which can target creatures which aren't 'enchant creature' - Aggression, Animate Wall, Armor of Thorns, Artifact Possession, Confiscate, Controlled Instincts etc.
I know it seems weird, but I guess that's why the card doesn't specify 'If that enchantment is an Aura with "enchant creature"'.

-
hong yie - Programmer
- Posts: 216
- Joined: 10 Mar 2013, 06:44
- Location: Jakarta
- Has thanked: 75 times
- Been thanked: 9 times
Re: Bug reports
by melvin » 03 Mar 2014, 11:51
That's a bug, we're not following rule 303.4i. I've just made a fix so we check the legality of an attachment before actually moving the enchantment, if it is not legal, nothing happens if you select yes.hong yie wrote:i tried click yes, and the enchantment did jump to the cat & fall off, i lost an enchant land, so i click "undo" (remedy to almost all problem) and try click "NO" (obviously).
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Bug reports
by muaddib » 04 Mar 2014, 10:24
When Mournful Zombie activate his ability doesn't cause him to tap.
-
muaddib - Tester
- Posts: 118
- Joined: 03 Mar 2011, 08:37
- Location: Russia
- Has thanked: 0 time
- Been thanked: 5 times
Who is online
Users browsing this forum: No registered users and 2 guests