Log in

API for Magic Coding in C

Args in all caps should use special constants as the arguments (see manalink.h for a list of constants)

Please leave subs in alphabetical order for easier scanning.

Card Status Functions

  • has_color(player, card, COLOR) [unimplemented]
  • has_card_type(player, card, CARD_TYPE) [unimplemented]
  • has_creature_type(player, card, CREATURE_TYPE) [unimplemented]
  • is_tapped(player, card)

Game State Functions

  • count_graveyard(player)
  • does_player_control_artifact(player) [unimplemented]
  • has_mana(player, COLOR)
  • has_threshold(player)
  • is_artifact_in_play() [unimplemented]

Cost Paying Functions

  • charge_mana(player, COLOR)
  • tap_card(player, card)

Targeting Functions

  • target_creature() [unimplemented]
  • target_player() [unimplemented]

Creature Abilities

  • check_legend_rule(player, card, event) [I think this should be renamed legendary, since the sub actually kills the legend]
  • haste(player, card, event) [unimplemented]
  • lifelink(player, card, event) [unimplemented]
  • vigilence(player, card, event) [unimplemented]

Actions

  • add_one_mana_any_color(player)
  • draw_a_card(player)
  • gain_life(player, amount)
  • kill_card(player, card, KILL_METHOD)
  • produce_mana(player, COLOR, amount)

Random Stuff