示例#1
0
 public PlayerStats(PlayedCharacter owner)
 {
     if (owner == null) throw new ArgumentNullException("owner");
     Fields = new Dictionary<PlayerField, StatsRow>();
     SpellsModifications = new ObservableCollection<SpellModification>();
     Owner = owner;
 }
示例#2
0
 public SpellsBook(PlayedCharacter owner)
 {
     if (owner == null) throw new ArgumentNullException("owner");
     Character = owner;
     m_spells = new ObservableCollectionMT<Spell>();
     m_readOnlySpells = new ReadOnlyObservableCollectionMT<Spell>(m_spells);
 }
示例#3
0
 public PlayerStats(PlayedCharacter owner, CharacterCharacteristicsInformations stats)
 {
     if (stats == null) throw new ArgumentNullException("stats");
     Fields = new Dictionary<PlayerField, StatsRow>();
     SpellsModifications = new ObservableCollection<SpellModification>();
     Update(stats);
 }
示例#4
0
        public override bool CanStart(PlayedCharacter character)
        {
            if (Path.Length == 0)
                return false;

            return (StartFromFirst && Path[0].MapId == character.Map.Id && Path[0].SubMapId == character.SubMap.SubMapId) ||
                Path.Any(x => character.Map.Id == x.MapId && character.SubMap.SubMapId == x.SubMapId);
        }
示例#5
0
 public PlayedFighter(PlayedCharacter character, Fight fight)
     : base(fight)
 {
     Character = character;
     Map = character.Map;
     Cell = character.Cell;
     Direction = character.Direction;
 }
示例#6
0
        public Inventory(PlayedCharacter owner, InventoryContentMessage inventory)
            : this(owner)
        {
            if (inventory == null) throw new ArgumentNullException("inventory");
            Kamas = inventory.kamas;

            Update(inventory);
        }
示例#7
0
 public Inventory(PlayedCharacter owner)
 {
     if (owner == null) throw new ArgumentNullException("owner");
     Owner = owner;
     m_items = new ObservableCollectionMT<Item>();
     m_readOnlyItems = new ReadOnlyObservableCollectionMT<Item>(m_items);
     AutomaticallyDestroyItemsOnOverload = false;
 }
示例#8
0
        public PlayedFighter(PlayedCharacter character, Fight fight)
            : base(fight)
        {
            Character = character;
            Fight = fight;

            if (character.Position != null)
                Position = character.Position.Clone();
        }
示例#9
0
 public PlayedFighter(PlayedCharacter character, Fight fight)
     : base(fight)
 {
     Character = character;
     Map = character.Map;
     Cell = character.Cell;
     Direction = character.Direction;
     CanFight = true;
     CanCastSpells = true;
 }
        public override bool BeginTransition(SubMap @from, SubMapBinder to, PlayedCharacter character)
        {
            if (!character.ChangeMap(MapNeighbour, cell => Cells == null || Cells.Length == 0 || Array.IndexOf(Cells, cell.CellId) != -1))
            {
                logger.Error("Cannot proceed transition : cannot reach {0} map from {1} (submap:{2} to {3})",
                             MapNeighbour, character.Map.Id, @from.GlobalId, to.GlobalId);

                return false;
            }

            return true;
        }
示例#11
0
 public void Init(PlayedCharacter character)
 {
   FavoredAttackSpells = new List<int>();
   FavoredBoostSpells = new List<int>();
   FavoredCurseSpells = new List<int>();
   FavoredHealSpells = new List<int>();
   FavoredInvocSpells = new List<int>();
   IsInvoker = false;
   IsHealer = false;
   // You can set here default preference for each breed   
   MaxPower = 1.0;
   switch ((BreedEnum)character.Breed.Id)
   {
     case BreedEnum.Cra:
       break;
     case BreedEnum.Ecaflip:
       break;
     case BreedEnum.Eniripsa:
       IsHealer = true;
       MaxPower = 0.8;
       FavoredBoostSpells = new List<int>() { 126 }; // Mot stimulant                   
       break;
     case BreedEnum.Enutrof:
       break;
     case BreedEnum.Feca:
       break;
     case BreedEnum.Iop:
       MaxPower = 1.5;
       break;
     case BreedEnum.Osamodas:
       FavoredBoostSpells = new List<int>() { 26 }; // Bénédiction animale
       IsInvoker = true;
       break;
     case BreedEnum.Pandawa:
       break;
     case BreedEnum.Roublard:
       break;
     case BreedEnum.Sacrieur:
       break;
     case BreedEnum.Sadida:
       break;
     case BreedEnum.Sram:
       break;
     case BreedEnum.Steamer:
       break;
     case BreedEnum.Xelor:
       break;
     case BreedEnum.Zobal:
       break;
     default:
       break;
   }
 }
示例#12
0
        public void Start(PlayedCharacter character)
        {
            if (IsPaused)
            {
                Resume();
                return;
            }

            if (IsRunning)
                return;

            IsRunning = true;
            Character = character;

            OnStart();
        }
示例#13
0
        public void Start(PlayedCharacter character)
        {
            if (IsPaused)
            {
                Resume();
                return;
            }

            if (IsRunning)
                return;

            IsRunning = true;
            Character = character;

            CurrentAction.Finished += OnCurrentActionFinished;

            OnStart();
        }
示例#14
0
 public GeneralShortcut(PlayedCharacter character, int slot)
     : base(character, slot)
 {
     
 }
示例#15
0
 public SpellsBook(PlayedCharacter owner, SpellListMessage list)
     : this(owner)
 {
     if (list == null) throw new ArgumentNullException("list");
     Update(list);
 }
示例#16
0
 private void OnFightLeft(PlayedCharacter character, Fight fight)
 {
     m_character = null;
     character.Fighter.TurnStarted -= OnTurnStarted;
     fight.StateChanged -= OnStateChanged;
 }
示例#17
0
 public SpellShortcut(PlayedCharacter character, ShortcutSpell shortcut)
     : base(shortcut.slot)
 {
     Character = character;
     SpellId = shortcut.spellId;
 }
示例#18
0
 public SpellsBook(PlayedCharacter owner)
 {
     if (owner == null) throw new ArgumentNullException("owner");
     Character = owner;
     Spells = new ObservableCollection<Spell>();
 }
示例#19
0
 public PlayerStats(PlayedCharacter owner, CharacterCharacteristicsInformations stats)
     : this()
 {
     if (stats == null) throw new ArgumentNullException("stats");
     Update(stats);
 }
示例#20
0
 public PlayerStats(PlayedCharacter owner)
     : this()
 {
     if (owner == null) throw new ArgumentNullException("owner");
     Owner = owner;
 }
示例#21
0
 private void OnMapJoined(PlayedCharacter character, Map map)
 {
     m_checkTimer = character.Bot.CallPeriodically(4 * 1000, CheckMonsters);
 }
示例#22
0
 public Job(PlayedCharacter owner, JobDescription job)
 {
     Owner = owner;
     SetJob(job);
 }
示例#23
0
        public void SetPlayedCharacter(PlayedCharacter character)
        {
            if (m_disposed)
                throw new Exception("Bot instance is disposed");

            if (character == null) throw new ArgumentNullException("character");
            if (Character != null)
                throw new Exception("Character already selected");

            Character = character;
            OnCharactersSelected(character);
        }
示例#24
0
 public bool CheckCriteria(PlayedCharacter pc)
 {
     if (string.IsNullOrEmpty(this.Template.criteria)) return true;
     return pc.CheckCriteria(this.Template.criteria);
 }
 public abstract bool CanActivate(SchemaElement element, PlayedCharacter character);
示例#26
0
 protected void OnCharactersSelected(PlayedCharacter character)
 {
     CharacterSelectedHandler handler = CharactersSelected;
     if (handler != null) handler(this, character);
 }
示例#27
0
 public abstract bool CanRun(PlayedCharacter character);
示例#28
0
 public Inventory(PlayedCharacter owner)
 {
     if (owner == null) throw new ArgumentNullException("owner");
     Owner = owner;
     Items = new ObservableCollection<Item>();
 }
示例#29
0
 public override bool CanRun(PlayedCharacter character)
 {
     // + conditions
     return character.CanMove();
 }
示例#30
0
        public bool BeginTransition(PlayedCharacter character)
        {
            if (IsEnded())
                return true;

            CurrentTransition.TransitionEnded += CurrentTransitionOnTransitionEnded;
            return CurrentTransition.BeginTransition(character.SubMap, SubMaps[Index + 1], character);
        }