Exemplo n.º 1
0
        public ActionResult Start(string code)
        {
            string dbcode = "";

            if (db.Settings.Any())
            {
                dbcode = db.Settings.FirstOrDefault().InductionCode;

                if (code == dbcode)
                {
                    Induction induction = new Induction();
                    induction.GuidId      = Guid.NewGuid().ToString();
                    induction.DateCreated = DateTime.Now;
                    induction.Active      = false;
                    induction.Deleted     = false;
                    db.Inductions.Add(induction);
                    db.SaveChanges();

                    return(RedirectToAction("step1", new { guidid = induction.GuidId }));
                }
                else
                {
                    return(RedirectToAction("index"));
                }
            }
            else
            {
                return(RedirectToAction("index"));
            }
        }
Exemplo n.º 2
0
    /// <summary>
    /// 能力解决
    /// </summary>
    public async Task <bool> Solve(Induction induction)
    {
        Inductions.Remove(induction);
        Cost = DefineCost();
        if (CheckConditions(induction) && Cost.Check())
        {
            if (Optional)
            {
                if (!await Request.AskIfUse(this, Controller))
                {
                    return(false);
                }
            }
            //Owner.Controller.Broadcast(new Message(MessageType.UseSkill, new System.Collections.ArrayList { this }));
            await Cost.Pay();
            await Do(induction);

            if (OncePerTurn)
            {
                UsedInThisTurn = true;
                Inductions.Clear();
                UnInduceAll();
            }
            return(true);
        }
        return(false);
    }
Exemplo n.º 3
0
        public override Task Do(Induction induction)
        {
            var target = ((MyInduction)induction).Target;

            Controller.AttachItem(new PowerBuff(this, 20, LastingTypeEnum.UntilBattleEnds), target);
            return(Task.CompletedTask);
        }
Exemplo n.º 4
0
 public Vehicle(string make, string model, int year, int displacement, Induction induction, string registration)
 {
     Make         = make;
     Model        = model;
     Year         = year;
     Displacement = displacement;
     Registration = registration;
     Induction    = induction;
 }
Exemplo n.º 5
0
        public override Task Do(Induction induction)
        {
            var targets = ((MyInduction)induction).Targets;

            targets.ForEach(unit =>
            {
                Controller.AttachItem(new PowerBuff(this, 10, LastingTypeEnum.UntilTurnEnds), Owner);
            });
            return(Task.CompletedTask);
        }
Exemplo n.º 6
0
    /// <summary>
    /// 诱发
    /// </summary>
    public void Induce(Induction induction)
    {
        if (Game.InductionSetList.Count == 0)
        {
            Game.InductionSetList.Add(new List <Induction>());
        }
        List <Induction> inductionSet = Game.InductionSetList[Game.InductionSetList.Count - 1];

        inductionSet.Add(induction);
    }
Exemplo n.º 7
0
        public override async Task Do(Induction induction)
        {
            var target = Opponent.Deck.Top;

            Controller.ShowCard(target, this);
            if (await Request.AskIfSendToRetreat(target, Controller))
            {
                Controller.SendToRetreat(target, this);
            }
        }
Exemplo n.º 8
0
 public override bool CheckConditions(Induction induction)
 {
     return(((Card00164)Owner).sk1.UsedInThisTurn);
 }
Exemplo n.º 9
0
 public override Task Do(Induction induction)
 {
     Controller.DrawCard(1, this);
     return(Task.CompletedTask);
 }
Exemplo n.º 10
0
 public override async Task Do(Induction induction)
 {
     await Controller.ChooseAddToHand(Controller.Bond.Cards, 1, 1, this);
 }
Exemplo n.º 11
0
        public override async Task Do(Induction induction)
        {
            await Controller.ChooseAddToHand(Controller.Deck.Filter(unit => !unit.HasUnitNameOf(Strings.Get("card_text_unitname_シーダ")) && unit.HasSymbol(SymbolEnum.Red)), 0, 1, this);

            Controller.ShuffleDeck(this);
        }
Exemplo n.º 12
0
 public override Task Do(Induction induction)
 {
     Controller.AddToOrb(Controller.Deck.Top, this);
     return(Task.CompletedTask);
 }
Exemplo n.º 13
0
 public override bool CheckConditions(Induction induction)
 {
     return(Owner.BelongedRegion.TrueForAllCard(unit => unit == Owner));
 }
Exemplo n.º 14
0
 public override Task Do(Induction induction)
 {
     Controller.RefreshUnit(Owner, this);
     return(Task.CompletedTask);
 }
Exemplo n.º 15
0
 public override Task Do(Induction induction)
 {
     Controller.AttachItem(new PowerBuff(this, 50, LastingTypeEnum.UntilBattleEnds), Owner);
     Controller.AttachItem(new CanNotBeAvoided(this, LastingTypeEnum.UntilBattleEnds), Owner);
     return(Task.CompletedTask);
 }
Exemplo n.º 16
0
 public override Task Do(Induction induction)
 {
     Controller.ChangeDefendingUnit(Owner, this);
     return(Task.CompletedTask);
 }
Exemplo n.º 17
0
 public override async Task Do(Induction induction)
 {
     var choices = Controller.Field.Cards;
     await Controller.ChooseMove(choices, 0, choices.Count, this);
 }
Exemplo n.º 18
0
 public override async Task Do(Induction induction)
 {
     await Controller.ChooseMove(Opponent.Field.Filter(unit => unit.HasType(TypeEnum.Flight)), 0, 1, this);
 }
Exemplo n.º 19
0
 public override bool CheckConditions(Induction induction)
 {
     return(Controller.Orb.Count < Opponent.Orb.Count && Controller.Field.Filter(unit => unit.HasUnitNameOf(Strings.Get("card_text_unitname_ルフレ(女)"))).Count > 0);
 }
Exemplo n.º 20
0
 public override async Task Do(Induction induction)
 {
     await Controller.ChooseAddToHand(Controller.Retreat.Filter(unit => !unit.HasUnitNameOf("莉兹") && unit.DeployCost <= 3), 1, 1, this);
 }
Exemplo n.º 21
0
 public override bool CheckConditions(Induction induction)
 {
     return(Controller.Field.Filter(unit => unit.HasGender(GenderEnum.Female)).Count > 0);
 }
Exemplo n.º 22
0
 /// <summary>
 /// 能力实行
 /// </summary>
 public abstract Task Do(Induction induction);
Exemplo n.º 23
0
 public override bool CheckConditions(Induction induction)
 {
     return(Controller.Orb.Count < Opponent.Orb.Count);
 }
Exemplo n.º 24
0
        public override async Task Do(Induction induction)
        {
            await Controller.ChooseDiscardHand(Controller.Hand.Cards, 1, 1, false, this);

            await Opponent.ChooseDiscardHand(Opponent.Hand.Cards, 1, 1, false, this);
        }
Exemplo n.º 25
0
 public override async Task Do(Induction induction)
 {
     await Controller.ChooseMove(Opponent.Field.Cards, 0, 1, this);
 }
Exemplo n.º 26
0
 public override Task Do(Induction induction)
 {
     Controller.AttachItem(new PowerBuff(this, 10, LastingTypeEnum.UntilTurnEnds), Owner);
     return(Task.CompletedTask);
 }
Exemplo n.º 27
0
 public override async Task Do(Induction induction)
 {
     await Controller.ChooseAddToHand(Controller.Retreat.Filter(card => card.DeployCost == 1 && !card.HasUnitNameOf(Strings.Get("card_text_unitname_レナ"))), 0, 1, this);
 }
Exemplo n.º 28
0
 public override Task Do(Induction induction)
 {
     Controller.AttachItem(new DestroyTwoOrbs(this, LastingTypeEnum.UntilTurnEnds), Owner);
     return(Task.CompletedTask);
 }
Exemplo n.º 29
0
 public override bool CheckConditions(Induction induction)
 {
     return(true);
 }
Exemplo n.º 30
0
 public override bool CheckConditions(Induction induction)
 {
     return(Owner.Power >= 100);
 }