sIKE23 / Mage-Wars

Mage Wars for OCTGN
7 stars 5 forks source link

Better Automate the Dissipate Trait #315

Closed sIKE23 closed 8 years ago

sIKE23 commented 8 years ago

Right now we have to add an entry for each card with the Dissipate trait in the FlipCard() function of the Actions,py like:

    if "Rolling Fog" == card.Name:
        card.markers[DissipateToken] = 3

There are a bunch of cards in Academy and PvS that use the Dissipate trait so I think it is natural to add this in so I am thinking (still in the FlipCard() function):

    if "Dissipate" in card.Traits:
        card.markers[DissipateToken] = [Dissipate Value]

@ACG8: How do I get that Dissipate Value?

ACG8 commented 8 years ago

To get the dissipate value from a card object, do the following:

Suppose the card object is stored in card

  1. Call computeTraits(card) to return a dictionary object (dictionary) containing the traits associated with card
  2. Query the dictionary object for the value associated with Dissipate (dictionary.get("Dissipate")). If it returns None, then the object has no dissipate value; otherwise, it will return the integer equal to the dissipate value of card
sIKE23 commented 8 years ago

Needs more work, need to add isFaceUp check (I think)

sIKE23 commented 8 years ago

Working as expected now....closing