import java.io.*;
import javax.swing.*;
import java.awt.*;

/**
 *<code>Class GalEventCard</code>
 *
 *@version alpha
 *@author Denise Feddersen
 */

/**
 *Class GalEventCard
 */
public class GalEventCard
{
    public int number;  //numeric identifier of the event
    public String effect;  //text describing the current event
    public static int currentGalEvent;

    public static int Generate()
    {
        int randnum = (int)(Math.random()*29);
        currentGalEvent = randnum;
	switch(currentGalEvent)
	    {
	    case 0:
		break;
	    case 1:
		break;
	    case 2:
		break;
	    case 3:
		break;
	    case 4:
		break;
	    case 5:
		break;
	    case 6:
		break;
	    case 7:
		break;
	    case 8:
		break;
	    case 9:
		break;
	    case 10:
		break;
	    case 11:
		break;
	    case 12:
		break;
	    case 13:
		break;
	    case 14:
		break;
	    case 15:
		break;
	    case 16:
		break;
	    case 17:
		break;
	    case 18:
		break;
	    case 19:
		break;
	    case 20:
		break;
	    case 21:
		break;
	    case 22:
		break;
	    case 23:
		break;
	    case 24:
		break;
	    case 25:
		break;
	    case 26:
		break;
	    case 27:
		break;
	    case 28:
		break;
	    }
	//	public String x = Deck[randnum];
	GalEventGUI y = new GalEventGUI();
	y.jTextArea1.setText(Deck[randnum]);
	y.show();
	return randnum;
    }
    
    //    public GalEventCard(int i, String s)
    //    {
    //        int Number = i;
    //        String Effect = s;
    //    }

    private static String [] Deck;
    
     /**
       *method init initializes the galactic event Deck
       */

    public static void init() 
    {
      Deck = new String[29];  //array of galactic event cards
  
      Deck[0] = "98: Rebel agents contact with space pirates, who proceed to plunder any one Environ not occupied by Imperial military units on any one Imperial-controlled planet with no Imperial military units in Orbit. Add the resource value of the Environ to the Rebel Resouce Track. If no such Environ exists, ignore this event.";
      //This Event would search through the planets for the specified conditions and display available planets for this event to the player.  The player may then select one environ for which they may add the value to the Rebel Resource Track.  If no planet is returned in the search, this event exits.
      //A possible method to accomplish this might be search_planets() located in the planet class.  This event would also call a method to increment the resource track.

      Deck[1] = "99: Unattractive policies revealed in the final issue of the Segunden Times-Dispatch. The Imperial Player must move the loyalty marker on any three planets occupied by Segundens one space in the Rebel Player's favor.";
      //This event would search through the planets for the specified conditions and display available planets for this event to the player.  The player may then select the three planets on which to shift the loyalty.
      //A possible method to accomplish this might be search_planets() located in the planet class.  This event would also call a method to shift planet loyalty.

      Deck[2] = "100: The Emperor is in a rare mood. If the Action Event Imperial Player may commit atrocity comes up at any time during this Galactic Game-Turn, the Imperial Player may immediately commit an Atrocity on any planet.";
      //This event sets a flag in the atrocity class.  If "Imperial player may commit atrocity" comes up, this event is carried out as an if statement.

      Deck[3] = "101: The whole galaxy is caught in a time Singularity. Both Players, during their respective Mission Phases, may assign each of their Mission Groups two missions during their first Player-Turn of this Campaign Game-Turn. Note: Ignore this event on the Hyper World as Mission Groups there can already perform two missions each.";
      //This event sets a flag in the Campaign Game-Turn that tells it to allow two missions per mission group.  It is executed with an if statement.

      Deck[4] = "102: It's Galactic Peace Month, according to the Imperial calander. Imperial military units and characters are not restricted by the Strategic Assignment routine. The Imperial Player may move his units entirely as he sees fit for the duration of this Campaign Game-Turn.";
      //This event sets a flag during the Campaign Game-Turn that disables strategic assignments.  When a Strategic Assignment is run, this flag must be checked.

      Deck[5] = "103: The Empire's eligible young recruits are struck by a wave of scholarly enthusiasm and march off to institutions of higher learning. The Imperial Player may not purchase military units this Campaign Game-Turn. He still receives his normal taxes, he just cannot use his available Force Points to buy military units. He may expend Force Points on PDB's.";
      //This event sets a flag in the Force Points class.   When the method is called to expend force points, this flag is checked.  

      Deck[6] = "104: Competition and entertainment are at their best ever, as the Imperial-sponsored GALACTIC GAMES tour Province One. The Rebel Player must move the loyalty marker on any three planets in Provice One one space in the Imperial Player's favor.";
      //This Event would search through the planets for the specified conditions and display available planets for this event to the player.  The player may then select which planets to move the loyalty markers on.
      //A possible method to accomplish this might be search_planets() in the planet class.  This event would also call a method to shift planet loyalty.

      Deck[7] = "105: The heart of the galaxy is acting up again. Add two to the Hyperjump distance being travelled by any units that are moving into or out of Province One (but not between other provinces and not within Province One).";
      //This event would set a flag to be checked by the method determine_hyperjump_dist().  It would essentially be carried out by an if statement.

      Deck[8] = "106: A ghost fleet from the Golden Age mysteriously appears from the nether-dimension. During the Space Combat Segment of the first Rebel Player-Turn of this military units in any one Orbit Box in the Fifth Province. It attacks with a strength of 20 (receiving no column shits, although the Imperial forces may). After attacking in the Orbit Box of the Rebel Player's choice the fleet vanishes. The attack is resolved before all other space combat.";
      //

      Deck[9] = "107: Rebel demonstrations on Lonica (421) get ugly, generating pro-Imperial feelings. Place Loyalty marker on Loyal, unless it is currently at Patriotic. The Rebel Player may perform no Diplomacy or Coup Missions on the planet this Campaign Game-Turn.";
      //This event sets the loyalty on Lonica to Loyal (unless it is on Patriotic) and sets a flag in the Campaign Game-Turn class to be checked before missions are assigned.

      Deck[10] = "108: Political scandals and their subsequent coverups are exposed, shocking residents of the Zakir (51) star system into anti-Imperial outrage. Shift Loyalty of all three planets one space in favor of the Rebels.";
      //This event calls for loyalty shifts of all planets in the Zakir Star System.

      Deck[11] = "109: A fanatical rebel cult that roams the Deblon (44) Star System has sparked fervent Rebel support through their music and other persuasive entertainments. Shift the Loyalty markers on both planets one space in favor of the Rebels. If planet is currently Patriotic, shift it to Neutral, instead. If Planet is currently in Unrest, it may be placed into Rebellion. The Domino Effect may be initiated if called for.";
      //
 
      Deck[12] = "110: The many-colored moons of Tamset (312) perform a once-in-a-millenium cosmic dance of eclipses and conjunctions. All characters on the planet stare in wonderment. No bonus draws may be taken for any missions performed on this planet during this Campaign Game-Turn.";
      //

      Deck[13] = "111: Sun spots and storms on Varu (43) drive all creatures wild. When resolving missions on planets in this system all Creature Attacks Action Events are carried out for the duration of the Campaign Game-Turn.";
      //

      Deck[14] = "112: Imperial intelligence network cracks Rebel communication code. A Rebel Secret must be revealed immediately. A new code is hastily devised.";
      //reveals a random rebel secret

      Deck[15] = "113: Bungled administrative work at Imperial transport control send vuluable military material into surprised Rebel hands.  Decrease Imperial resources by five Force Points and increase Rebel resources by five Force Points.  If there are not enough points currently on the Imperial Resource Track, it is subtracted from the upcoming Imperial Taxation.";

      Deck[16] = "114: Independent nomadic star-faring race suddenly invades the Egrix Star System (22).  The Player with the most military space Strength Points in the Orbit Box of each planet at the end of this Campaign Game-Turn may shift the Loyalty of that planet one space in his favor, as he has contributed the most to driving off the ourside attackers there.  Space and land combat between Rebel and Imperial military units is carried out normally and the Imperial Player is still restricted by his Strategic Assignments.  If neither Player has units in an Orbit Box that planet's Loyalty marker is not moved.";

      Deck[17] = "115: It's Military Inventory and Maintenance Month, according to the Imperial calendar.  No Imperial military units may be moved outside of the province they currently occupy for the duration of this Campaign Game-Turn.  However, Imperial characters may be moved according to the normal Strategic Assignment routine.  If the secret Rebel base has already been revealed, ignore this event.";

      Deck[18] = "116: Hyperjump technicians go on Strike.  All military units have their Navigation rating reduced by one this Galactic Game-Turn.  Character spaceships are unaffected.";
      //reduces military unit Navigation rating by 1
 
      Deck[19] = "117: Plague breaks out in Province Three.  All characters currently in the province must receive one wound.  Exception: Dr. Sontag and any Rebel character in the same environ, or any Rebel character in the same environ as a Rebel character who owns the Medi-Kit of Ptolus do not receive a wound.  Furthermore, a planet in Province Three that has either the Doctor or the Medi-Kit on it shifts on Loyalty space in the Rebel Player's favor.";

      Deck[20] = "118: Hyperjump dimensions in a state of flux. For the duration of this Galactic Game-Turn, when ever a unit is going to hyperjump, the owning Player names its destination and then rolls the die twice, reading the result as a two-digit number (i.e., a roll of 4 and 3 would be 43.) If the result matches the number of an existing star on the map, that unit must attempt to Hyperjump to there, or else be automatically placed in the Drift Two box of its original destination. If the rolled number matches no star, it may jump normally.";
 
      Deck[21] = "119: Radical clone experiemtns are a big success. Draw three characters at random from among the dead Characters. Place each character in any Environ on a planet controlled by the owning Player. If the Rebel Player controls no planets, he may place a character drawn in this manner in any Environ on a Planet in Rebellion. If a player has no planets he can place a character on as descrube here, the character is returned to the dead characters pile.";

      Deck[22] = "120: Internal racial disputes among the Kayns supercede any Imperial problems this Galactic Game-Turn.  The Loyalty markers on any Planets occupied by the Kayn race may not be moved at all.  Kayn characters (both Rebel and Imperial) may not be included in any Mission Groups or be named as a leader this Turn.  They may be moved and may heal.";

      Deck[23] = "121: Strange jamming signals from an unknown source shut down galactic communication for the duration of this Galactic Game-Turn.  No Imperial units may be moved across a province boundary (even if a planet is in rebellion), and no Domino Effects may be initiated this Game-Turn.";

      Deck[24] = "122: Industrial disaster at Defense Concepts Ltd., the manufacturer of all PDB equipment, cancels Imperial PDB output for this Galactic Game-Turn.  The Imperial Player may not put any Down PDB's up or increase the levels of any of his PDB's.";

      Deck[25] = "123: Public Horror and Outrage at the increasing suicide rate and apparant reckless habits among the youth, spark anti-Suicide Squad sentiments.  The Imperial Player must remove one Suicide Squad unit from play. It may be re-purchased in a future turn.";
 
      Deck[26] = "124: Suvan religious leader denounces alleged Imperial atrocities.  The Rebel Player may shift the Loyalty marker on the home planet of the Suvans one space in his favor, or shift the Loyalty markers on two other Suvan-occupied planets one space in his favor.";

      Deck[27] = "125: Imperial Deltronics recall all standard Imperial character spaceships due to mechanical defect. All Imperial character spaceships, except Redjacs ship, may not be moved for the duration of this Galactic Game-Turn.";

      Deck[28] = "126: An unprecendented amount of propaganda and publicity for both the Imperial and Rebel causes inspire all characters to overcome any obstacles between them and total victory. When resolving all missions this Campain Game-Turn, ignore any Actions Events that specifically prevent bonus draws.";
   }   /*end init*/

}   /*end GalEventCard class*/
