Bug reports
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Re: Bug reports
by melvin » 26 Sep 2013, 08:18
The new rule could be useful in certain situations, such as replenishing the loyalty counters on a planeswalker. In your cause, what was the difference between the sacrificed legend and the one kept on the field?
-
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 hong yie » 26 Sep 2013, 09:08
the sacrificed legend has many empowering auras on it. the one kept on the field is a fresh legend creature. making it much weaker an lose the game beaten by my token creatures. the game might get much more interesting if that legend stay on battlefield to block my tokens or even counterattack me.melvin wrote:The new rule could be useful in certain situations, such as replenishing the loyalty counters on a planeswalker. In your cause, what was the difference between the sacrificed legend and the one kept on the field?
-
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 sponeta » 08 Oct 2013, 18:14
Computer attacked with Gideon's Avenger enchanted with Mammoth Umbra. I blocked with Tangle Asp. After combat, Tangle Asp was killed and Mammoth Umbra was destroyed, but Gideon's Avenger stayed alive. All good so far. But at the end of the computer's turn, Gideon's Avenger got destroyed. Log just said "Gideon's Avenger is destroyed" without mentioning the source.
Shorecrasher Mimic's ability does not trigger. Tried casting Slippery Bogle and Trygon Predator, but neither worked. Did not test with other Mimics.
I cast Reanimate on Phantasmal Image, but it did not offer to copy a creature, and was instead destroyed right away.
Primeval Titan allows you to search only for basic land cards, even though the card text does not specify "basic".
Game crashed after Grazing Gladehart's ability triggered:
Then an AI issue: I created a new green deck with lots of land searching cards and huge creatures. It seems pretty awesome (big thanks for the new cards and abilities, I'm having fun!), but the AI seems to have a lot of trouble playing against it. I've played games with Vegas and Monte Carlo (both cheating and non-cheating versions), and it seems that the AI makes poor choices much more often than against other decks, at the same AI level. For example, when the AI can play a spell that destroys a creature, very often it chooses a weak weenie even though I also have some big creature that will kill the AI on the next turn. It's also pretty common to see the AI attacking with a single weenie without any hope of destroying my blockers and without having any instants that could make a turnabout. Maybe it's just the amount of land cards in play that's too taxing to process. I have a pretty powerful quad-core computer though. I don't really have logs of specific examples, but playing a few games should make the issues evident. Also, a couple of times using the Vegas AI, the game has started consuming so much CPU that the graphics update slows down considerably. In one game with Monte Carlo, the spinning icon kept spinning but the game never went forward. It seems interesting that I've never had these issues with other decks, and I've played a lot, so there must be something weird about this particular deck.
To play the deck, concentrate on getting as much land out as possible, ignoring the opponent. All creatures except Grazing Gladehart are expendable as chump blockers early on. Or you can simply let attackers through, because Gladeharts, Bountiful Harvest and Pelakka Wurm will keep you alive long enough. Note: Yavimaya Hollow is useful, but playing it loses the convenience of having the game auto-tap your lands.
Shorecrasher Mimic's ability does not trigger. Tried casting Slippery Bogle and Trygon Predator, but neither worked. Did not test with other Mimics.
I cast Reanimate on Phantasmal Image, but it did not offer to copy a creature, and was instead destroyed right away.
Primeval Titan allows you to search only for basic land cards, even though the card text does not specify "basic".
Game crashed after Grazing Gladehart's ability triggered:
crash1.zip
- (4.47 KiB) Downloaded 208 times
Then an AI issue: I created a new green deck with lots of land searching cards and huge creatures. It seems pretty awesome (big thanks for the new cards and abilities, I'm having fun!), but the AI seems to have a lot of trouble playing against it. I've played games with Vegas and Monte Carlo (both cheating and non-cheating versions), and it seems that the AI makes poor choices much more often than against other decks, at the same AI level. For example, when the AI can play a spell that destroys a creature, very often it chooses a weak weenie even though I also have some big creature that will kill the AI on the next turn. It's also pretty common to see the AI attacking with a single weenie without any hope of destroying my blockers and without having any instants that could make a turnabout. Maybe it's just the amount of land cards in play that's too taxing to process. I have a pretty powerful quad-core computer though. I don't really have logs of specific examples, but playing a few games should make the issues evident. Also, a couple of times using the Vegas AI, the game has started consuming so much CPU that the graphics update slows down considerably. In one game with Monte Carlo, the spinning icon kept spinning but the game never went forward. It seems interesting that I've never had these issues with other decks, and I've played a lot, so there must be something weird about this particular deck.
To play the deck, concentrate on getting as much land out as possible, ignoring the opponent. All creatures except Grazing Gladehart are expendable as chump blockers early on. Or you can simply let attackers through, because Gladeharts, Bountiful Harvest and Pelakka Wurm will keep you alive long enough. Note: Yavimaya Hollow is useful, but playing it loses the convenience of having the game auto-tap your lands.

TEST_Lord_of_Land.dec
- (450 Bytes) Downloaded 213 times
Re: Bug reports
by hong yie » 10 Oct 2013, 01:05
Thank's for the report. Fixed Primeval Titan's script.Primeval Titan allows you to search only for basic land cards, even though the card text does not specify "basic".

Primeval_Titan.groovy
- Code: Select all
def EventAction = {
final MagicGame game, final MagicEvent event ->
final MagicEvent search = new MagicSearchOntoBattlefieldEvent(
event,
new MagicMayChoice(
"Search for a land card?",
MagicTargetChoice.LAND_CARD_FROM_LIBRARY
),
MagicPlayMod.TAPPED
);
game.addEvent(search);
game.addEvent(search);
} as MagicEventAction;
def Event = {
final MagicPermanent permanent ->
return new MagicEvent(
permanent,
EventAction,
"PN may search his or her library for up to two land cards and put them onto the battlefield tapped, then shuffle his or her library."
);
};
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPayedCost payedCost) {
return Event(permanent);
}
},
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent == creature) ? Event(permanent) : MagicEvent.NONE;
}
}
]
-
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 sponeta » 22 Oct 2013, 20:40
Using the ability of Bosh, Iron Golem taps the card, even though the cost on the card text is 3R (no tapping needed).
Having Valakut, the Molten Pinnacle in hand causes a crash:
Exception from controller.runGame: Unable to find target
java.lang.RuntimeException: Unable to find target
at magic.model.event.MagicEvent.getTarget(MagicEvent.java:432)
at magic.model.event.MagicEvent.getLegalTarget(MagicEvent.java:503)
at magic.model.event.MagicEvent.processTarget(MagicEvent.java:512)
at Valakut__the_Molten_Pinnacle$1.executeEvent(Valakut__the_Molten_Pinnacle.groovy:24)
at magic.model.event.MagicEvent.executeEvent(MagicEvent.java:606)
at magic.model.MagicGame.executeEvent(MagicGame.java:734)
at magic.model.stack.MagicItemOnStack.resolve(MagicItemOnStack.java:139)
at magic.model.action.MagicStackResolveAction.doAction(MagicStackResolveAction.java:13)
at magic.model.MagicGame.doAction(MagicGame.java:530)
at magic.model.phase.MagicPhase.executePhase(MagicPhase.java:43)
at magic.model.MagicGame.executePhase(MagicGame.java:429)
at magic.ai.MCTSAI.getNextChoices(MCTSAI.java:376)
at magic.ai.MCTSAI.randomPlay(MCTSAI.java:347)
at magic.ai.MCTSAI.findNextEventChoiceResults(MCTSAI.java:161)
at magic.ui.GameController.getArtificialNextEventChoiceResults(GameController.java:412)
at magic.ui.GameController.executeNextEventWithChoices(GameController.java:431)
at magic.ui.GameController.runGame(GameController.java:526)
at magic.ui.GamePanel$10.run(GamePanel.java:242)
Having Valakut, the Molten Pinnacle in hand causes a crash:
Exception from controller.runGame: Unable to find target
java.lang.RuntimeException: Unable to find target
at magic.model.event.MagicEvent.getTarget(MagicEvent.java:432)
at magic.model.event.MagicEvent.getLegalTarget(MagicEvent.java:503)
at magic.model.event.MagicEvent.processTarget(MagicEvent.java:512)
at Valakut__the_Molten_Pinnacle$1.executeEvent(Valakut__the_Molten_Pinnacle.groovy:24)
at magic.model.event.MagicEvent.executeEvent(MagicEvent.java:606)
at magic.model.MagicGame.executeEvent(MagicGame.java:734)
at magic.model.stack.MagicItemOnStack.resolve(MagicItemOnStack.java:139)
at magic.model.action.MagicStackResolveAction.doAction(MagicStackResolveAction.java:13)
at magic.model.MagicGame.doAction(MagicGame.java:530)
at magic.model.phase.MagicPhase.executePhase(MagicPhase.java:43)
at magic.model.MagicGame.executePhase(MagicGame.java:429)
at magic.ai.MCTSAI.getNextChoices(MCTSAI.java:376)
at magic.ai.MCTSAI.randomPlay(MCTSAI.java:347)
at magic.ai.MCTSAI.findNextEventChoiceResults(MCTSAI.java:161)
at magic.ui.GameController.getArtificialNextEventChoiceResults(GameController.java:412)
at magic.ui.GameController.executeNextEventWithChoices(GameController.java:431)
at magic.ui.GameController.runGame(GameController.java:526)
at magic.ui.GamePanel$10.run(GamePanel.java:242)
Re: Bug reports
by melvin » 23 Oct 2013, 02:20
@sponeta: thanks for the bug reports.
Bosh, Iron Golem has an additional tap in its cost, removed it.
Valakut, the Molten Pinnacle was not checking for the case where player chose no for the optional action. Added the check for result of may.
Bosh, Iron Golem has an additional tap in its cost, removed it.
Valakut, the Molten Pinnacle was not checking for the case where player chose no for the optional action. Added the check for result of may.
-
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 jerichopumpkin » 23 Oct 2013, 10:04
melvin wrote:Bosh, Iron Golem has an additional tap in its cost, removed it.

I've noticed that I've made the same exact mistake scripting Minotaur Illusionist, which I've already submitted.
Here is the corrected version of Minotaur_Illusionist.groovy
- Code: Select all
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Damage"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{R}"),
new MagicSacrificeEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_CREATURE,
new MagicDamageTargetPicker(source.getPower()),
this,
"SN deals damage equal to its power to target creature\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,event.getPermanent().getPower());
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]
- jerichopumpkin
- Posts: 212
- Joined: 12 Sep 2013, 11:21
- Has thanked: 19 times
- Been thanked: 13 times
Re: Bug reports
by melvin » 23 Oct 2013, 12:30
I've fixed Minotaur Illusionist when merging. I usually do a quick review when merging to double check and fix some of the problems.
-
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 ember hauler » 25 Oct 2013, 16:51
It seems that Umezawa's Jitte +2/+2 ability can be played even if it's not attached to the creature, at least by AI:
- Code: Select all
MCTS cheat=true index=1 life=13 time=2026 sims=109
[2/54/?] (pass)
* [2/55/?] (Umezawa's Jitte)
LOG (C): Remove a charge counter from Umezawa's Jitte. Play activated ability of Umezawa's Jitte.
LOG (C): MagicPermanent.NONE gets +2/+2 until end of turn.
- ember hauler
- Posts: 79
- Joined: 14 Aug 2013, 08:13
- Has thanked: 27 times
- Been thanked: 14 times
Re: Bug reports
by melvin » 26 Oct 2013, 00:55
Thanks for catching this. It is available to the player as well, due to a missing condition in the definition of the ability. Fixed inember hauler wrote:It seems that Umezawa's Jitte +2/+2 ability can be played even if it's not attached to the creature, at least by AI
https://code.google.com/p/magarena/sour ... 90b5acf581
-
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 hong yie » 27 Oct 2013, 15:51
there's something wrong with Dwarven Driller's script. When i choose to target opponent's land, i was given a choice to choose 2 damage or lose a land, i thought the opponent should make this decision, not me.
-
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 » 28 Oct 2013, 05:57
Thanks for catching this, fixed in https://code.google.com/p/magarena/sour ... 5366eb91a6hong yie wrote:there's something wrong with Dwarven Driller's script. When i choose to target opponent's land, i was given a choice to choose 2 damage or lose a land, i thought the opponent should make this decision, not me.
-
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 jerichopumpkin » 29 Oct 2013, 11:02
I've noticed that Diabolic Edict was using Cruel Edict groovy code, but the first targets a player, so you can use it on yourself, so I rectified it:

Diabolic_Edict.txt

Diabolic_Edict.txt
- Code: Select all
name=Diabolic Edict
url=http://magiccards.info/tp/en/22.html
image=http://magiccards.info/scans/en/tp/22.jpg
value=4.603
removal=3
rarity=C
type=Instant
cost={1}{B}
timing=removal
requires_groovy_code
- Code: Select all
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
"Target player\$ sacrifices a creature."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.addEvent(new MagicSacrificePermanentEvent(
event.getSource(),
player,
MagicTargetChoice.SACRIFICE_CREATURE
));
}
});
}
}
]
- jerichopumpkin
- Posts: 212
- Joined: 12 Sep 2013, 11:21
- Has thanked: 19 times
- Been thanked: 13 times
Re: Bug reports
by melvin » 29 Oct 2013, 12:27
I was expecting a bug report but got a fix instead, yeah! Committed the fix as https://code.google.com/p/magarena/sour ... 9ba872396d
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Who is online
Users browsing this forum: No registered users and 4 guests