Menu

how to make card script

HOWTO
2003-11-20
2003-11-21
  • Fabrice Daugan

    Fabrice Daugan - 2003-11-20

    The code of a card follow this :

    * [0 ... x] (x is card's name length-1) : contains the card's name corresponding to picture's name
    * [x+1] : 0x0
    * [x+2 ... x+3] : card id (@see IdCards.java

    following items must be available only for non land cards :
    * [x+4 ... x+5] : colors of card (@see IdColors.java)
    * [x+6 ... x+13] : mana cost (5 colors + colorless + color of X

    following items must be available only for creature cards :
    * [x+14] : power
    * [x+15] : tougthness

    following items are available for all cards :
    * [x+16] : number of capacities (= nc)
    * [x+17 ... y1] : code of capacity 1
    * [y1+1 ... y2] : code of capacity 2
    * [y(nc-1)+1 ... ync] : code of capacity nc

    * [ync+1] : number of proprieties of card (=np)
    * [ync+2 ... z1] : code of propriety1
    * [z1+1 ... z2] : code of propriety2
    * [z(nz-1)+1 ... znp] : code of propriety np

    * [znp+1] : number of types of card (=nt)
    * [znp+2 ... t1] : code of type 1
    * [t1+1 ... t2] : code of type 2
    * [t(nt-1)+1 ... tnt] : code of type nt

    Code of a capacity (@see MCapacity.java):
    [0] : stack options
    [1 .. e] : event's code making this capacity activated
    [e+1] : number of actions of this capacity (=na) corresponding to pay part of this capacity (before the ':')
    [e+2 ... a1] : code of first action
    [a1+1 ... a2] : code of second action
    [a(na-1)+1 ... a(na)] : code of last action

    [a(na)+1] : number of actions of this capacity (=nf) corresponding to effect part of this capacity (after the ':')
    [a(na)+2 ... f1] : code of first action
    [f1+1 ... f2] : code of second action
    [f(nf-1)+1 ... a(nf)] : code of last action

    Code of an action (@see IdActions.java):
    [0] : code id of action
    [1 ... 14] : code of action

    Code of a propriety(@see IdProprieties):
    [0] : code id of this propriety

    Code of a type(@see IdTypes):
    [0] : code id of this type

    Code of an event (@see IdEvents and MEvent) :
    [0] : code id of this event
    [2] : code id place (ID__GAME, ID_HAND..., see IdPlaces) contains also taped/untaped constraint code
    [3 ... 18] : 16 bytes to code this event

    That's all.
    To see exemple, look file db03a-50cards.mdb (not microsoft acces file !!, but magic data base)

     
    • Carlouet Mathieu

      woooo !
      Seems not to be that easy !

       
    • Fabrice Daugan

      Fabrice Daugan - 2003-11-21

      Yes, I agree.
      To implement the cards of release 0.4, there wouldn't have porblems, a lot a Ctrl+C and Ctrl+V since a lot of cards are similar.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.