use strict;
use Irssi;
use vars qw($VERSION %IRSSI);

$VERSION = "0.0.1";
%IRSSI = (
    authors => 'PrincessLeia2',
    contact => 'lyz\@princessleia.com ',
    name => 'Chromium',
    description => 'A Magic:The Gathering Card Definition Bot, with 20 side die',
    license => 'GNU GPL',
    url => 'http://www.princessleia.com/'
);

my @die= (1 .. 20);

sub event_privmsg {
my ($server, $data, $nick, $mask, $target) =@_;
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/;
    return if ( $text !~ /^`/i );
        if ( $text =~ /^`Terrain Generator$/i ) {
        $server->command ( "msg $nick Terrain Generator - Land; Tap add one colorless mana to your mana pool; 2 colorless, tap, put a basic from your hand into play tapped" );
}
        elsif ( $text =~ /^`Peat Bog$/i ) {
        $server->command ( "msg $nick Peat Bog - Land; comes into play tapped with tow depletion counters on it; Tap, Remove a depletion counter from Peat Bog, Add 2 black manna to your mana pool, if there are no depletion counters on the Peat Bog, sacrifice it.");
}
        elsif ( $text =~ /^`Rejuvenation Chamber$/i ) {
        $server->command ( "msg $nick Rejuvenation Chamber - Artifact; Cost: 3 colorless; Fading 2; Tap, gain 2 life.")
}
        elsif ( $text =~ /^`Skull Of Ramos$/i ) {
        $server->command ( "msg $nick Skull Of Ramos - Artifact; Cost 3 colorless; Tap, add one black mana to your mana pool; Sacrifice to add one black mana to your mana pool")
}
        elsif ( $text =~ /^`Dark Ritual$/i ) {
        $server->command ( "msg $nick Dark Ritual - Instant; Cost: 1 black; Add 3 black mana to your mana pool")
}
        elsif ( $text =~ /^`Seal Of Doom$/i ) {
        $server->command ( "msg $nick Seal Of Doom - Enchantment; Cost: 2 colorless; Sacrifice to destroy target non-black creature. It cant be regenerated")
}
        elsif ( $text =~ /^`Vicious Hunger$/i ) {
        $server->command ( "msg $nick Vicious Hunger - Sorcery; Cost: 2 black; Deals 2 damage to target creature, you gain 2 life.")
}
        elsif ( $text =~ /^`Dispoil$/i ) {
        $server->command ( "msg $nick Dispoil - Sorcery; Cost: 3 colorless 1 black; Destroy target land, it's controller loses 2 life")
}
        elsif ( $text =~ /^`Eradicate$/i ) {
        $server->command ( "msg $nick Eradicate - Sorcery; Cost: 2 colorless, 2 black; Remove target nonblack creature from the game. Search it's controllers graveyard, hand, and library and remove them from the game. That player then shuffles their library.")
}
        elsif ( $text =~ /^`Plague Wind$/i ) {
        $server->command ( "msg $nick Plague Wind - Sorcery; Cost: 7 colorless, 2 black; Destroy all creatures you don't control. They can't be regenerated")
}
        elsif ( $text =~ /^`Belbe's Percher$/i ) {
        $server->command ( "msg $nick Belbe's Percher - Creature-Bird; 2/2; Cost: 2 colorless, 1 black; Flying; Can only block creatures with flying;")
}
        elsif ( $text =~ /^`Plague Fiend$/i ) {
        $server->command ( "msg $nick Plaque Fiend - Creature-Insect; Cost: 1 colorless, 1 black; 1/2; Whenever it deals combat damage to a creature destroy that creature unless its controller pays 2 colorless")
}
        elsif ( $text =~ /^`Plague Witch$/i ) {
        $server->command ( "msg $nick Plague Witch - Creature-Spellshaper; Cost: 1 colorless, 1 black; 1/1; 1 black, tap, discard a card from your hand, target creature gets -1/-1 until end of turn")
}
        elsif ( $text =~ /^`Bog Glider$/i ) {
        $server->command ( "msg $nick Bog Glider - Creature-Mercenary; Cost: 2 colorless, 1 black; 1/1; Flying; tap, sacrifice a land, search your library for a Mercenary card with converted mana cost of 2 or less and put that card into play, shuffle library")
}
        elsif ( $text =~ /^`Disease Carriers$/i ) {
        $server->command ( "msg $nick Disease Carriers - Creature-Rat; Cost: 2 colorless, 2 black; 2/2; When disease carriers is put into a graveyard from play, target creature gets -2/-2 until end of turn")
}
        elsif ( $text =~ /^`Highway Robber$/i ) {
        $server->command ( "msg $nick Highway Robber - Creature-Mercenary; Cost: 2 colorless, 2 black; 2/2; When it comes into play, you gain 2 life, and target opponent loses 2 life")
}
        elsif ( $text =~ /^`Avatar Of Woe$/i ) {
        $server->command ( "msg $nick Avatar Of Woe - Creature-Avatar; Cost: 6 colorless, 2 black; 6/5; If there are ten or more creature cards total in all graveyards, this card takes 6 colorless less to play; Cannot be blocked except by artifact creatures and/or black creatures; Tap and destroy target creature, it cannot be regenerated")
}
        elsif ( $text =~ /^`Consume Stength$/i ) {
        $server->command ( "msg $nick Consume Stength - Instant; cost: 1 colorless, 1 black, 1 green; Target creature gets +2/+2 until end of turn. Another target creature gets -2/-2 until end of turn.")
}
        elsif ( $text =~ /^`Elfhame Palace$/i ) {
        $server->command ( "msg $nick Elfhame Palace - Land; Elfhame Palace comes into play tapped. Tap/: Add (Gr) or (Wh) to your mana pool")
}
        elsif ( $text =~ /^`Gravedigger$/i ) {
        $server->command ( "msg $nick Gravedigger - Creature-Zombie; 2/2; Cost: 3 colorless, 1 black; When Gravedigger comes into play, you may return target creature card from you graveyard to your hand.")
}
        elsif ( $text =~ /^`Llanowar Dead$/i ) {
        $server->command ( "msg $nick Llanowar Dead - Creature-Zombie Elf; 2/2; cost: 1 black, 1 green; tap, add 1 black mana to your mana pool")
}
        elsif ( $text =~ /^`Soul Link$/i ) {
        $server->command ( "msg $nick Soul Link - Enchant Creature; cost: 1 colorless, 1 white, 1 black; Whenever enchanget ceature deals or is dealt damage, you gain that much life.")
}
        elsif ( $text =~ /^`Strength of Night$/i ) {
        $server->command ( "msg $nick Strength of Night - Instant; cost: 2 colorless, 1 green, Kicker 1 black (You may pay an additional 1 black as you play this spell.) Creatures you control get +1/+1 until end of turn. If you paid the kicker cost, Zombies you control get an additional +2/+2 until end of turn.")
}
        elsif ( $text =~ /^`Life\/Death$/i ) {
        $server->command ( "msg $nick Life/Death dual card - Sorcery; LIFE; Cost: 1 green mana; Until end of turn, all lands you control are 1/1 creatures that are still lands. DEATH: Cost: 1 colorless 1 black. Return target creature card from your graveyard to play. You lose life equal to its converted mana cost. NOTE ON SPLIT CARDS: These are cards with two different actions and colors to choose from, player can choose whichever color they wish to play.")
}
        elsif ( $text =~ /^`Maggot Carrier$/i ) {
        $server->command ( "msg $nick Maggot Carrier - Creature-Zombie; 1/1; Cost: 1 black; when Maggot Carrier comes into play, each player loses 1 life.")
}
        elsif ( $text =~ /^`Recover$/i ) {
        $server->command ( "msg $nick Recover - Sorcery; Cost: 2 colorless, 1 black; Return target creature card from your graveyard to your hand. Draw a card.")
}
        elsif ( $text =~ /^`Quagmire Druid$/i ) {
        $server->command ( "msg $nick Quagmire Druid - Creature-ZombieDruid; 2/2; Cost: 2 colorless, 1 black; 1 green, tap, Sacrifice a creature: Destroy target enchantment")
}
        elsif ( $text =~ /^`Phyrexian Arena$/i ) {
        $server->command ( "msg $nick Phyrexian Arena - Enchantment; Cost: 1 colorless, 2 black; At the beginning of your upkeep, you draw a card and you lose 1 life.")
}
        elsif ( $text =~ /^`Grave Defiler$/i ) {
        $server->command ( "msg $nick Grave Defiler - Creature-Zombie; Cost: 3 colorless, 1 black; When this card comes into play, reveal the top four cards of your library. Put all Zombie cards revealed this way into your hand and the rest on the bottom of your library. ; 1 colorless, 1 black: Regenerate this card.")
}
        elsif ( $text =~ /^`Lord of the Undead$/i ) {
        $server->command ( "msg $nick Lord of the Undead - Creature-Lord; 2/2; Cost: 1 colorless, 2 black;   All Zombies get +1/+1.; Pay 1 colorless, 1 black, Tap, Return target Zombie card from your graveyard to your hand. ")
}
        elsif ( $text =~ /^`Putrid Warrior$/i ) {
        $server->command ( "msg $nick Putrid Warrior - Creature-Soldier Zombie; 2/2; Cost: 1 white, 1 black; Whenever this deals damage, choose one - each player loses 1 life; or each player gains 1 life.")
}
        elsif ( $text =~ /^`Zombie Boa$/i ) {
        $server->command ( "msg $nick Zombie Boa - Creature-Zombie Snake; 3/3; Cost: 4 colorless. 1 black; Pay 1 colorless, 1 black: Choose a color. Whenever this card becomes blocked by a creature of that color this turn, destroy that creature. Play this ability only any time you could play a sorcery.")
}
        elsif ( $text =~ /^`Mournful Zombie$/i ) {
        $server->command ( "msg $nick Mournful Zombie - Creature-Zombie; Cost: 2 colorless, 1 black; 2/1; Pay 1 white, tap: Target player gains 1 life.")
}
        elsif ( $text =~ /^`Wax\/Wane$/i ) {
        $server->command ( "msg $nick Wax/Wane dual card - Instant; WAX: Cost: 1 green mana; Target creature gets +2/+2 until end of turn. WANE: Cost: 1 white mana; Destroy target enchantment. NOTE ON SPLIT CARDS: These are cards with two different actions and colors to choose from, player can choose whichever color they wish to play.")
}
        elsif ( $text =~ /^`Blastroderm$/i ) {
        $server->command ( "msg $nick Blastroderm - Creature-Beast; 5/5; Cost: 2 colorless, 2 green; Fading 3; Cannont be the target of spells or abilities.")
}
        elsif ( $text =~ /^`Llanowar Elves$/i ) {
        $server->command ( "msg $nick Llanowar Elves - Creature-Elf; 1/1; Cost: 1 green; Tap, add 1 green mana to your mana pool.")
}
        elsif ( $text =~ /^`Skyshroud Ridgeback$/i ) {
        $server->command ( "msg $nick Skyshroud Ridgeback - Creature-Beast; 2/3; Fading 2")
}
        elsif ( $text =~ /^`Darba$/i ) {
        $server->command ( "msg $nick Darba - Creature-Beast; 5/4; Cost: 3 colorless, 1 green; At the beginning of your upkeep sacrifice Darba unless you pay 2 green.")
}
        elsif ( $text =~ /^`Hunted Wumpus$/i ) {
        $server->command ( "msg $nick Hunted Wumpus - Creature-Beast ; 6/6 ; Cost: 3 colorless, 1 green; When this comes into play, each other player may put a creature card from their hand into play under their control.")
}
        elsif ( $text =~ /^`Pygmy Razorback$/i ) {
        $server->command ( "msg $nick Pygmy Razorback - Creature-Boar; 2/1; Cost: 1 colorless, 1 green; Trample")
}
        elsif ( $text =~ /^`Spore Frog$/i ) {
        $server->command ( "msg $nick Spore Frog - Creature-Frog; 1/1; Cost: 1 green; Sacrifice, prevent all combat damage that would be dealt this turn.")
}
        elsif ( $text =~ /^`Marsh Boa$/i ) {
        $server->command ( "msg $nick Marsh Boa - Creature-Snake; 1/1; Cost: 1 green; Swampwalk")
}
        elsif ( $text =~ /^`Rancor$/i ) {
        $server->command ( "msg $nick Rancor - Enchant Creature; Cost: 1 green; Enchanted creature gains +2/0 and trample; When rancor is put into a graveyard from play, return rancor to owner's hand.")}

        elsif ( $text =~ /^`Stampede Driver$/i ) {
        $server->command ( "msg $nick Stampede Driver - Creature-Spellshaper; 1/1; Cost: 1 green; 1 colorless, 1 green, tap, discard a card from your hand, creatures you control get +1/+1 and gain trample until end of turn")
}
        elsif ( $text =~ /^`Seal Of Strength$/i ) {
        $server->command ( "msg $nick Seal Of Strength - Enchantment; Cost:1 green; Sacrifice seal of strength, target creature gets +3/+3 until end of turn")
}
        elsif ( $text =~ /^`Giant Growth$/i ) {
        $server->command ( "msg $nick Giant Growth - Instant; Cost: 1 green; Target creature gets +3/+3 until end of turn")
}
        elsif ( $text =~ /^`Wild Might$/i ) {
        $server->command ( "msg $nick Wild Might - Instant; Cost: 1 colorless, 1 green; Target creature gets +1/+1 until end of turn. That creature gets an additional +4/+4 until end of turn unless any player pays 2 colorless.")
}
        elsif ( $text =~ /^`Invigorate$/i ) {
        $server->command ( "msg $nick Invigorate - Instant; Cost: 2 colorless, 1 green; If you control a forest you may have an opponent gain 3 life instead of playing invigorate's mana cost. Target creatures gets +4/+4 until end of turn.")
}
        elsif ( $text =~ /^`Sawtooth Loon$/i ) {
        $server->command ( "msg $nick Sawtooth Loon - Creature-Bird; 2/2; Cost: 2 colorless, 1 white, 1 blue; Flying; When this comes into play, return a white or blue creature you control to its owner's hand.; When this comes into play, draw two cards, then put two cards from your hand on the bottom of your library.")
}
        elsif ( $text =~ /^`Noble Purpose$/i ) {
        $server->command ( "msg $nick Noble Purpose - Enchantment; Cost: 3 colorless, 2 white ;  Whenever a creature you control deals combat damage, you gain that much life.")
}
        elsif ( $text =~ /^`Noble Stand$/i ) {
        $server->command ( "msg $nick Noble Stand - Enchantment ; Cost: 4 colorless, 1 white ; Whenever a creature you control blocks, you gain 2 life.")
}
        elsif ( $text =~ /^`Power Sink$/i ) {
        $server->command ( "msg $nick Power Sink - Instant ; Cost: X colorless, 1 blue ; Counter target spell unless its controller pays {X}. If he or she doesn't, that player taps all lands he or she controls and empties his or her mana pool.")
}
        elsif ( $text =~ /^`Trap Runner$/i ) {
        $server->command ( "msg $nick Trap Runner - Creature-Soldier ; 2/3 ; Cost: 2 colorless, 2 white ; Tap, Target attacking unblocked creature becomes blocked. Play this ability only during the declare blockers step. (This ability works on unblockable creatures.)")
}
        elsif ( $text =~ /^`Counterspell$/i ) {
        $server->command ( "msg $nick Counterspell - Instant ; Cost: 2 blue ; Counter target spell.")
}
        elsif ( $text =~ /^`Darting Merfolk$/i ) {
        $server->command ( "msg $nick Darting Merfolk - Creature-Merfolk ; 1/1 ; Pay 1 blue, Return this to its owner's hand.")
}
        elsif ( $text =~ /^`Shield Dancer$/i ) {
        $server->command ( "msg $nick Shield Dancer - Creature-Rebel; 1/3 ; Cost: 2 colorless, 1 white ; Pay 2 colorless, 1 white, The next time target attacking creature would deal combat damage to this this turn, that creature deals that damage to itself instead.")
}
        elsif ( $text =~ /^`Stand\/Deliver$/i ) {
        $server->command ( "msg $nick Stand/Deliver dual card - Instant; STAND: Cost: 1 white; Prevent the next 2 damage that would be dealt to target creature this turn. DELIVER: Cost: 2 blue ; Return target permanent to its owner's hand. NOTE ON SPLIT CARDS: These are cards with two different actions and colors to choose from, player can choose whichever color they wish to play.")
}
        elsif ( $text =~ /^`Stormscape Familiar$/i ) {
        $server->command ( "msg $nick Stormscape Familiar - Creature-Bird ; 1/1 ; Cost: 1 colorless, 1 blue ; Flying. ; White spells and black spells you play cost 1 colorless less to play.")
}
        elsif ( $text =~ /^`Sunscape Familiar$/i ) {
        $server->command ( "msg $nick Sunscape Familiar - Creature-Wall ; 0/3 ; Cost: 1 colorless, 1 white ; (Walls can't attack.) ; Green spells and blue spells you play cost 1 colorless less to play.")
}
        elsif ( $text =~ /^`Disenchant$/i ) {
        $server->command ( "msg $nick Disenchant - Instant ; Cost: 1 colorless, 1 white ;  Destroy target artifact or enchantment.")
}
        elsif ( $text =~ /^`Spirit Link$/i ) {
        $server->command ( "msg $nick Spirit Link - Enchant Creature ; Cost: 1 white; Whenever enchanted creature deals damage, you gain that much life")
}
        elsif ( $text =~ /^`Silver Drake$/i ) {
        $server->command ( "msg $nick Silver Drake - Creature - Drake ; 3/3 ; Cost: 1 colorless, 1 white, 1 blue ; Flying ; When this comes into play, return a white or blue creature you control to its owner's hand.")
}
        elsif ( $text =~ /^`Puffer Extract$/i ) {
        $server->command ( "msg $nick Puffer Extract - Artifact ; Cost: 5 colorless ; X, tap,  Target creature you control gets +X/+X until end of turn. Destroy it at end of turn.")
}
        elsif ( $text =~ /^`Spiketail Hatchling$/i ) {
        $server->command ( "msg $nick Spiketail Hatchling - Creature-Drake ; Cost: 1 colorless, 1 blue ; 1/1; Flying. ; Sacrifice ~this~: Counter target spell unless its controller pays 1 colorless.")
}
        elsif ( $text =~ /^`Serra Angel$/i ) {
        $server->command ( "msg $nick Serra Angel - Creature-Angel ; 4/4;  Cost: 3 colorless, 2 white ;  Flying ; Attacking doesn't cause this to tap.")
}
        elsif ( $text =~ /^`Seal of Removal$/i ) {
        $server->command ( "msg $nick Seal of Removal - Enchantment ; Cost: 1 blue ; Sacrifice this, Return target creature to its owner's hand.")
}
        elsif ( $text =~ /^`Reveille Squad$/i ) {
        $server->command ( "msg $nick Reveille Squad - Creature-Rebel ; 3/3 ;  Cost: 2 colorless, 2 white ; Whenever one or more creatures attack you, if ~this~  is untapped, you may untap all creatures you control.")
}
        elsif ( $text =~ /^`Mine Bearer$/i ) {
        $server->command ( "msg $nick Mine Bearer - Creature-Soldier ; 1/1 ; Cost: 2 colorless, 1 white; Tap, sacrifice this, Destroy target attacking creature.")
}
        elsif ( $text =~ /^`Seal of Cleansing$/i ) {
        $server->command ( "msg $nick Seal of Cleansing - Enchantment ; Cost: 1 colorless, 1 white ; Sacrifice this: Destroy target artifact or enchantment.")
}
        elsif ( $text =~ /^`Dromar's Cavern$/i ) {
        $server->command ( "msg $nick Dromar's Cavern - Land ; this is a Lair in addition to its land type. ; When ~this~ comes into play, sacrifice it unless you return a non-Lair land you control to its owner's hand. ; tap, Add 1 white, blue, or black to your mana pool. ")
}
        elsif ( $text =~ /^`Saprazzan Cove$/i ) {
        $server->command ( "msg $nick Saprazzan Cove - Land ; this comes into play tapped. ; tap, Put a storage counter on this. ; Tap, Remove any number of storage counters from this: Add one blue mana to your mana pool for each storage counter removed this way.")
}
        elsif ( $text =~ /^`Fountain of Cho$/i ) {
        $server->command ( "msg $nick Fountain of Cho - Land ; this comes into play tapped. ; tap, put a storage counter on this. ; tap, Remove any number of storage counters from this,  Add one white mana to your mana pool for each storage counter removed this way.")
}
        elsif ( $text =~ /^`Firebreathing$/i ) {
        $server->command ( "msg $nick Firebreathing - Enchant Creature ; Cost ; 1 red ; pay one red, Enchanted creature gets +1/+0 until end of turn.
")
}
        elsif ( $text =~ /^`Earth Elemental$/i ) {
        $server->command ( "msg $nick Earth Elemental - Creature-Elemental ; 4/5 ; Cost: 3 colorless, 2 red.")
}
        elsif ( $text =~ /^`Disintegrate$/i ) {
        $server->command ( "msg $nick Disintegrate - Sorcery ; Cost : X colorless, 1 red ; this deals X damage to target creature or player. That creature can't be regenerated this turn. If the creature would be put into a graveyard this turn, remove it from the game instead.")
}
        elsif ( $text =~ /^`Shock$/i ) {
        $server->command ( "msg $nick Shock - Creature-Soldier ; 2/2 ; Cost: 3 colorless, 1 red ; Sacrifice, this deals 2 damage to target creature or player.")
}
        elsif ( $text =~ /^`Sisters of the Flame$/i ) {
        $server->command ( "msg $nick Sisters of the Flame - Creature-Sister ; 2/2 ; Cost : 1 colorless, 2 red ; Tap, Add red mana to your mana pool.")
}
        elsif ( $text =~ /^`Searing Touch$/i ) {
        $server->command ( "msg $nick Searing Touch - Instant ; Cost: 1 red ; Buyback 4. ; this deals 1 damage to target creature or player.")
}
        elsif ( $text =~ /^`Arc Lightning$/i ) {
        $server->command ( "msg $nick Arc Lightning - Sorcery ; Cost:  2 colorless, 1 red ; deals 3 damage divided as you choose among any number of target creatures and/or players.")
}
        elsif ( $text =~ /^`Kindle$/i ) {
        $server->command ( "msg $nick this deals to target creature or player damage equal to the number of cards named Kindle in all graveyards plus 2")
}
        elsif ( $text =~ /^`Downhill Charge$/i ) {
        $server->command ( "msg $nick Downhill Charge - Instant ; Cost: 2 colorless, 1 red; You may sacrifice a mountain rather than pay this card's mana cost. ; Target creature gets +X/+0 until end of turn, where X is the number of mountains you control.")
}
        elsif ( $text =~ /^`Lightning Blast$/i ) {
        $server->command ( "msg $nick Lightning Blast - Instant ; Cost: 3 colorless, 1 red ; deals 4 damage to target creature or player")
}
        elsif ( $text =~ /^`Lightning Bolt$/i ) {
        $server->command ( "msg $nick Lightning Bolt - Instant ; Cost: 1 red ; deals 3 damage to target creature or player.")
}
        elsif ( $text =~ /^`Anaba Shaman$/i ) {
        $server->command ( "msg $nick Anaba Shaman - Creature-Minotaur ; 2/2 ; Cost: 3 colorless, 1 red ; pay 1 red mana, tap, this deals 1 damage to target creature or player.")
}
        elsif ( $text =~ /^`Dwarven Warriors$/i ) {
        $server->command ( "msg $nick Dwarven Warriors - Creature-Dwarf ; 1/1 ; Cost: 2 colorless, 1 red ; Tap, Target creature with power 2 or less is unblockable this turn.")
}
        elsif ( $text =~ /^`Bird Maiden$/i ) {
        $server->command ( "msg $nick Bird Maiden - Creature-Maiden ; 1/2 ; Cost: 2 colorless, 1 red ; Flying.")
}
        elsif ( $text =~ /^`Rogue Kavu$/i ) {
        $server->command ( "msg $nick Rogue Kavu - Creature-Kavu ; 1/1 ; Cost: 1 colorless, 1 red ; Whenever this attacks alone, it gets +2/+0 until end of turn.")
}
        elsif ( $text =~ /^`Wall of Dust$/i ) {
        $server->command ( "msg $nick Wall of Dust - Creature - Wall ; 1/4 ; Cost: 2 colorless, 1 red ; (Walls can't attack.) ; Whenever this blocks a creature, that creature can't attack during its controller's next turn.")
}
        elsif ( $text =~ /^`Fireball$/i ) {
        $server->command ( "msg $nick Fireball - Sorcery ; Cost: X,Y, 1 red ; deals X damage divided evenly, rounded down, among Y plus one target creatures and/or players.")
}
        elsif ( $text =~ /^`Bestial Fury$/i ) {
        $server->command ( "msg $nick Bestial Fury - Enchant Creature ; Cost: 2 colorless, 1 red ; When this comes into play, draw a card at the beginning of the next turn's upkeep. ; Whenever enchanted creature becomes blocked, it gets +4/+0 and gains trample until end of turn.")
}
        elsif ( $text =~ /^`Giant Strength$/i ) {
        $server->command ( "msg $nick Giant Strength - Enchant Creature ; Cost: 2 red ;  Enchanted creature gets +2/+2.")
}
        elsif ( $text =~ /^`Fire Elemental$/i ) {
        $server->command ( "msg $nick Fire Elemental - Creature - Elemental ; 5/4 ; Cost: 3 colorless, 2 red.")
}
        elsif ( $text =~ /^`Spitting Earth$/i ) {
        $server->command ( "msg $nick Spitting Earth - Sorcery ; Cost: 1 colorless, 1 red ; deals damage equal to the number of mountains you control to target creature")
 }
}

sub event_privmsg2 {
my ($server, $data, $nick, $mask, $target) =@_;
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/;
    return if ( $text !~ /`roll/i );
      my $roll = $die[rand @die];
          $server->command ( "msg $target $roll" );
}
   
Irssi::signal_add('event privmsg', 'event_privmsg');
Irssi::signal_add('event privmsg', 'event_privmsg2');
