It is currently 10 May 2025, 08:08
   
Text Size

Ripple. Someone already coded?

Moderator: CCGHQ Admins

Ripple. Someone already coded?

Postby alexandreonly » 11 Aug 2012, 03:15

I'm asking mainly because i want to code Thrumming Stone to use in my deck of rats.
alexandreonly
 
Posts: 145
Joined: 04 Jul 2011, 17:27
Has thanked: 0 time
Been thanked: 8 times

Re: Ripple. Someone already coded?

Postby thefiremind » 11 Aug 2012, 09:45

I'm sure it's possible to make because it's very similar to cascade... and it should be easier because it doesn't require to exile the cards and then get them back. I'll have a try.

EDIT: There you go:
THRUMMING_STONE_124451.zip
Thrumming stone code, illustration, and LOL file with ripple functions
(109.98 KiB) Downloaded 234 times
I made a quick test and it seems OK.

As I did for cascade, I made a LOL file with the functions, so it's faster to implement the other spells with ripple (not that they are a lot, though :P) and we can make adjustments in a single place when needed.
First, you are asked if you want to ripple or not. I didn't include the TEXT_PERMANENT so you'll have to define the localised text for CARD_QUERY_MC_RIPPLE, it should be something like "Do you want to ripple %d?" (the %d will be substituted by 4, this way my code can be even used for custom cards that have a different ripple count).
Then, the cards to reveal are saved in a chest, you look at them and you can choose which ones you want to play.
Note that the played cards will change zone (from library to stack), so they will be automatically deleted from the chest.
Finally, all the cards that are still in the chest are revealed and put on the bottom of the library (no need to reveal the played ones, you see them on the stack). The code could be refined by letting the player choose the order for the bottom of the library, but I think it would be a complication not worth the effort.

Let me know if you find bugs.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Ripple. Someone already coded?

Postby alexandreonly » 11 Aug 2012, 16:53

thefiremind wrote:I'm sure it's possible to make because it's very similar to cascade... and it should be easier because it doesn't require to exile the cards and then get them back. I'll have a try.

EDIT: There you go:
THRUMMING_STONE_124451.zip
I made a quick test and it seems OK.

As I did for cascade, I made a LOL file with the functions, so it's faster to implement the other spells with ripple (not that they are a lot, though :P) and we can make adjustments in a single place when needed.
First, you are asked if you want to ripple or not. I didn't include the TEXT_PERMANENT so you'll have to define the localised text for CARD_QUERY_MC_RIPPLE, it should be something like "Do you want to ripple %d?" (the %d will be substituted by 4, this way my code can be even used for custom cards that have a different ripple count).
Then, the cards to reveal are saved in a chest, you look at them and you can choose which ones you want to play.
Note that the played cards will change zone (from library to stack), so they will be automatically deleted from the chest.
Finally, all the cards that are still in the chest are revealed and put on the bottom of the library (no need to reveal the played ones, you see them on the stack). The code could be refined by letting the player choose the order for the bottom of the library, but I think it would be a complication not worth the effort.

Let me know if you find bugs.
Thanks.
alexandreonly
 
Posts: 145
Joined: 04 Jul 2011, 17:27
Has thanked: 0 time
Been thanked: 8 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 1 guest

Login Form