Ejemplo n.º 1
0
        private void ConstructDMActions()
        {
            dmActions = new List<ActionAggregate> ();

            var preconditions = new List<Condition>{ };
            var dramaManagerAction = new ActionAggregate(ActionLibrary.BlowUpThePrison, 6, preconditions);
            dmActions.Add(dramaManagerAction);
        }
Ejemplo n.º 2
0
        private void ConstructAllActions()
        {
            allActions = new List<ActionAggregate>();

            var preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerKnowsAboutDesireToKill, ConditionLibrary.PlayerKnowsToKillReceiver, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerCloseEnoughToRevealReceiver, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.IsItemNotDistance};
            var killCharacter = new ActionAggregate(ActionLibrary.CloseKillCharacter, 6, preconditions);
            this.AddAction(killCharacter);

            preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerKnowsAboutDesireToKill, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.IsItemDistance, ConditionLibrary.PlayerHasInstigatorItem};//ConditionLibrary.IsItemDistance TODO; This is a problem
            killCharacter = new ActionAggregate(ActionLibrary.DistanceKillCharacter, 6, preconditions);
            this.AddAction(killCharacter);

            //preconditions = new List<Condition>{ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerKnowsAboutDesireToKill, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.PlayerDoesntKnowToKillReceiver, ConditionLibrary.PlayerDoesntKnowAboutWantsItem};
            preconditions = new List<Condition>{ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.PlayerDoesntKnowAboutWantsItem};
            killCharacter = new ActionAggregate(ActionLibrary.TellPlayerToComeBack, 3, preconditions);
            this.AddAction(killCharacter);

            preconditions = new List<Condition>{ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.PlayerDoesntKnowToKillReceiver, ConditionLibrary.PlayerKnowsAboutWantsItem, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.IsItemNotDistance};
            killCharacter = new ActionAggregate(ActionLibrary.TellPlayerToKill, 4, preconditions);
            this.AddAction(killCharacter);

            preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorHidden, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowAboutDesireToKill, ConditionLibrary.PlayerDoesntKnowsInstigator,  ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.DoesStateNotHaveInstigatorItem};
            var intro = new ActionAggregate(ActionLibrary.IntroduceMurderQuest, 2, preconditions);
            this.AddAction(intro);

            preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorHidden, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowsInstigator, ConditionLibrary.DoesStateNotHaveInstigatorItem};
            intro = new ActionAggregate(ActionLibrary.IntroduceSelf, 1, preconditions);
            this.AddAction(intro);

            preconditions = new List<Condition>{ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowAboutDesireToKill, ConditionLibrary.PlayerKnowsInstigator, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.DoesStateNotHaveInstigatorItem};
            intro = new ActionAggregate(ActionLibrary.TellWantToKill, 2, preconditions);
            this.AddAction(intro); //TODO; figure out if can remove this

            preconditions = new List<Condition>{ConditionLibrary.PlayerDoesntKnowsInstigator, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasReceiverItem, ConditionLibrary.DoesStateNotHaveInstigatorItem};
            intro = new ActionAggregate(ActionLibrary.IntroduceSelfDistance, 1, preconditions);
            this.AddAction(intro);

            // The escape quest.
            preconditions = new List<Condition> { ConditionLibrary.IsInstigatorHidden, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowsInstigator, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.DoesStateNotHaveInstigatorItem};
            intro = new ActionAggregate(ActionLibrary.IntroduceEscapeQuest, 2, preconditions);
            this.AddAction(intro);

            preconditions = new List<Condition> { ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasLiberatingItem, ConditionLibrary.PlayerDoesntKnowAboutWantsItem, ConditionLibrary.DoesStateHaveLiberatingItem };
            var escape = new ActionAggregate(ActionLibrary.TellPlayerToComeBack, 3, preconditions);
            this.AddAction(escape);

            preconditions = new List<Condition> { ConditionLibrary.IsInstigatorAlive, ConditionLibrary.PlayerHasLiberatingItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerKnowsAboutWantsItem };
            escape = new ActionAggregate(ActionLibrary.TakeItemFromPlayer, 2, preconditions);
            this.AddAction(escape);

            preconditions = new List<Condition> { ConditionLibrary.IsInstigatorAlive, ConditionLibrary.DoesInstigatorHaveItem, ConditionLibrary.IsItemLiberating, ConditionLibrary.ItemIsInstigators };
            escape = new ActionAggregate(ActionLibrary.FreeCharacterWithItem, 6, preconditions);
            this.AddAction(escape);

            AddConditionToAll (ConditionLibrary.NotEnded);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds a new action to the library.
 /// </summary>
 /// <param name="newAction">The new action.</param>
 public void AddAction(ActionAggregate newAction)
 {
     allActions.Add(newAction);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Adds a new action to the library.
 /// </summary>
 /// <param name="newAction">The new action.</param>
 public void AddAction(ActionAggregate newAction){
     allActions.Add(newAction);
 }
Ejemplo n.º 5
0
		private void ConstructDMActions(){
			dmActions = new List<ActionAggregate> ();

			var preconditions = new List<Condition>{ };
			var dramaManagerAction = new ActionAggregate(ActionLibrary.BlowUpThePrison, 6, preconditions);
			dmActions.Add(dramaManagerAction);
		}
Ejemplo n.º 6
0
		private void ConstructAllActions(){
			allActions = new List<ActionAggregate>();

			var preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerKnowsAboutDesireToKill, ConditionLibrary.PlayerKnowsToKillReceiver, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerCloseEnoughToRevealReceiver, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.IsItemNotDistance};
			var killCharacter = new ActionAggregate(ActionLibrary.CloseKillCharacter, 6, preconditions);
			this.AddAction(killCharacter);

			preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerKnowsAboutDesireToKill, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.IsItemDistance, ConditionLibrary.PlayerHasInstigatorItem};//ConditionLibrary.IsItemDistance TODO; This is a problem
			killCharacter = new ActionAggregate(ActionLibrary.DistanceKillCharacter, 6, preconditions);
			this.AddAction(killCharacter);

			//preconditions = new List<Condition>{ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerKnowsAboutDesireToKill, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.PlayerDoesntKnowToKillReceiver, ConditionLibrary.PlayerDoesntKnowAboutWantsItem};
			preconditions = new List<Condition>{ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.PlayerDoesntKnowAboutWantsItem};
			killCharacter = new ActionAggregate(ActionLibrary.TellPlayerToComeBack, 3, preconditions);
			this.AddAction(killCharacter);

			preconditions = new List<Condition>{ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasLethalItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.PlayerDoesntKnowToKillReceiver, ConditionLibrary.PlayerKnowsAboutWantsItem, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.IsItemNotDistance};
			killCharacter = new ActionAggregate(ActionLibrary.TellPlayerToKill, 4, preconditions);
			this.AddAction(killCharacter);

			preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorHidden, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowAboutDesireToKill, ConditionLibrary.PlayerDoesntKnowsInstigator,  ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.DoesStateNotHaveInstigatorItem};
			var intro = new ActionAggregate(ActionLibrary.IntroduceMurderQuest, 2, preconditions);
			this.AddAction(intro);

			preconditions = new List<Condition>{ ConditionLibrary.IsInstigatorHidden, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowsInstigator, ConditionLibrary.DoesStateNotHaveInstigatorItem};
			intro = new ActionAggregate(ActionLibrary.IntroduceSelf, 1, preconditions);
			this.AddAction(intro);

			preconditions = new List<Condition>{ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowAboutDesireToKill, ConditionLibrary.PlayerKnowsInstigator, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.DoesStateNotHaveInstigatorItem};
			intro = new ActionAggregate(ActionLibrary.TellWantToKill, 2, preconditions);
			this.AddAction(intro); //TODO; figure out if can remove this

			preconditions = new List<Condition>{ConditionLibrary.PlayerDoesntKnowsInstigator, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasReceiverItem, ConditionLibrary.DoesStateNotHaveInstigatorItem};
			intro = new ActionAggregate(ActionLibrary.IntroduceSelfDistance, 1, preconditions);
			this.AddAction(intro);

            // The escape quest.
			preconditions = new List<Condition> { ConditionLibrary.IsInstigatorHidden, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerDoesntKnowsInstigator, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.DoesStateNotHaveInstigatorItem};
            intro = new ActionAggregate(ActionLibrary.IntroduceEscapeQuest, 2, preconditions);
            this.AddAction(intro);

            preconditions = new List<Condition> { ConditionLibrary.IsInstigatorAlive, ConditionLibrary.IsReceiverAlive, ConditionLibrary.InstigatorNotReceiver, ConditionLibrary.PlayerHasLiberatingItem, ConditionLibrary.PlayerDoesntKnowAboutWantsItem, ConditionLibrary.DoesStateHaveLiberatingItem };
            var escape = new ActionAggregate(ActionLibrary.TellPlayerToComeBack, 3, preconditions);
            this.AddAction(escape);

			preconditions = new List<Condition> { ConditionLibrary.IsInstigatorAlive, ConditionLibrary.PlayerHasLiberatingItem, ConditionLibrary.PlayerHasInstigatorItem, ConditionLibrary.CloseEnoughToPlayer, ConditionLibrary.PlayerKnowsAboutWantsItem };
            escape = new ActionAggregate(ActionLibrary.TakeItemFromPlayer, 2, preconditions);
            this.AddAction(escape);

			preconditions = new List<Condition> { ConditionLibrary.IsInstigatorAlive, ConditionLibrary.DoesInstigatorHaveItem, ConditionLibrary.IsItemLiberating, ConditionLibrary.ItemIsInstigators };
            escape = new ActionAggregate(ActionLibrary.FreeCharacterWithItem, 6, preconditions);
            this.AddAction(escape);  

			AddConditionToAll (ConditionLibrary.NotEnded);
        }