Inheritance: SkillResultBase, ITargetAgentResult
示例#1
0
		public virtual ITargetAgentResult MockFeint(IAgent self, IAgentInfo target) {
			ITargetAgentResult ret;

			var selfAgentInfo = this.Agents[self];
			if (selfAgentInfo.Node == target.Node) {
				ret = new TargetAgentResult {
					AffectedAgent = null,
					Result = AgentResultType.Success,
					Cooldown = 1,
					LastsFor = 1,
					Warmup = 1,
					Message = "Success mock Feint."
				};
			}
			else {
				ret = new TargetAgentResult {
					AffectedAgent = null,
					Result = AgentResultType.FailedOutOfRange,
					Cooldown = 1,
					LastsFor = 1,
					Warmup = 1,
					Message = "Failed (out-of-range) mock Feint."
				};
			}

			this.WaitToNextTick(self);
			if (ret.Result == Gr1d.Api.Skill.AgentResultType.Success) {
				var okTarget = (AgentInfo)target;
				okTarget.EffectsList.Add(AgentEffect.Feint);
			}

			this.Trace(self, TraceType.Information
				, "MOCK-Attack!"
				, "Self={", self, "}"
				, "Target={", target, "}"
				, "Result={", ret, "}");

			return ret;
		}
示例#2
0
		public virtual ITargetAgentResult MockSummon(IAgent self, IAgentInfo target) {
			ITargetAgentResult ret;
			var selfAgentInfo = this.Agents[self];

			if (selfAgentInfo.Owner.Id == target.Owner.Id) {
				ret = new TargetAgentResult {
					AffectedAgent = target,
					Result = AgentResultType.Success,
					Cooldown = 1,
					LastsFor = 1,
					Warmup = 1,
					Message = "Success mock summon."
				};
			}
			else {
				ret = new TargetAgentResult {
					AffectedAgent = target,
					Result = AgentResultType.FailedInvalidTarget,
					Cooldown = 1,
					LastsFor = 1,
					Warmup = 1,
					Message = "Failed (invalid-target) mock summon."
				};
			}

			this.WaitToNextTick(self);
			if (ret.Result == Gr1d.Api.Skill.AgentResultType.Success) {
				var okTarget = (AgentInfo)target;
				okTarget.Node = selfAgentInfo.Node;
			}

			this.Trace(self, TraceType.Information
				, "MOCK-Attack!"
				, "Self={", self, "}"
				, "Target={", target, "}"
				, "Result={", ret, "}");

			return ret;
		}
示例#3
0
		public virtual ITargetAgentResult MockInit3(IAgent self, IAgentInfo target) {
			ITargetAgentResult ret;

			var selfAgentInfo = this.Agents[self];
			if (selfAgentInfo.Node == target.Node) {
				ret = new TargetAgentResult {
					AffectedAgent = target,
					Result = AgentResultType.Success,
					Cooldown = 1,
					LastsFor = 1,
					Warmup = 1,
					Message = "Success mock Init3."
				};
			}
			else {
				ret = new TargetAgentResult {
					AffectedAgent = target,
					Result = AgentResultType.FailedOutOfRange,
					Cooldown = 1,
					LastsFor = 1,
					Warmup = 1,
					Message = "Failed (out-of-range) mock Init3."
				};
			}

			this.WaitToNextTick(self);
			if (ret.Result == AgentResultType.Success) {
				var okTarget = (AgentUpdateInfo)target;
				var badEffects = BasicInfo.GetBadAgentEffects();
				okTarget.EffectsList.RemoveAll(e => badEffects.Contains(e));
			}
			
			this.Trace(self, TraceType.Information
				, "MOCK-Attack!"
				, "Self={", self, "}"
				, "Target={", target, "}"
				, "Result={", ret, "}");

			return ret;
		}