Esempio n. 1
0
 private Handmanager()
 {
     this.help = Helpfunctions.Instance;
 }
Esempio n. 2
0
        public void print(bool tobuffer = false)
        {
            Helpfunctions help = Helpfunctions.Instance;

            if (tobuffer)
            {
                if (this.actionType == actionEnum.playcard)
                {
                    string playaction = "play ";

                    playaction += "id " + this.card.entity + ", card:" + this.card.card.name;
                    if (this.target != null)
                    {
                        playaction += " target " + this.target.entitiyID + "(" + this.target.name + ")";
                    }

                    if (this.place >= 0)
                    {
                        playaction += " pos " + this.place;
                    }

                    if (this.druidchoice >= 1)
                    {
                        playaction += " choice " + this.druidchoice;
                    }

                    help.writeToBuffer(playaction);
                }
                if (this.actionType == actionEnum.attackWithMinion)
                {
                    help.writeToBuffer("attack " + this.own.entitiyID + " enemy " + this.target.entitiyID + "(" + this.target.name + ")");
                }
                if (this.actionType == actionEnum.attackWithHero)
                {
                    help.writeToBuffer("heroattack " + this.target.entitiyID + "(" + this.target.name + ")");
                }
                if (this.actionType == actionEnum.useHeroPower)
                {
                    if (this.target != null)
                    {
                        help.writeToBuffer("useability on target " + this.target.entitiyID + "(" + this.target.name + ")");
                    }
                    else
                    {
                        help.writeToBuffer("useability");
                    }
                }
                return;
            }
            if (this.actionType == actionEnum.playcard)
            {
                string playaction = "play ";

                playaction += "id " + this.card.entity + ", card:" + this.card.card.name;
                if (this.target != null)
                {
                    playaction += " target " + this.target.entitiyID + "(" + this.target.name + ")";
                }

                if (this.place >= 0)
                {
                    playaction += " pos " + this.place;
                }

                if (this.druidchoice >= 1)
                {
                    playaction += " choice " + this.druidchoice;
                }

                help.logg(playaction);
            }
            if (this.actionType == actionEnum.attackWithMinion)
            {
                help.logg("attacker: " + this.own.entitiyID + "(" + this.own.name + ")" + " enemy: " + this.target.entitiyID + "(" + this.target.name + ")");
            }
            if (this.actionType == actionEnum.attackWithHero)
            {
                help.logg("attack with hero, enemy: " + this.target.entitiyID + "(" + this.target.name + ")");
            }
            if (this.actionType == actionEnum.useHeroPower)
            {
                help.logg("useability ");
                if (this.target != null)
                {
                    help.logg("on enemy: " + this.target.entitiyID + "(" + this.target.name + ")");
                }
            }
            help.logg("");
        }