It is currently 20 Jun 2019, 14:07
   
Text Size

Volrath's Laboratory Token

Moderators: Xander9009, CCGHQ Admins

Volrath's Laboratory Token

Postby migookman » 01 Nov 2016, 15:26

Would it be possible to create a token for Volrath's Laboratory that creates a token based on color and creature type that is chosen? Maybe would look something like:
TOKEN_S_C_2_2_S_CW_1
User avatar
migookman
 
Posts: 129
Joined: 05 Aug 2014, 06:37
Has thanked: 20 times
Been thanked: 22 times

Re: Volrath's Laboratory Token

Postby Xander9009 » 01 Nov 2016, 19:41

Given that it needs to enter as the creature type and color, I'm not sure. However, there are three ways I can think of to make it work. Not sure if they would, but maybe worth a shot.

1: Simple way, store the token in a data chest, and then grant the chosen creature type and color to that token. I have my doubts this would work.

2: Complicated way, make a DuelDC or PlayerDC chest for Volrath's Laboratory. In that chest, make a new subchest containing nothing in 0, the creature type in 1, and the color in 2. The token would have a constant CA which finds the first unclaimed chest (empty register 0), claims it (sets register 0 to itself), and uses those values permanently. I'm not certain how to fix this regarding copying the token or effects such as Doubling Season.

3: The tedious way, there are 1247 creature types and 5 colors. Make 6235 tokens, and programmatically create the token name, having all 6235 tokens registered.

I'm pretty sure everyone can agree that 3 isn't really feasible. 2 might not work because of copying/doubling abilities. It might not matter if 1 works, though. For the name in the first and second method, TOKEN_S_C_2_2_S_CW_1 looks fine to me.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2880
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 116 times
Been thanked: 435 times

Re: Volrath's Laboratory Token

Postby thefiremind » 01 Nov 2016, 20:26

Xander9009 wrote:Simple way, store the token in a data chest, and then grant the chosen creature type and color to that token. I have my doubts this would work.
It would work with just a little change: once you have given the chest as argument to the token creation function, grant the chosen creature type and color to all tokens in the chest (save the chest count preemptively and loop with a for, because you can't assume that tokens will cease to exist starting from the last index). Cards like Doubling Season will make more tokens, but they will all be inside that chest. I'm pretty sure there must be cards that already do something similar.
< 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: 717 times

Re: Volrath's Laboratory Token

Postby Xander9009 » 01 Nov 2016, 20:39

thefiremind wrote:
Xander9009 wrote:Simple way, store the token in a data chest, and then grant the chosen creature type and color to that token. I have my doubts this would work.
It would work with just a little change: once you have given the chest as argument to the token creation function, grant the chosen creature type and color to all tokens in the chest (save the chest count preemptively and loop with a for, because you can't assume that tokens will cease to exist starting from the last index). Cards like Doubling Season will make more tokens, but they will all be inside that chest. I'm pretty sure there must be cards that already do something similar.
Yeah, that's what I was intending. And there are cards that already do this, the most notable of which that come to mind are the restricted mana cards, but I know there are others.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2880
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 116 times
Been thanked: 435 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 3 guests


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 3 guests

Login Form