示例#1
0
 public limitedBuff(BuffPool buffPool, int duration, RoleBase owner) : base(buffPool, duration, owner)
 {
 }
示例#2
0
 public independentBuff(BuffPool buffPool, int duration, RoleBase owner) : base(buffPool, duration, owner)
 {
 }
示例#3
0
 public BuffBase(BuffPool buffPool, int duration, RoleBase owner)
 {
     this.buffPool = buffPool;
     this.duration = duration;
     this.owner    = owner;
 }
示例#4
0
        static void Main(string[] args)
        {
            TurnStructure turnStructure = new TurnStructure();

            turnStructure.Attach(new StartStage());
            turnStructure.Attach(new AcceptStage());
            turnStructure.Attach(new EndStage());

            BuffPool buffPool = new BuffPool();
            RoleBase player   = new RoleBase("Player");
            RoleBase enemy    = new RoleBase("Enemy");

            Console.WriteLine("第一回合");
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);

            ReplylimitedBuff reply = new ReplylimitedBuff(buffPool, 3, player, 1);

            buffPool.AddBuff(reply);

            RagelimitedBuff rage = new RagelimitedBuff(buffPool, 5, enemy, 2, 10);

            buffPool.AddBuff(rage);

            Console.WriteLine("第二回合");
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            player.Display();
            enemy.Display();

            ReplylimitedBuff reply2 = new ReplylimitedBuff(buffPool, 5, enemy, 3);

            buffPool.AddBuff(reply2);

            RagelimitedBuff rage2 = new RagelimitedBuff(buffPool, 5, enemy, 5, 10);

            buffPool.AddBuff(rage2);

            Console.WriteLine("第三回合");
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            player.Display();
            enemy.Display();

            Console.WriteLine("第四回合");
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);
            player.Display();
            enemy.Display();

            Reinforce reinforce = new Reinforce(buffPool, 2, player);

            buffPool.AddBuff(reinforce);

            Console.WriteLine("第五回合");
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);

            Console.WriteLine("回合中");
            player.Display();
            enemy.Display();

            turnStructure.Turn(buffPool);
            Console.WriteLine("回合结束后");
            player.Display();
            enemy.Display();

            Reinforce reinforce2 = new Reinforce(buffPool, 2, player);

            buffPool.AddBuff(reinforce2);

            Console.WriteLine("第六回合");
            turnStructure.Turn(buffPool);
            turnStructure.Turn(buffPool);

            Console.WriteLine("回合中");
            player.Display();
            enemy.Display();
            turnStructure.Turn(buffPool);
            Console.WriteLine("回合结束后");
            player.Display();
            enemy.Display();

            Console.Read();
        }
示例#5
0
 public RagelimitedBuff(BuffPool buffPool, int duration, RoleBase owner, int rageNumber, int costHpNumber) : base(buffPool, duration, owner)
 {
     this.rageNumber   = rageNumber;
     this.costHpNumber = costHpNumber;
 }
示例#6
0
 public ReplylimitedBuff(BuffPool buffPool, int duration, RoleBase owner, int replayNumber) : base(buffPool, duration, owner)
 {
     this.replayNumber = replayNumber;
 }
示例#7
0
 public Reinforce(BuffPool buffPool, int duration, RoleBase owner) : base(buffPool, duration, owner)
 {
 }