protected override bool CheckIntern(BaseReqArgument bra) { bra.NeedMapException(); if (bra.sett == "near") { foreach (var pos in CircleGenerator.Gen(bra.pos, 1)) { if (S.Players().OverlayHighest("frontier", pos) == bra.player) { return(true); } } return(false); } var p = S.Players().OverlayHighest("frontier", bra.pos); switch (bra.sett) { case "own": return(p == bra.player); case "enemy": return(p != null && p != bra.player); case "none": return(p == null); default: throw new ArgumentException(bra.sett + " is unknown."); } }
protected override bool CheckIntern(BaseReqArgument bra) { bra.NeedMapException(); if (bra.onMap == null) { bra.onMap = S.Unit().At(bra.pos); } if (bra.onMap == null) { return(false); } switch (bra.sett) { case "own": return(bra.onMap.Player() == bra.player); case "enemy": return(bra.onMap.Player() != bra.player); default: throw new ArgumentException(bra.sett + " is unknown."); } }