public Character(Character character) { this.name = character.name; this.tasteTranslater = character.tasteTranslater; this.characterStats = character.characterStats; this.charAbilitiesIndex = new List<int>(character.charAbilitiesIndex); //this.statusEffectsIndex = new List<int>(character.statusEffectsIndex); innateAbilities = new List<Ability>(); foodAbilities = new List<Ability>(); affectedStatusEffects = new List<StatusEffects>(); onHitStatusEffects = new List<StatusEffects>(); }
public void Initialize(MyCharacterController controller) { characterStats.setChar(this); this.topDownController = controller; skillMenu = GameObject.Find("Food Skills").GetComponent<SkillMenu>(); skillMenu.SetCharacter(this); abDB = GameObject.Find("Databases").GetComponent<AbilityDatabase>(); SkillMenu characterSkills = GameObject.Find("Character Skills").GetComponent<SkillMenu>(); characterSkills.SetCharacter(this); for (int i = 0; i < charAbilitiesIndex.Count; i++) addCharAbilities(abDB.getAbilityById(charAbilitiesIndex[i])); tasteTranslater = new SimpleTasteTranslation(); skillMenu.updateSkillList(); characterSkills.updateSkillList(); //to refresh their setter characterStats.MovementSpeed = characterStats.MovementSpeed; characterStats.AttackSpeed = characterStats.AttackSpeed; DamageOverTime dot = new DamageOverTime(); dot.duration = 6; dot.damage = 20; dot.hitsPerSecond = 1; dot.ChanceOfApplying = 25; dot.typeOfDamage = TypeOfEffects.fire; onHitStatusEffects.Add(dot); }