It is currently 08 Jul 2021, 04:31
   
Text Size

[fixed/closed]Avalanche doesn't ask for X

Moderators: BAgate, drool66, stassy, Aswan jaguar, gmzombie, CCGHQ Admins

[fixed/closed]Avalanche doesn't ask for X

Postby stassy » 17 Mar 2014, 11:36

Describe the Bug:
Avalanche doesn't ask for X and resolve to nothing

Which card did behave improperly ?
Avalanche

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
2014/02/18: Born of the Gods v2 - DUEL

What exactly should be the correct behavior/interaction ?
Avalanche does ask for X and destroy X target snow land

Are any other cards possibly affected by this bug ?
-

Image

Image
Last edited by BAgate on 12 Oct 2014, 01:35, edited 8 times in total.
Reason: closed
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: [confirmed]Avalanche doesn't ask for X and resolve to no

Postby Gargaroz » 18 Mar 2014, 16:21

Mmh, there was a bug in the target validation, which I've fixed in 7eaa441, but for the X value, this is one of the particular case that have an additional cost along with X value.
I've rewrote the function following my standard procedure in 2d8878b, but I bet Korath could do better. Hower, the values in 'ct_all' ('2' in 'require colorless') will prevent the engine to ask the 'X' cost if not modified.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: [needs csv]Avalanche doesn't ask for X and resolve to no

Postby Korath » 18 Mar 2014, 23:10

I think all it needed for the X cost was to charge_mana(player, COLOR_COLORLESS, -1) at the start of its EVENT_CAST_SPELL handler.

Its behavior in EVENT_CAST_SPELL (both before and after your changes) can be better handled by pick_up_to_n_targets(), which'll get you both "done" and "cancel" buttons and handle them correctly; you can find the maximum amount of mana that player can spend with has_mana(player, COLOR_ANY, 1).

It should also be castable with X=0 if there's no snow lands to target, which it no longer is.

This doesn't need a csv update, in any case. The {X} {2} {R} {R} cost could conceivably be handled by charging {X} {R} {R} and fizzling if X < 2, but that's even uglier than charging the {X} separately from the {2} {R} {R}. It would require a disproportionate amount of work to get spells, or even general mana costs, to charge both X and a colorless amount at the same time compared to the number of cards printed with that sort of cost.
---
(Bug is fixed, except for the very minor issue of not being castable with X=0 and no snow lands to target. My comment about about the csv was aimed at the [needs csv update] tag that was in place; both the initial code and Gargaroz' fix assume the engine charges 2RR.)
User avatar
Korath
DEVELOPER
 
Posts: 3522
Joined: 02 Jun 2013, 05:57
Has thanked: 491 times
Been thanked: 1037 times

Re: [still bugged]Avalanche doesn't ask for X

Postby BAgate » 24 Apr 2014, 04:54

Still doesn't ask for x, allows you to target more than one land (including basic lands) but stops on 2nd target and destroys 1st selection without paying for it.
Working on: housekeeping and archived reports
User avatar
BAgate
Tester
 
Posts: 2445
Joined: 06 Mar 2012, 11:09
Has thanked: 117 times
Been thanked: 158 times

Re: [still bugged]Avalanche doesn't ask for X

Postby Gargaroz » 14 May 2014, 15:33

Fixed the part regarding not destroying targets > 1 in 778e342
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 4 guests


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 1922 on 07 Jun 2021, 06:01

Users browsing this forum: No registered users and 4 guests

Login Form