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")); } }
/// <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); }
public override Task Do(Induction induction) { var target = ((MyInduction)induction).Target; Controller.AttachItem(new PowerBuff(this, 20, LastingTypeEnum.UntilBattleEnds), target); return(Task.CompletedTask); }
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; }
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); }
/// <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); }
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); } }
public override bool CheckConditions(Induction induction) { return(((Card00164)Owner).sk1.UsedInThisTurn); }
public override Task Do(Induction induction) { Controller.DrawCard(1, this); return(Task.CompletedTask); }
public override async Task Do(Induction induction) { await Controller.ChooseAddToHand(Controller.Bond.Cards, 1, 1, this); }
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); }
public override Task Do(Induction induction) { Controller.AddToOrb(Controller.Deck.Top, this); return(Task.CompletedTask); }
public override bool CheckConditions(Induction induction) { return(Owner.BelongedRegion.TrueForAllCard(unit => unit == Owner)); }
public override Task Do(Induction induction) { Controller.RefreshUnit(Owner, this); return(Task.CompletedTask); }
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); }
public override Task Do(Induction induction) { Controller.ChangeDefendingUnit(Owner, this); return(Task.CompletedTask); }
public override async Task Do(Induction induction) { var choices = Controller.Field.Cards; await Controller.ChooseMove(choices, 0, choices.Count, this); }
public override async Task Do(Induction induction) { await Controller.ChooseMove(Opponent.Field.Filter(unit => unit.HasType(TypeEnum.Flight)), 0, 1, this); }
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); }
public override async Task Do(Induction induction) { await Controller.ChooseAddToHand(Controller.Retreat.Filter(unit => !unit.HasUnitNameOf("莉兹") && unit.DeployCost <= 3), 1, 1, this); }
public override bool CheckConditions(Induction induction) { return(Controller.Field.Filter(unit => unit.HasGender(GenderEnum.Female)).Count > 0); }
/// <summary> /// 能力实行 /// </summary> public abstract Task Do(Induction induction);
public override bool CheckConditions(Induction induction) { return(Controller.Orb.Count < Opponent.Orb.Count); }
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); }
public override async Task Do(Induction induction) { await Controller.ChooseMove(Opponent.Field.Cards, 0, 1, this); }
public override Task Do(Induction induction) { Controller.AttachItem(new PowerBuff(this, 10, LastingTypeEnum.UntilTurnEnds), Owner); return(Task.CompletedTask); }
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); }
public override Task Do(Induction induction) { Controller.AttachItem(new DestroyTwoOrbs(this, LastingTypeEnum.UntilTurnEnds), Owner); return(Task.CompletedTask); }
public override bool CheckConditions(Induction induction) { return(true); }
public override bool CheckConditions(Induction induction) { return(Owner.Power >= 100); }