Exemplo n.º 1
0
 protected override bool canUse(Game game, Request nowRequest, FreeUse useInfo, out NextRequest nextRequest)
 {
     if (useInfo.PlayersId.Count < 1)
     {
         nextRequest = new HeroChooseRequest();
         return(false);
     }
     return(base.canUse(game, nowRequest, useInfo, out nextRequest));
 }
Exemplo n.º 2
0
 protected override bool canUse(Game game, Request nowRequest, FreeUse useInfo, out NextRequest nextRequest)
 {
     if (nowRequest is FreeUseRequest && useInfo.PlayersId.Count < 1)
     {
         nextRequest = new HeroChooseRequest()
         {
             PlayerId = useInfo.PlayerId, Number = 1, RequestInfo = "选择目标玩家"
         };
         return(false);
     }
     return(base.canUse(game, nowRequest, useInfo, out nextRequest));
 }
Exemplo n.º 3
0
 protected override bool canUse(Game game, Request nowRequest, FreeUse useInfo, out NextRequest nextRequest)
 {
     if (useInfo.PlayersId.Count < 1)
     {
         nextRequest = new HeroChooseRequest();
         return false;
     }
     else
     {
         nextRequest = null;
         return true;
     }
 }
Exemplo n.º 4
0
        protected override bool canUse(Game game, Request nowRequest, FreeUse useInfo, out NextRequest nextRequest)
        {
            nextRequest = null;
            switch (nowRequest)
            {
            case UseLimitCard useLimitCard:
                return(Effects.UseWayResponse.CheckLimit(game, useLimitCard, useInfo, ref nextRequest, this));

            case FreeUseRequest freeUse:
                if (useInfo.PlayersId.Count < 1)
                {
                    nextRequest = new HeroChooseRequest()
                    {
                    };
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            return(false);
        }