Example #1
0
        public Actor(ISceneParentRef parent, IPlayerParentRef owner, Guid?externalId, ITileParentRef tempTile, string visualization, string enemyVisualization, float?z, ActorNative native, RoleModelNative roleModelNative)
            : base(parent, owner, tempTile, z ?? native.DefaultZ, new DamageModel(), native)
        {
            this.varManager             = parent.VarManager;
            this.Visualization          = visualization ?? native.DefaultVisualization;
            this.EnemyVisualization     = enemyVisualization ?? native.DefaultEnemyVisualization;
            this.ExternalId             = externalId;
            this.native                 = native;
            this.SelfStrength           = roleModelNative.DefaultStrength;
            this.SelfWillpower          = roleModelNative.DefaultWillpower;
            this.SelfConstitution       = roleModelNative.DefaultConstitution;
            this.SelfSpeed              = roleModelNative.DefaultSpeed;
            this.SelfActionPointsIncome = roleModelNative.DefaultActionPointsIncome;
            this.DefaultArmor           = native.Armor.ToArray();
            this.Skills                 = new List <Skill>();
            foreach (SkillNative skill in roleModelNative.Skills)
            {
                Skills.Add(new Skill(this, skill, null, null, null, null, null, null));
            }

            this.AttackingSkill      = new Skill(this, roleModelNative.AttackingSkill, null, null, 0, null, null, null);
            this.BuffManager         = new BuffManager(this);
            this.InitiativePosition += 1f / this.Initiative;
            this.DamageModel.SetupRoleModel(this);
        }
Example #2
0
        public ActorNative GetActorNative(string id)
        {
            ActorNative native = actorNatives[id];

            return(native);
        }