It is currently 30 Oct 2025, 00:29
   
Text Size

Ability_Cost discussion

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Re: Ability_Cost discussion

Postby friarsol » 28 Sep 2010, 17:38

I must have just skipped the file when I was committing. Make sure it's fine with 2375.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Ability_Cost discussion

Postby DennisBergkamp » 28 Sep 2010, 17:40

Yup, works great now! Thanks :mrgreen:
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Ability_Cost discussion

Postby DennisBergkamp » 28 Sep 2010, 18:27

I'm just trying to commit Wurmcoil Engine, but the SVN seems to have some trouble... anyone else have the same problem?

Code: Select all
General filesystem error
svn: Commit failed (details follow):
svn: MERGE request failed on '/svn/src'
svn: Commit failed unexpectedly --- please try again later (9)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Ability_Cost discussion

Postby friarsol » 28 Sep 2010, 18:52

DennisBergkamp wrote:I'm just trying to commit Wurmcoil Engine, but the SVN seems to have some trouble... anyone else have the same problem?

Code: Select all
General filesystem error
svn: Commit failed (details follow):
svn: MERGE request failed on '/svn/src'
svn: Commit failed unexpectedly --- please try again later (9)
Yea I'm getting the same thing. Must be down right now.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Ability_Cost discussion

Postby Sloth » 03 Oct 2010, 19:32

I tested some cards that have a cost of tapping creatures today and found this bug:

When I cancel the ability the game doesn't work as normal: When The computer wants to play a spell, taps its mana sources, a message appears in the top left saying that an error may have occured. Starting a game after that causes my Moxen not to appear on the battlefield when cast (they just vanish).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Ability_Cost discussion

Postby friarsol » 03 Oct 2010, 20:51

Sloth wrote:I tested some cards that have a cost of tapping creatures today and found this bug:

When I cancel the ability the game doesn't work as normal: When The computer wants to play a spell, taps its mana sources, a message appears in the top left saying that an error may have occured. Starting a game after that causes my Moxen not to appear on the battlefield when cast (they just vanish).
All of them did it? Just give me one of the names so I can test it out tomorrow.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Ability_Cost discussion

Postby Sloth » 04 Oct 2010, 05:24

friarsol wrote:
Sloth wrote:I tested some cards that have a cost of tapping creatures today and found this bug:

When I cancel the ability the game doesn't work as normal: When The computer wants to play a spell, taps its mana sources, a message appears in the top left saying that an error may have occured. Starting a game after that causes my Moxen not to appear on the battlefield when cast (they just vanish).
All of them did it? Just give me one of the names so I can test it out tomorrow.
I tested Hand of Justice and a new card Spurred Wolverine. But now I remember having this bug multiple times the last days (I think without tapping creatures, just canceling an ability).

Code: Select all
Name:Spurred Wolverine
ManaCost:4 R
Types:Creature Wolverine Beast
Text:no text
PT:3/2
K:abPumpTgtC tapXType<2/Beast>:First Strike
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/spurred_wolverine.jpg
End
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Ability_Cost discussion

Postby DennisBergkamp » 04 Oct 2010, 18:22

Whoa, I think I added the "tapping creatures" code, it was probably me who introduced this bug :oops:
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Ability_Cost discussion

Postby Sloth » 04 Oct 2010, 19:58

DennisBergkamp wrote:Whoa, I think I added the "tapping creatures" code, it was probably me who introduced this bug :oops:
OK, I tested again and it's not a problem of the tap cost. I get the bug also when canceling any abilities. For example Greed or Grapeshot Catapult.

EDIT: Revision 2530 has fixed this. Thanks Sol!
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Ability_Cost discussion

Postby friarsol » 04 Oct 2010, 20:23

Alright I was able to recreate the bug and fixed both the issues (current game dying and next game being borked). This was in some code I wrote that was "freezing" triggered abilities. The goal was to fix a bug where triggered abilities were hitting the stack before the spell that was in the process of being cast.

Code: Select all
If you tap Forbidden Orchard during "Pay mana cost" prompt for Wrath of God, the spell is put on top in the stack so the token survives. No matter how Wrath is cast, it should not.
Now if you cancel out of an Ability, the Frozen triggers will be cleared and the next Spell/Ability to be played will use the Stack as normal.

The Forbidden Orchard example isn't quite fixed yet, since the "Frozen" code is only being called by the Requirements class, which handles Target and Ability_Cost. Once we get everything using Ability_Cost it should be magically fixed.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 11 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 11 guests

Login Form