Exemplo n.º 1
0
		private void addStackingRound(BuffInfo info)
		{
			BuffStackInfo _stackInfo = new BuffStackInfo();
			_stackInfo.init(buffAction.CDRound);
			_stackInfo.Condition = info.Condition;
			stackingList.AddLast(_stackInfo);
		}
Exemplo n.º 2
0
		public virtual BattleFighterBuff putBuff(BattleFighter owner, BuffInfo info)
		{
			IBuffAction _buffAction = info.BuffAction;
			BattleFighterBuff _buff = createBattleFighterBuff(owner, _buffAction);
			buffMap[_buffAction.TypeB] = _buff;
			_buff.stackingBuff(info);
			return _buff;
		}
Exemplo n.º 3
0
		/// <summary>
		/// 上个buff,先算出个数是否已满,再查看buff增加的策略
		/// </summary>
		/// <param name="buffId"> </param>
		public virtual void addBuff(BuffInfo buffInfo)
		{
			// TODO: add battle report
			IBuffAction _buffAction = getBuffAction(buffInfo.BuffId);

			if (_buffAction == null)
			{
				// TODO: add error log
				return;
			}

			if (hasMaxCountBuff(_buffAction))
			{
				// TODO: log max buff
				return;
			}
			buffInfo.BuffAction = _buffAction;

			BuffPolicyEnum _policyType = calcPolicy(_buffAction);

			_policyType.addBuff(this, buffInfo);
		}
Exemplo n.º 4
0
		protected internal virtual void stackingNewBuff(BuffInfo info)
		{
			addStackingRound(info);
			refreshShowLeftRound();
		}
Exemplo n.º 5
0
		// TODO: result record
		public virtual void stackingBuff(BuffInfo info)
		{
			if (!canStacking())
			{
				removeFirstStack();
			}
			stackingNewBuff(info);
		}
Exemplo n.º 6
0
		public virtual BattleFighterBuff putToBuffHolder(BuffInfo buffInfo)
		{
			BuffTypeHolder _holder = getBuffTypeHolder(buffInfo.BuffAction);
			return _holder.putBuff(Owner, buffInfo);
		}