*Author

GoldErastos

  • Guest
Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27923#msg27923
« on: February 20, 2010, 08:35:17 pm »
I love bi colored cards, although i've never played Rainbow, cards like Unstable Gas, Lava Golem, Toadfish and specially Pulverizer, they are cards with awesome effects, but somehow, i feel like this should be taken to the next level

I am no artist myself, i don't have Photobucket, i refuse to drag art from someone else, that's why the 'picture' is dodgy and make-shift

Could make the Upgraded version because browser went bam

Cost is actually 4 :water 2 :fire


icybraker

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27925#msg27925
« Reply #1 on: February 20, 2010, 08:38:32 pm »
Intriguing idea, but impossible to code. Instead, make it a permanent or creature that costs :air to play and :fire to use its ability (or vice versa).

GoldErastos

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27927#msg27927
« Reply #2 on: February 20, 2010, 08:43:41 pm »
I think you mean  :water

I know it's easier to have a permanent/creature of one color and have the effect with the other, that's why i said "Next Level", and was the basic idea behind this

BTW, i am no programer/coder myself, so can i ask why a card with 2 different quanta colors would be "Impossible to Code"?

PuppyChow

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27934#msg27934
« Reply #3 on: February 20, 2010, 09:05:33 pm »
Because the game isn't programmed to handle that kind of thing. :)

Delreich

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27940#msg27940
« Reply #4 on: February 20, 2010, 09:49:51 pm »
Not impossible perhaps, but way more effort than it's worth.

LeetSkillz

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27941#msg27941
« Reply #5 on: February 20, 2010, 10:15:23 pm »
Card costs four water has a passive ability that immediatly uses up two fire if you have it to turn it into it's real version and otherwise gives you 4 water and puts it into your hand. Problem solved.

Lanidrak

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27978#msg27978
« Reply #6 on: February 21, 2010, 12:48:19 am »
@LeetSkillz - So, then I missclick my Fire Pillar and play Steam Drain by accident, and as a result lose the card completely and have no effect happen because I don't have the extra 1 fire quanta? No.

@GoldErastros - Interesting idea, but as you've heard: we cannot have cards which cost x and y quanta. There is no code in place to handle this. I'm no coder, but I'm going to hazard a guess that when you click a card to play it - the game checks it's Element, then checks it's cost and runs a comparative check against the corresponding variables of that Element and checks if it is equal to or higher than the cost of the card. If the checks return True then the card is played, if False you get the error message.

So, the problem arises in that the card you want to play is two elements, which will cause the game to check two integer values (and the two element values), and then to run the check against two stored variables - your quanta of each element, in this case Water higher than or equal to 4 and Fire higher than or equal to 2 - and then, it will check to see if A = True AND B = True, and if either A or B are not true then it will give you an error message, or play your card. This all equates to a lot of checking and passing of variables, and quite possibly loops and conditional statements which all will cause the game to 'pause' and 'think' as it were.

And, I'll hazard my final guess that Zanz wants to create a fluid and fast moving strategy game which causes you to think on your feet - and as such, 'pausing' and 'thinking' (on the computers part) is the last thing he wants.

@Delreich - sure, it will be a lot of effort! But hellishly cool. But if Zanz chooses to go that route and open that door, can you imagine the hundreds of new card idea's we'd have for 'dual' cards? Then the corresponding mess of trying to sift through what is good and what is useless, and then the testing, implementing and balancing of these new cards... Chaos... but we can dream :)


LeetSkillz

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27981#msg27981
« Reply #7 on: February 21, 2010, 12:52:14 am »
Read the otherwise and everything after it.

Lanidrak

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27982#msg27982
« Reply #8 on: February 21, 2010, 12:53:28 am »
Touché. Read the rest of my post explaining why dual elements won't work.

GoldErastos

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27983#msg27983
« Reply #9 on: February 21, 2010, 01:02:45 am »
@GoldErastros - Interesting idea, but as you've heard: we cannot have cards which cost x and y quanta. There is no code in place to handle this. I'm no coder, but I'm going to hazard a guess that when you click a card to play it - the game checks it's Element, then checks it's cost and runs a comparative check against the corresponding variables of that Element and checks if it is equal to or higher than the cost of the card. If the checks return True then the card is played, if False you get the error message.

So, the problem arises in that the card you want to play is two elements, which will cause the game to check two integer values (and the two element values), and then to run the check against two stored variables - your quanta of each element, in this case Water higher than or equal to 4 and Fire higher than or equal to 2 - and then, it will check to see if A = True AND B = True, and if either A or B are not true then it will give you an error message, or play your card. This all equates to a lot of checking and passing of variables, and quite possibly loops and conditional statements which all will cause the game to 'pause' and 'think' as it were.

And, I'll hazard my final guess that Zanz wants to create a fluid and fast moving strategy game which causes you to think on your feet - and as such, 'pausing' and 'thinking' (on the computers part) is the last thing he wants.

Epic explanation there, yeah, True/False is one of the few things i know about coding, at least in RPG Maker i've analyzed it a little when one works with Variable, and 2 different Variables can be inserted into most programs, whenever it would slow the game or not would depend on the strength of teh server and stuff like that which i can't measure or have a remote idea about, it would just need tests IMHO

Still, we all dream

Lanidrak

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27987#msg27987
« Reply #10 on: February 21, 2010, 01:07:33 am »
I personally don't think dual elements would be particularly hard to code.

My main reasoning is that we only have what - 12 elements now? With maybe an average of 10 per element. That's pretty lame. It'd be great to see 12 elements which each have 20 cards in each. Maybe more.

Then, and only then can we even consider the idea of dual-element cards.

Simple case of learning to crawl before you start running marathons.

As for my knowledge of how the game works - my 'epic explanation' could be completely wrong. Playing a card could simply check an array of the 12 elements, find the correct two, and check that they are high enough for the card to be played. Really wouldn't be a difficult thing to implement. But, then again, like I said - I truly have no idea:).

PuppyChow

  • Guest
Re: Steam Drain (With crappy Art) https://elementscommunity.org/forum/index.php?topic=3233.msg27992#msg27992
« Reply #11 on: February 21, 2010, 01:36:45 am »
Quote
So, the problem arises in that the card you want to play is two elements, which will cause the game to check two integer values (and the two element values), and then to run the check against two stored variables - your quanta of each element, in this case Water higher than or equal to 4 and Fire higher than or equal to 2 - and then, it will check to see if A = True AND B = True, and if either A or B are not true then it will give you an error message, or play your card. This all equates to a lot of checking and passing of variables, and quite possibly loops and conditional statements which all will cause the game to 'pause' and 'think' as it were
With a more simple example, this is actually very easy. Let's see.

if (a=b)
---do something

if (a=b and c=d)
---do something

So it isn't complicated for your reason. It's just as easy in an Elements example.

Original code: (Given card cost & element, check if you have enough quantum)

Code: [Select]
if (cardcost<=element.getAmount()) {
          play card;
          element.setAmount(element.getAmount()-cardcost);
}
else {
         show error message;
}
New code:

Code: [Select]
if (cardcost1<=element1.getAmount()) {
         if (element2=!null && cardcost2<=element2.getAmount()) {
               play card;
               element1.setAmount(element1.getAmount()-cardcost1);
               element2.setAmount(element2.getAmount()-cardcost2);
         }
        else if (element2==null) {
              play card;
              element1.setAmount(element1.getAmount()-cardcost1);
        }
}
else {
         show error message;
}
So the problem isn't in writing the play card function, if that is truly how the game decides to play a card. The problem is that every card is (likely) a child class of a class Card. This class would contain all the functions common to every card and then the child class would have functions specific to that card. When an instance of a card is created, it would be given all the variables pretaining to that card.

So far, every card class only has variables for a single element and a single cost. And the function I created above would rely on that. However, with a duo cost card, the second function I made would need to be used, and every time it was called, it would need two card costs and two elements. But like I said, so far all the cards only have a single one and a single element, so it would be impossible for those cards to use the card playing function unless Zanz coded each and every one of them with a second card cost (likely 0) and another element (null). And then he would have to change every time the card playing function is called to including all four variables versus two.

All in all, it would take a long time. And I'm sure the function I created probably isn't right since I have no idea how the rest of the source is programmed. With that example, I'm assuming it's much simpler than it probably is.

 

blarg: