Пример #1
0
        public SNS_Action(string name, string subject, string type)
        {
            count++;

            if (name.Contains("SCOM") || subject.Contains("SCOM"))
            {
                cName      = className.RAISE_SCOM_ALERT;
                typeNameId = "SCOM" + count;
            }
            else if (name.Contains("TICKET") || subject.Contains("TICKET"))
            {
                cName      = className.TICKET;
                typeNameId = "TICKET" + count;
            }
            else if (name.Contains("EMAIL") || subject.Contains("EMAIL"))
            {
                cName      = className.EMAIL;
                typeNameId = "EMAIL" + count;
            }
            else
            {
                cName      = className.NONE;
                typeNameId = "NONE" + count;
            }
        }
Пример #2
0
    public UnitClass Lookup(string n, UnitClass unitLookup)
    {
        switch (n)
        {
        case "attacker":
            cName   = className.className1;
            type    = classType.classType1;
            attack  = 2;
            defense = 1;
            cost    = 50;
            texture = textures[cName];
            unitLookup.unitSetup(cName, type, attack, defense, StateMachine.currentTurn(), cost, texture);
            return(unitLookup);

        case "defender":
            cName   = className.className2;
            type    = classType.classType2;
            attack  = 1;
            defense = 2;
            cost    = 25;
            texture = textures[cName];
            unitLookup.unitSetup(cName, type, attack, defense, StateMachine.currentTurn(), cost, texture);
            return(unitLookup);

        default:
            return(null);
        }
    }
Пример #3
0
 public static bool checkDeadCubes(int playerNum, className check)
 {
     if (playerNum == 1)
     {
         foreach (className uC in gameDriver.cubesDeadP1)
         {
             if (uC == check)
             {
                 return(true);
             }
         }
         return(false);
     }
     else if (playerNum == 2)
     {
         foreach (className uC in gameDriver.cubesDeadP2)
         {
             if (uC == check)
             {
                 return(true);
             }
         }
         return(false);
     }
     print("Something broke, tried to check for a dead cube that didn't belong to a player?");
     return(false);
 }
Пример #4
0
        public SNS_Action(string t, string a, className c)
        {
            count++;

            typeNameId   = t;
            assemblyName = a;
            cName        = c;
        }
Пример #5
0
 public UnitClass()
 {
     uC           = className.className1;
     uT           = classType.classType1;
     att          = 0;
     def          = 0;
     owningPlayer = 0;
     pointCost    = 0;
     unitTexture  = null;
 }
Пример #6
0
 public void unitSetup(UnitClass copy)
 {
     uC           = copy.unitClass;
     uT           = copy.unitType;
     att          = copy.attack;
     def          = copy.defense;
     owningPlayer = copy.owner;
     pointCost    = copy.cost;
     texture      = copy.texture;
     TextureManager.applyTexture(this.gameObject, texture);
 }
Пример #7
0
 public void unitSetup(className cn, classType ct, float a, float d, int pl, int p, Texture tex)
 {
     uC           = cn;
     uT           = ct;
     att          = a;
     def          = d;
     owningPlayer = pl;
     pointCost    = p;
     texture      = tex;
     TextureManager.applyTexture(this.gameObject, texture);
 }
Пример #8
0
 public void unitSetup(UnitClass copy)
 {
     unitTexture  = new Texture[2];
     uC           = copy.unitClass;
     uT           = copy.unitType;
     att          = copy.attack;
     def          = copy.defense;
     owningPlayer = copy.owner;
     pointCost    = copy.cost;
     texture[0]   = copy.texture[0];
     texture[1]   = copy.texture[1];
     if (owningPlayer == 1)
     {
         TextureManager.applyTexture(this.gameObject, texture[0]);
     }
     if (owningPlayer == 2)
     {
         TextureManager.applyTexture(this.gameObject, texture[1]);
     }
 }
Пример #9
0
 public void unitSetup(className cn, classType ct, float a, float d, int pl, int p, Texture[] tex)
 {
     unitTexture  = new Texture[2];
     uC           = cn;
     uT           = ct;
     att          = a;
     def          = d;
     owningPlayer = pl;
     pointCost    = p;
     texture[0]   = tex[0];
     texture[1]   = tex[1];
     if (owningPlayer == 1)
     {
         TextureManager.applyTexture(this.gameObject, texture[0]);
     }
     if (owningPlayer == 2)
     {
         TextureManager.applyTexture(this.gameObject, texture[1]);
     }
 }
Пример #10
0
    public void Lookup(string n)
    {
        switch (n)
        {
        case "King":
            cName       = className.King;
            type        = classType.classType1;
            attack      = 2;
            defense     = 20;
            cost        = 0;
            description = "";
            //If it is knocked off of the board or defeated, it's owner loses the game. Limit: 1 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Brawler":
            cName       = className.Brawler;
            type        = classType.classType1;
            attack      = 3;
            defense     = 1;
            cost        = 4;
            description = "";
            //If it lands on your side of the field after the initial flick, it can be flicked a second time in the same turn.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Sentinel":
            cName       = className.Sentinel;
            type        = classType.classType1;
            attack      = 2;
            defense     = 3;
            cost        = 4;
            description = "";
            // No ability.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Shadow":
            cName       = className.Shadow;
            type        = classType.classType1;
            attack      = 1;
            defense     = 2;
            cost        = 3;
            description = "";
            //If it lands on opponent's side of the field at the end of your turn, you may remove from play. Use your flick action to place on board on a later turn.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Grunt":
            cName       = className.Grunt;
            type        = classType.classType1;
            attack      = 1;
            defense     = 1;
            cost        = 2;
            description = "";
            //No ability.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Peasant":
            cName       = className.Peasant;
            type        = classType.classType1;
            attack      = 0;
            defense     = 1;
            cost        = 1;
            description = "";
            //May be flicked twice in the same turn. Limit: 3 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Healer":
            cName       = className.Healer;
            type        = classType.classType1;
            attack      = 0;
            defense     = 6;
            cost        = 4;
            description = "";
            //Can not be flicked. Can be sacrificed to return up to 6 cost worth of troops from the dead to your side of the field (depends on coin toss per attempted piece). Limit: 1 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Paralyze":
            cName       = className.Paralyze;
            type        = classType.classType1;
            attack      = 0;
            defense     = 1;
            cost        = 2;
            description = "";
            //Can only be placed on top of an opponent's cube instead of using a flicking action. Stops that cube from being used. Must be flicked off to remove effect.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Titan":
            cName       = className.Titan;
            type        = classType.classType1;
            attack      = 3;
            defense     = 4;
            cost        = 7;
            description = "";
            //No ability.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        default:
            cName = className.Null;
            break;
        }
    }
Пример #11
0
    public void Lookup(string n)
    {
        switch (n)
        {
        case "King":
            cName       = className.King;
            type        = classType.classType1;
            attack      = 2;
            defense     = 20;
            cost        = 0;
            description = "The Leaders of their respective forces; Kings are to be protected at all costs. When your King dies, you lose.";
            //If it is knocked off of the board or defeated, it's owner loses the game. Limit: 1 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Brawler":
            cName       = className.Brawler;
            type        = classType.classType1;
            attack      = 3;
            defense     = 2;
            cost        = 3;
            description = "Your basic attacking unit. Good for throwing at your opponent repeatedly.";
            //If it lands on your side of the field after the initial flick, it can be flicked a second time in the same turn.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Sentinel":
            cName       = className.Sentinel;
            type        = classType.classType1;
            attack      = 2;
            defense     = 4;
            cost        = 4;
            description = "An excellent defender. Holds the line and can clear your side of the field.";
            // No ability.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Shadow":
            cName       = className.Shadow;
            type        = classType.classType1;
            attack      = 4;
            defense     = 1;
            cost        = 3;
            description = "An espionage expert. This piece can disappear if it lands on your opponent's side, and reappear later!";
            //If it lands on opponent's side of the field at the end of your turn, you may remove from play. Use your flick action to place on board on a later turn.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Grunt":
            cName       = className.Grunt;
            type        = classType.classType1;
            attack      = 2;
            defense     = 2;
            cost        = 3;
            description = "A basic utility unit that is cheap and effective.";
            //No ability.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Peasant":
            cName       = className.Peasant;
            type        = classType.classType1;
            attack      = 1;
            defense     = 1;
            cost        = 1;
            description = "Not intended for combat, but very expendable. These units are best used as a wall from enemy attacks.";
            //May be flicked twice in the same turn. Limit: 3 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Healer":
            cName       = className.Healer;
            type        = classType.classType1;
            attack      = 0;
            defense     = 6;
            cost        = 4;
            description = "This piece can be sacrificed in order too return destroyed pieces to your side of the field.";
            //Can not be flicked. Can be sacrificed to return up to 6 cost worth of troops from the dead to your side of the field (depends on coin toss per attempted piece). Limit: 1 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Paralyze":
            cName       = className.Paralyze;
            type        = classType.classType1;
            attack      = 0;
            defense     = 1;
            cost        = 2;
            description = "A spell to stop your opponent from utilizing any unit it is in combat with.";
            //Can only be placed on top of an opponent's cube instead of using a flicking action. Stops that cube from being used. Must be flicked off to remove effect.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Titan":
            cName       = className.Titan;
            type        = classType.classType1;
            attack      = 6;
            defense     = 4;
            cost        = 7;
            description = "A colossal offensive unit. This expensive piece is to be feared.";
            //No ability.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        case "Bomb":
            cName       = className.Bomb;
            type        = classType.classType1;
            attack      = 0;
            defense     = 2;
            cost        = 4;
            description = "KABOOOOOOOOOOOOOOOOOOOOOOOOOOM!!!";
            //Use flicking action to detonate, creating an area of effect collision. Limit: 1 per player per round.
            texture[0] = p1Textures[cName];
            texture[1] = p2Textures[cName];
            break;

        default:
            cName = className.Null;
            break;
        }
    }