It is currently 22 May 2013, 09:22
   
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: 130
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 35 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.
< DotP2013 (and formerly 2012) modder >
WADs unrecognized by the game? Look here.
Need a basic modding tutorial? Try this.
Want to start coding cards? Try my web generator.
User avatar
thefiremind
Programmer
 
Posts: 1652
Joined: 07 Nov 2011, 10:55
Has thanked: 60 times
Been thanked: 361 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: 130
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 177 on 10 Oct 2011, 16:37

Users browsing this forum: No registered users and 1 guest

Login Form