예제 #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 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");
 }
예제 #3
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");
 }