public CharacterTeam(Controllers.Character characterController) { m_characterTeamModel = new TBS.Models.CharacterTeam(); m_character = characterController; m_items = new List <Item>(); m_spells = new List <Spell>(); }
public bool AddCharacter(Controllers.Character character) { if (Characters.Count < 4) { if (m_teamModel.Characters == null) { m_teamModel.Characters = new List <TBS.Models.CharacterTeam>(); } TBS.Models.CharacterTeam characterTeamModel = new TBS.Models.CharacterTeam() { CharacterId = character.Id }; m_teamModel.Characters.Add(characterTeamModel); m_characters.Add(new Controllers.CharacterTeam(characterTeamModel)); return(true); } return(false); }
public Character(Controllers.CharacterTeam characterTeam, BattleEntities.Player playerBattle = null) { m_characterController = characterTeam.CharacterController; m_playerBattle = playerBattle; m_spells = new List <Spell>(); for (int i = 0; i < m_characterController.SpellControllers.Count; i++) { m_spells.Add(new BattleEntities.Spell(m_characterController.SpellControllers[i], this)); } m_movementPoints = MovementPointsBase; m_actionPoints = ActionPointsBase; m_damagePoints = DamagePointsBase; m_armorPoints = ArmorPointsBase; m_visionPoints = VisionPointsBase; m_lifePoints = LifePointsBase; m_initiativePoints = InitiativePoints; m_items = characterTeam.Items; }
public CharacterTeam(TBS.Models.CharacterTeam characterTeamModel) { m_characterTeamModel = characterTeamModel; m_character = Database.Characters.Find(x => x.Id == characterTeamModel.CharacterId); m_items = new List <Item>(); m_spells = new List <Spell>(); if (characterTeamModel.Items != null) { for (int i = 0; i < characterTeamModel.Items.Count; i++) { m_items.Add(Database.Items.Find(x => x.Id == characterTeamModel.Items[i])); } } if (characterTeamModel.Spells != null) { for (int i = 0; i < characterTeamModel.Spells.Count; i++) { m_spells.Add(Database.Spells.Find(x => x.Id == characterTeamModel.Spells[i])); } } }