*Author

Active members:
Zblader(1) davidy22(1)

Offline ZephyrPhantomTopic starter

  • Legendary Member
  • ******
  • Posts: 7675
  • Country: aq
  • Reputation Power: 101
  • ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.ZephyrPhantom is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • Awards: Slice of Elements 6th Birthday CakeSlice of Elements 4th Birthday CakeFlavour Text Revival Competition - WinnerSlice of Elements 3rd Birthday CakeSlice of Elements 2nd Birthday Cake
Deck Searching - Is it possible? https://elementscommunity.org/forum/index.php?topic=21661.msg277263#msg277263
« on: February 23, 2011, 09:13:08 pm »
Deck Searching is a common mechanic used in other CCGs.
With this interesting suggestion (http://elementscommunity.org/forum/index.php/topic,21632.0.html) on how to implement it in Elements appearing:

Bringing up an option window to choose your card WILL require extra coding, but it's work that will probably have to be done eventually. Finding the cards in your deck should be a relatively quick process, as the following code-

NumberCardsInSelectionMenu=0
for (i=0,i++,i=CardsLeft){
if (deck.type=creature and deck.cost<=4){
SelectionRange[NumberCardsInSelectionMenu]=deck;
NumberCardsInSelectionMenu++;
};

Would take almost half a second to execute, and that's assuming you have 60 cards in your deck. Building the selection menu shouldn't be long if that's stored in memory, and it can be re-used for all the other card ideas that could benefit from a menu as well.
I would like to discuss this further. Is deck searching a concept that can be implemented in elements?

davidy22

  • Guest
Re: Deck Searching - Is it possible? https://elementscommunity.org/forum/index.php?topic=21661.msg277608#msg277608
« Reply #1 on: February 24, 2011, 12:35:54 pm »
If you're talking about possibility, then yes. Flash is a Turing complete language, and can theoretically describe any idea or thought with mathematics and basic logic.
My code that you quoted above relies on the assumption that the deck is a series of objects stored in an array-in plain english, all the cards in your deck are listed with their attributes in a random order. I derived this assumption from the fact that cards like eternity and reverse time can alter the cards at the top of it. I am not 100% certain that Zanzarino implemented decks in that way, as the reverse time effect can easily be replicated with a small alteration to the card-drawing script to first check if there are any reverse-timed creatures in a separate list. While it is an ugly and inefficient solution with potential to introduce bugs, it does still work. If my assumption does happen to ring true, not only deck searching, but sending card to the bottom of the deck, shuffling the deck and targeting cards within the deck will be possible.

Will it be beneficial to the game? Maybe. Depends on how it is used.

 

anything
blarg: