Esempio n. 1
0
		private void addStackingRound(BuffInfo info)
		{
			BuffStackInfo _stackInfo = new BuffStackInfo();
			_stackInfo.init(buffAction.CDRound);
			_stackInfo.Condition = info.Condition;
			stackingList.AddLast(_stackInfo);
		}
Esempio 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;
		}
Esempio 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);
		}
Esempio n. 4
0
		protected internal virtual void stackingNewBuff(BuffInfo info)
		{
			addStackingRound(info);
			refreshShowLeftRound();
		}
Esempio n. 5
0
		// TODO: result record
		public virtual void stackingBuff(BuffInfo info)
		{
			if (!canStacking())
			{
				removeFirstStack();
			}
			stackingNewBuff(info);
		}
Esempio n. 6
0
		public virtual BattleFighterBuff putToBuffHolder(BuffInfo buffInfo)
		{
			BuffTypeHolder _holder = getBuffTypeHolder(buffInfo.BuffAction);
			return _holder.putBuff(Owner, buffInfo);
		}