コード例 #1
0
 public override void Play(Player cardLayer, Player other)
 {
     if (other.GetDefence() == 0)
     {
         UI.Write("@8" + cardLayer.GetName() + " blasts " + other.GetName() + ", who takes @0" + this.value + "@8 damage!\n");
         other.SetHealth(other.GetHealth() - this.value);
         SFX.Play("Explosion");
     }
     //If the attack is greater than the current defence...
     else if (other.GetDefence() <= this.value)
     {
         UI.Write("@8" + cardLayer.GetName() + " shoots down " + other.GetName() + "'s Laser Grid!\n");
         other.SetDefence(0);
         SFX.Play("LaserGridDown");
     }
     //Otherwise...
     else if (other.GetDefence() > this.value)
     {
         UI.Write("@8" + cardLayer.GetName() + " blasts " + other.GetName() + "'s Laser Grid for @0" + this.value + "@8 damage!\n");
         //...Just subtract from the defence the damage to take.
         other.SetDefence(other.GetDefence() - this.value);
         SFX.Play("Gun");
     }
     //We can't have negative health!
     if (other.GetHealth() < 0)
     {
         other.SetHealth(0);
     }
 }
コード例 #2
0
 public static void Story()
 {
     StoryLine("THE SPACEYEAR IS 3X85.");
     StoryLine("HUMANS HAVE GROWN BORED OF HUMANITY, AND HAVE DECIDED TO BECOME ROBOTS.");
     StoryLine("THEY QUICKLY TIRED OF BEING ROBOTS, AND BECAME ROBOT ANIMALS.");
     StoryLine("YOU ARE THE LAST MANDROID.");
     StoryLine("YOU MUST DEFEAT ALL OF THE OTHER ROBOTS.");
     StoryLine("GOOD LUCK.");
     UI.waitForConfirmation();
     UI.Write("PLEASE GIVE YOUR MANDROID A NAME:");
     string name = Console.ReadLine();
     Player p1 = new Player(name, 200);
     Player p2 = new Player("Titanium Laser Snake", 200);
     Battle b = new Battle(p1, p2);
     p1 = new Player(name, 300);
     p2 = new Player("Rocket-Powered Velociraptor", 300);
     b = new Battle(p1, p2);
     p1 = new Player(name, 400);
     p2 = new Player("Omega Death Mantis", 400);
     b = new Battle(p1, p2);
     p1 = new Player(name, 500);
     p2 = new Player("Nuke-Launching Baby Seal", 500);
     b = new Battle(p1, p2);
     StoryLine("YOU HAVE DEFEATED EVERY ROBOT IN THE UNIVERSE.");
     StoryLine("CONGRATULATIONS. YOU WIN.");
     UI.waitForConfirmation();
     TitleScreen();
 }
コード例 #3
0
 public override void Play(Player cardLayer, Player other)
 {
     UI.Write("@8" + cardLayer.GetName() + " repairs its RoboBody using @2" + this.value + "@8 supercapacitors!\n");
     cardLayer.SetHealth(cardLayer.GetHealth() + this.value);
     SFX.Play("Repair");
 }
コード例 #4
0
 public override void Play(Player cardLayer, Player other)
 {
     UI.Write("@8" + cardLayer.GetName() + " equips @3" + this.name + "@8 jigawatts!\n");
     cardLayer.SetDefence(cardLayer.GetDefence() + this.value);
     SFX.Play("Defence");
 }
コード例 #5
0
 public override void Play(Player cardLayer, Player other)
 {
     UI.Write("@8" + cardLayer.GetName() + " strengthens his Laser Grid by @1" + this.value + "@8 jigawatts!\n");
     cardLayer.SetDefence(cardLayer.GetDefence() + this.value);
     SFX.Play("Defence");
 }
コード例 #6
0
 public override void Play(Player cardLayer, Player other)
 {
     UI.Write("@8" + cardLayer.GetName() + " malfunctions and blasts itself!\n");
     cardLayer.SetHealth(cardLayer.GetHealth() - 1);
     SFX.Play("Death");
 }
コード例 #7
0
        public Card playCardMultiplayer(int index, Player other)
        {
            Card card = hand[index];

            card.Play(this, other);
            discard(index);

            return card;
        }
コード例 #8
0
 public void playCard(Card cardPlayed, Player cardLayer, Player other)
 {
     cardPlayed.Play(cardLayer, other);
 }
コード例 #9
0
 public void playCard(int index, Player cardLayer, Player other)
 {
     hand[index].Play(cardLayer, other);
     discard(index);
 }
コード例 #10
0
 public void drawTest()
 {
     Player target = new Player("Pico");
     target.draw();
     //Assert.IsTrue();
 }
コード例 #11
0
 public Battle(Player P1, Player P2)
 {
     this.Player1 = P1;
     this.Enemy = P2;
     Begin();
 }
コード例 #12
0
 public MultiplayerBattle(Player P1, Player Network)
 {
     Player1 = P1;
     Enemy = Network;
 }