public CharacterActionItem(string name, string icon, CharacterActionType action, object tag) { Name = name; Icon = icon; Action = action; Tag = tag; }
public MCTSTree(CharacterActionType action) { this.action = action; nbVictories = 0; nbSimulations = 0; children = new List <MCTSTree>(); }
public CharacterActionListImpl(CharacterActionType type, KeyBindCommandGenerator generator, CharacterActionContainer owner) { Type = type; Generator = generator; //ListByOrder = new SortedDictionary<int, T>(); Owner = (ManagedCharacter)owner; }
/// <summary> /// </summary> /// <param name="character"> /// </param> /// <param name="actionType"> /// </param> /// <param name="target"> /// </param> /// <param name="unknown1"> /// </param> /// <param name="unknown2"> /// </param> public void FinishNanoCasting( ICharacter character, CharacterActionType actionType, Identity target, int unknown1, int unknown2) { this.Send(character, this.ConstructFinishNanoCasting(character, target, unknown1, unknown2), true); }
public Action(CharacterActionType ActionType, int Position, CharacterBase Owner, int Value = 0) { this.ActionType = ActionType; this.Position = Position; this.Owner = Owner; this.Value = Value; this.Duration = 0; UpdateKeyForm(); }
private int Simulate(MCTSTree node) { GameSimulator.ResetSimulation(node.gameState); while (!GameSimulator.IsSimulationFinished()) { List <CharacterActionType> actions = GameSimulator.GetNextPossibleActions(node); CharacterActionType selectedAction = GameSimulator.GetRandomAction(actions); GameSimulator.PlayAction(selectedAction); } return(GameSimulator.GetResult(id)); }
/// <summary> /// Perform all Interactions associated with the given action. /// </summary> /// <param name="action"></param> void PerformInteraction(CharacterActionType action) { for (int i = 0; i < m_Interactions.Length; ++i) { if (m_Interactions[i].Action == action && m_Interactions[i].Reaction != null) { Debug.Log("Interaction " + action); StartCoroutine(m_Interactions[i].Reaction.Execute()); return; } } AdventureGameOverlayManager.Instance.DisplayCharacterDialogue("I can't do that.", "Character"); }
public CharacterActionItem(string name, string icon, CharacterActionType action) { Name = name; Icon = icon; Action = action; }
public static CharacterActionResult TakeAction(CombatState state, CharacterActionType action, Character primaryChar, List <Character> allChars, object param) { CharacterActionResult res = CharacterActionResult.None; switch (action) { case CharacterActionType.MakeIdle: foreach (Character ch in allChars) { ch.IsIdle = true; } state.FilterList(); break; case CharacterActionType.RemoveIdle: foreach (Character ch in allChars) { ch.IsIdle = false; } state.FilterList(); break; case CharacterActionType.Clone: foreach (Character ch in allChars) { state.CloneCharacter(ch); } break; case CharacterActionType.Delete: foreach (Character ch in allChars) { state.RemoveCharacter(ch); } break; case CharacterActionType.MoveToMonsters: foreach (Character ch in allChars) { if (!ch.IsMonster) { state.RemoveCharacter(ch); ch.IsMonster = true; state.AddCharacter(ch); } } state.FilterList(); break; case CharacterActionType.MoveToParty: foreach (Character ch in allChars) { if (ch.IsMonster) { state.RemoveCharacter(ch); ch.IsMonster = false; state.AddCharacter(ch); } } state.FilterList(); break; case CharacterActionType.MoveUpInitiative: state.MoveUpCharacter(primaryChar); break; case CharacterActionType.MoveDownInitiative: state.MoveDownCharacter(primaryChar); break; case CharacterActionType.MoveAfterInitiative: state.MoveCharacterAfter(primaryChar, (Character)param); break; case CharacterActionType.MoveBeforeInitiative: state.MoveCharacterBefore(primaryChar, (Character)param); break; case CharacterActionType.RollInitiative: state.RollIndividualInitiative(primaryChar); state.SortCombatList(false, false); break; case CharacterActionType.Ready: primaryChar.IsReadying = !primaryChar.IsReadying; if (primaryChar.IsReadying && primaryChar.IsDelaying) { primaryChar.IsDelaying = false; } break; case CharacterActionType.Delay: primaryChar.IsDelaying = !primaryChar.IsDelaying; if (primaryChar.IsReadying && primaryChar.IsDelaying) { primaryChar.IsReadying = false; } break; case CharacterActionType.ActNow: if (primaryChar.IsIdle) { primaryChar.IsIdle = false; } state.CharacterActNow(primaryChar); break; case CharacterActionType.LinkInitiative: Character targetChar = (Character)param; if (primaryChar != targetChar && targetChar.InitiativeLeader == null) { state.LinkInitiative(primaryChar, (Character)param); } break; case CharacterActionType.UnlinkInitiative: state.UnlinkLeader(primaryChar); break; case CharacterActionType.AddConditon: if (param != null) { Condition c = (Condition)param; foreach (Character ch in allChars) { ActiveCondition a = new ActiveCondition(); a.Condition = c; ch.Stats.AddCondition(a); Condition.PushRecentCondition(a.Condition); } } else { res = CharacterActionResult.NeedConditionDialog; } break; case CharacterActionType.EditNotes: res = CharacterActionResult.NeedNotesDialog; break; case CharacterActionType.EditMonster: res = CharacterActionResult.NeedMonsterEditorDialog; break; case CharacterActionType.RollAttack: res = CharacterActionResult.RollAttack; break; case CharacterActionType.RollAttackSet: res = CharacterActionResult.RollAttackSet; break; case CharacterActionType.RollSave: res = CharacterActionResult.RollSave; break; case CharacterActionType.RollSkill: res = CharacterActionResult.RollSkill; break; } return(res); }
//Updates the current simulation's state by laying the action required by the AI. public static void PlayAction(CharacterActionType action) { }
public ZavierActions(CharacterActionType actionType, Node destination) : base(actionType, destination) { }
public bool HasActionsWithType(CharacterActionType Type) { return(Actions.Find((action) => action.ActionType == Type) != null); }
public int CountActionsByType(CharacterActionType Type) { return(Actions.Aggregate(0, (total, action) => action.ActionType == Type ? 1 : 0)); }
public AddActionEvent(CharacterActionType type) { this.AddedActionType = type; }
public CharacterAction(CharacterActionType actionType, Node destination) { this.actionType = actionType; this.destination = destination; onComplete = null; }
public void HandleActionButtonClick(CharacterActionType characterActionType) { InputSystemManager.Instance.currentlySelectedActionType = characterActionType; Debug.Log(characterActionType); }