void ITeammate.Take(CommonSkillSet common_skill_set) { _Idle = new Dictionary<int, Skill>(); _Wait = new Queue<Skill>(); _Recover = new List<Skill>(); foreach (var skill in _Ability.Skills) { _Add(_Idle , SkillResources.Instance.Find(skill)); } var needCount = 10 - _Ability.Skills.Length; for (int i = 0; i < needCount; ++i) { _Add(_Idle , common_skill_set.Licensing()); } for (int i = 0; i < 20; ++i) { _Wait.Enqueue(common_skill_set.Licensing()); } }
Skill.Effect[] ITeammate.GetActivitiesEffects(Team team, CommonSkillSet common_skill_set) { List<Skill.Effect> effects = new List<Skill.Effect>(); List<int> removSkills = new List<int>(); foreach (var pair in _ActivitiesSkills) { var skill = pair.Value; Skill.Effect effect = skill.GetActivitiesEffect(); if (team.Consumer(effect.Demand)) { effects.Add(effect); if (skill.IsConsumed()) { removSkills.Add(pair.Key); _Recover.Add(skill); _Recover.Add(common_skill_set.Licensing()); } } } if (_RemoveEnableEvent != null) _RemoveEnableEvent( (from removeSkill in removSkills select _ActivitiesSkills[removeSkill].ToIndex(removeSkill)).ToArray() ); foreach(var skill in removSkills) { _ActivitiesSkills.Remove(skill); } return effects.ToArray(); }