예제 #1
0
		protected IEnumerator pauseForAttack(MoveQueueItem aMoveQueueItem,float aSeconds) {
			BetterList<BattleMonster> allTargets = aMoveQueueItem.targettedMonster;
			
			for(int i = 0;i<allTargets.size;i++) {
				
				if(aMoveQueueItem.moveData!=null) {
					if(!aMoveQueueItem.moveData.isBoost) {
						
						allTargets[i].doDefenseAnimation(this._currentItem);
					} else {
						 
						allTargets[i].doDefenseAnimation(this._currentItem);
					}
				}
			}
			
			yield return new WaitForSeconds(aSeconds);

			aMoveQueueItem.advanceMoveQueueFromState(EMoveQueueItemStatus.AttackAnimation);
		}
예제 #2
0
		protected void handlePostHitPassiveEffect(MoveQueueItem aItem) {
			aItem.advanceMoveQueueFromState(EMoveQueueItemStatus.HPHitsPassiveEffects);
		}
예제 #3
0
		private IEnumerator delayToAdvancedMoveQueue(EMoveQueueItemStatus aExpectedState,MoveQueueItem aMoveQueue,float aDelay) {
			yield return new WaitForSeconds(aDelay);
			aMoveQueue.advanceMoveQueueFromState(aExpectedState);
		}
예제 #4
0
		protected void checkIfMoveNeedsToChange(MoveQueueItem aMoveQueueItem) {
			if(!_teams[0].changeMoveIfNeeded(aMoveQueueItem))
				_teams[1].changeMoveIfNeeded(aMoveQueueItem);
			aMoveQueueItem.advanceMoveQueueFromState(EMoveQueueItemStatus.ChangeToOtherMove);
			
		}
예제 #5
0
		protected IEnumerator moveMonsterBackToPosition(MoveQueueItem aItem) {
			BattleTeam myTeam = aItem.actioningTeam;
			Vector3 pos = BattleConstants.getMyPosition(this.positionFromTeam(myTeam),myTeam.positionForMonster(aItem.actioningMonster.gameObject),this.transform.parent.gameObject.transform.position);
			Hashtable h = new Hashtable();
			h.Add("position",pos);
			h.Add ("time",0.5f);
		/*	h.Add ("oncompletetarget",this.gameObject);
			h.Add ("oncomplete","onDoAttackAnimation"); 
			h.Add ("oncompleteparams",actionMonster);*/
			h.Add("easetype",iTween.EaseType.easeOutCubic); 
			iTween.MoveTo(aItem.actioningMonster.gameObject,h);

			yield return new WaitForSeconds(0.5f);
			aItem.advanceMoveQueueFromState(EMoveQueueItemStatus.MoveBackToPosition);
		}
예제 #6
0
		protected IEnumerator applyStatusEffectsToTeams(MoveQueueItem aMoveQueueItem) {
			float delay = _teams[0].applyStatusEffectToTeam(aMoveQueueItem,this._commentaryManager);
			delay += _teams[1].applyStatusEffectToTeam(aMoveQueueItem,this._commentaryManager);
			yield return new WaitForSeconds(delay);
			aMoveQueueItem.advanceMoveQueueFromState(EMoveQueueItemStatus.StatusEffects);
		}
예제 #7
0
		protected void applyHPBoostsToTeams(MoveQueueItem aMoveQueueItem) {
			if(_teams[0].applyHPBoostsToTeam(aMoveQueueItem,_commentaryManager)||_teams[1].applyHPBoostsToTeam(aMoveQueueItem,_commentaryManager)) {
			
			} else {
				aMoveQueueItem.advanceMoveQueueFromState(EMoveQueueItemStatus.HPBoosts);
			}
		}
예제 #8
0
		protected void applyStatusBoostsToTeams(MoveQueueItem aMoveQueueItem) {
			if(_teams[0].applyHPStatusBoostsToTeam(aMoveQueueItem)||_teams[1].applyHPStatusBoostsToTeam(aMoveQueueItem)) {
				
			} else {
				aMoveQueueItem.advanceMoveQueueFromState(EMoveQueueItemStatus.StatusBoosts);
			}
		}
예제 #9
0
		private IEnumerator postMoveStatusEffectsDelayed(MoveQueueItem aMoveQueue) {
			float dmg = 0;
			float totalWaitRequired = 0.0f;

			if (!aMoveQueue.followOnMove) {
				moveFlags = moveFlags | EMoveFlag.AnyStatusEffecting;
				if (this._monsterRef.lingeringEffects.hasEffect (EStatusEffects.Burn)) {
					// Do Burn Effects
				
					moveFlags = moveFlags | EMoveFlag.HealthChanging;
					dmg = (int)(_monsterRef.MaxHP * BURN_PERCENT);
					if (dmg > this._monsterRef.hp) {
						dmg = this._monsterRef.hp;
					}
					this.doDefenseAnimation (null);
					this.hp -= dmg;
				
					StartCoroutine (doneHPChange ());
					this.doCommentaryMessage (this.name + " is hurt by it's Burn", ECommentaryMessageType.StandardMessage);
					this.doCommentaryMessage (dmg + "", ECommentaryMessageType.DamageMessage);
					this.showStatusEffect (EStatusEffects.Burn);
					totalWaitRequired += 0.1f;
					yield return new WaitForSeconds (1.5f);
				
				}
				if (this._monsterRef.lingeringEffects.hasEffect (EStatusEffects.Poison)) {
					moveFlags |= EMoveFlag.HealthChanging;
					dmg = (int)(_monsterRef.MaxHP * POISON_PERCENT);
					if (dmg > this._monsterRef.hp) {
						dmg = this._monsterRef.hp;
					}
					this.doDefenseAnimation (null);
					this.hp -= dmg;
				
					StartCoroutine (doneHPChange ());
					MoveLibItem responsibleForPoison = this._monsterRef.lingeringEffects.responsibleForPoison;
					if (responsibleForPoison != null)
						this.doCommentaryMessage (this.name + " is Poisoned. " + this.name + " was poisoned due to " + responsibleForPoison.moveOrPassiveEffectString + " " + responsibleForPoison.Name, ECommentaryMessageType.StandardMessage);
					else {
						this.doCommentaryMessage (this.name + " is Poisoned.", ECommentaryMessageType.StandardMessage);
						
					}
					this.doCommentaryMessage (dmg + "", ECommentaryMessageType.DamageMessage);
					totalWaitRequired += 0.1f;
				
					this.showStatusEffect (EStatusEffects.Poison);
					yield return new WaitForSeconds (1.5f);
				
				
				
				}
			
				yield return new WaitForSeconds (totalWaitRequired + 0.1f);
			
			
				moveFlags = moveFlags & ~EMoveFlag.AnyStatusEffecting;
			}
			aMoveQueue.advanceMoveQueueFromState(EMoveQueueItemStatus.InflictMyEffects);
			aMoveQueue = null;
		}
예제 #10
0
		private IEnumerator applyStatEffectorsToTeams(MoveQueueItem aMoveQueueItem) {
			float timeToDelay = _teams[0].applyStatEffectToTeam(aMoveQueueItem,this._commentaryManager);
			timeToDelay += _teams[1].applyStatEffectToTeam(aMoveQueueItem,this._commentaryManager);
			timeToDelay += 0.25f;
			yield return new WaitForSeconds(timeToDelay);
			
			aMoveQueueItem.advanceMoveQueueFromState(EMoveQueueItemStatus.StatEffectors);
		}