Пример #1
0
        public override VerifierResult Verify(Player source, ICard card, List <Player> targets, bool isLooseVerify)
        {
            // @todo: LooseVerify has not been defined.
            if (targets != null && targets.Count != 0 &&
                (targets.Count > 1 || DelayedToolConflicting(targets[0]) || targets[0] == source))
            {
                return(VerifierResult.Fail);
            }
            if (targets == null || targets.Count == 0)
            {
                return(VerifierResult.Partial);
            }
            Player dest = targets[0];
            var    args = new AdjustmentEventArgs();

            args.Source  = source;
            args.Targets = new List <Player>()
            {
                dest
            };
            args.Card             = card;
            args.AdjustmentAmount = 0;
            Game.CurrentGame.Emit(GameEvent.CardRangeModifier, args);
            if (Game.CurrentGame.DistanceTo(source, dest) > 1 + args.AdjustmentAmount)
            {
                return(VerifierResult.Fail);
            }
            return(VerifierResult.Success);
        }
Пример #2
0
        protected override bool ShunChaiAdditionalCheck(Player source, Player dest, ICard card)
        {
            var args = new AdjustmentEventArgs();

            args.Source  = source;
            args.Targets = new List <Player>()
            {
                dest
            };
            args.Card             = card;
            args.AdjustmentAmount = 0;
            Game.CurrentGame.Emit(GameEvent.CardRangeModifier, args);
            if (Game.CurrentGame.DistanceTo(source, dest) > 1 + args.AdjustmentAmount)
            {
                return(false);
            }
            return(true);
        }