Log in

Thoughts on Creating Specific New Cards

Force of Will:

  • Start by creating the card for 3UU
  • Add the cost reduction code (like affinity) to reduce its cost by 3UU.
  • Add code to the 'can this be played' event to check for either 3UU available or a blue card in hand.
  • The hand-checking code from brainstorm could be modified to check color instead of type, so check for a blue card.
  • When the spell is played, give the user a dialog box if both choices are available, or just force one payment if only 1 is available.
  • Again use the brainstorm code to force the user to choose a blue card and RFG it. (and lose 1 life)
  • Chain on counterspell. Done.

Hybrid:

  • set mana cost to the actual cost, but use white mana as the hybrid symbol.

This one's a little complicated so I'm going to write pseudocode. I envision that we would write a proc that would handle EVERY hybrid card's mana cost with no additional coding.

generalSection (i.e. no event)
*hybridColor1 = color of card 1, determined by static color of card (see invasion apprentices)
*hybridColor2 = color of card 2
*hybridManaTotal = white mana required
 
if( costReductionEvent){
  cost = colorLessCost
}
 
if( canBePlayedEvent){
  for i = 0..hybridMana{
    isManaAvailable(colorless cost and i of hybridColor1 and hybridMana-i of hybridColor2)
    if yes, spell can be played.
  }
  otherwise spell cannot be played
}
 
if( playingSpellPayingCosts ){
  hybridText = use an if..else to set this based on static color.  There should be only 10 choices, unless you also include cards   like spectral procession.  Even then, there are 15 choices (sorry reaper king)
  for i = 0..hybridMana{
    if isManaAvailable(hybridColor1) and isManaAvailable(hybridColor2)
       createDialog simple 2-part dialog using hybridText
       if( 0 ) is chosen, charge hybridColor1
       if( 1 ) is chosen, charge hybridColor2
    } 
    else if isManaAvailable(hybridColor1)
       charge hybridColor1
    else if isManaAvailable(hybridColor2)
       charge hybridColor2
    }
  }
}

Then chain on the regular spell.

Equipment

Equipment are basically enchant creatures that have an activated ability to change creatures. So take an enchant creature (say Flight) and...

  • Update the manalink/magic stuff to turn the card into an artifact, and enable the 'activated ability' flag.
  • In the code....
  • Change the code that attaches to a creature when it comes into play to happen on activation instead. (i.e. change 6C to 6D)
  • Change so that you can only target creatures you control.
  • Remove the 'goes to graveyard code' (the call to 4779f0)
  • Add a 74 (can ability be played) section. It can only be played as a sorcery. It should only be active if you have a creature. (copy this call from ashnod's battlegear)
  • I don't know any code for 'can only be played as a sorcery', but we at least have the code for 'during your main phase'.
  • Add any additional equip costs, such as mana. If you do, make sure to update 6D to charge those costs.
  • Add a line in 6D that says if the target is dead, don't unequip the current creature. (I haven't tried this)
  • Done.

Here is the patch for an equipment version of flight (no costs, no checks for when to equip)

SKYPATCH
004BE620
000BDC20
277
79
 55
 8BEC
 56
 837D1074
 750A
*E85198F5FF
 E9FE000000
 837D106C
 7578
 8B450C
 39058C397A00
 756D
 8B4508
 3905848C7300
 7562
 6896764D00
 6A00
*E8D038F4FF
 83C408
 BAAC5C7100
*E8F7BCF5FF
 85C0
 7436
 837D0801
 753A
 F6054006790002
 7531
 837E7400
 7507
 832DA8317A0018
 8B4674
 8B4E78
*E8EC33F4FF
 F6462820
 7413
 832DA8317A0063
 EB0A
 C70594F14E0001000000
 E97E000000
 837D1071
 7540
 33C0
*E891ABF5FF
 85C0
 7415
 8B4674
 8B4E78
 884650
 894E04
 C7463801000000
 EB1A
 6A01
 FF750C
 FF7508
*E80B93FBFF
 83C40C
 C70594F14E0001000000
 C6463600
 EB38
 837D1034
 7532
 8B4508
 8B4D0C
*E87733F4FF
 837E3800
 7421
 A18C397A00
 394678
 7517
 8B15848C7300
 395674
 750C
 83F8FF
 7407
 830DB405620020
 33C0
 5E
 C9
 C3