It is currently 18 Jul 2025, 21:36
   
Text Size

Bug reports

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Re: Bug reports

Postby 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

Postby 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()));
            }
        }
    }
]
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Bug reports

Postby 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()));
            }
        }
    }
]
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Bug reports

Postby muaddib » 28 Feb 2014, 08:41

Viscid Lemures infinitely activate his ablility.
Attachments
scr5.png
User avatar
muaddib
Tester
 
Posts: 118
Joined: 03 Mar 2011, 08:37
Location: Russia
Has thanked: 0 time
Been thanked: 5 times

Re: Bug reports

Postby 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
2_1_white_Cleric_enchantment_creature_token.txt Updated
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
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Bug reports

Postby ShawnieBoy » 01 Mar 2014, 18:35

Thanks for that - fix submitted :)
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Bug reports

Postby 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
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
Updated color property
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
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Bug reports

Postby ShawnieBoy » 02 Mar 2014, 07:44

Thanks again - God knows what my brain was doing when I did that!
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Bug reports

Postby hong yie » 02 Mar 2014, 13:11

ShawnieBoy wrote:Thanks again - God knows what my brain was doing when I did that!
God knows what my brain was doing when i missed the color property
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Bug reports

Postby 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. :)
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Bug reports

Postby 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.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Bug reports

Postby ShawnieBoy » 02 Mar 2014, 18:16

Here's the most relevant part:
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.
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.
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"'.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Bug reports

Postby hong yie » 03 Mar 2014, 03:08

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"'.
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). :)
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Bug reports

Postby melvin » 03 Mar 2014, 11:51

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). :)
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.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Bug reports

Postby muaddib » 04 Mar 2014, 10:24

When Mournful Zombie activate his ability doesn't cause him to tap.
User avatar
muaddib
Tester
 
Posts: 118
Joined: 03 Mar 2011, 08:37
Location: Russia
Has thanked: 0 time
Been thanked: 5 times

PreviousNext

Return to Magarena

Who is online

Users browsing this forum: No registered users and 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 3 guests

Login Form