Exemplo n.º 1
0
 public SetWorldStateEffect(NpcWorldState state, bool value, EffectType type)
 {
     Name  = $"SetState({state})";
     Type  = type;
     State = state;
     Value = (byte)(value ? 1 : 0);
 }
Exemplo n.º 2
0
 public SetWorldStateEffect(NpcWorldState state, byte value, EffectType type)
 {
     Name  = $"SetState({state})";
     Type  = type;
     State = state;
     Value = value;
 }
Exemplo n.º 3
0
        public NpcDomainBuilder HasStateGreaterThan(NpcWorldState state, byte value)
        {
            var condition = new HasWorldStateGreaterThanCondition(state, value);

            Pointer.AddCondition(condition);
            return(this);
        }
Exemplo n.º 4
0
 public IncrementWorldStateEffect(NpcWorldState state, EffectType type)
 {
     Name  = $"IncrementState({state})";
     Type  = type;
     State = state;
     Value = 1;
 }
Exemplo n.º 5
0
        public NpcDomainBuilder HasState(NpcWorldState state)
        {
            var condition = new HasWorldStateCondition(state);

            Pointer.AddCondition(condition);
            return(this);
        }
Exemplo n.º 6
0
        public NpcDomainBuilder SetState(NpcWorldState state, byte value, EffectType type)
        {
            if (Pointer is IPrimitiveTask task)
            {
                var effect = new SetWorldStateEffect(state, value, type);
                task.AddEffect(effect);
            }

            return(this);
        }
Exemplo n.º 7
0
 public HasWorldStateCondition(NpcWorldState state, byte value)
 {
     Name  = $"HasState({state})";
     State = state;
     Value = value;
 }
Exemplo n.º 8
0
 public HasWorldStateCondition(NpcWorldState state)
 {
     Name  = $"HasState({state})";
     State = state;
     Value = 1;
 }
Exemplo n.º 9
0
 public NpcDomainBuilder DecrementState(NpcWorldState state, EffectType type)
 {
     return(DecrementState(state, 1, type));
 }
Exemplo n.º 10
0
 public byte GetState(NpcWorldState state)
 {
     return(GetState((int)state));
 }
Exemplo n.º 11
0
 public void SetState(NpcWorldState state, byte value, EffectType type)
 {
     SetState((int)state, value, true, type);
 }
Exemplo n.º 12
0
 public void SetState(NpcWorldState state, bool value, EffectType type)
 {
     SetState((int)state, (byte)(value ? 1 : 0), true, type);
 }
Exemplo n.º 13
0
 public bool HasState(NpcWorldState state)
 {
     return(HasState((int)state, 1));
 }
Exemplo n.º 14
0
 public bool HasState(NpcWorldState state, byte value)
 {
     return(HasState((int)state, value));
 }
Exemplo n.º 15
0
 public bool HasState(NpcWorldState state, bool value)
 {
     return(HasState((int)state, (byte)(value ? 1 : 0)));
 }