Ejemplo n.º 1
0
 public ActiveDecoration(ISceneParentRef parent, IPlayerParentRef owner, ITileParentRef tempTile, string visualization, float?z, int?maxHealth, TagSynergy[] armor, ActiveDecorationNative native, float?mod)
     : base(parent, owner, tempTile, z ?? native.DefaultZ, new DamageModel(maxHealth ?? native.DefaultHealth, armor ?? native.DefaultArmor), native)
 {
     this.Visualization       = visualization ?? native.DefaultVisualisation;
     this.Mod                 = mod ?? native.DefaultMod;
     this.InitiativePosition += 1;
 }
Ejemplo n.º 2
0
 public TileObject(ISceneParentRef parent, IPlayerParentRef owner, ITileParentRef tempTile, float z, DamageModel damageModel, TaggingNative native)
     : base(parent, owner, tempTile.X, tempTile.Y, z)
 {
     this.Native              = native;
     this.TempTile            = tempTile;
     this.DamageModel         = damageModel;
     this.InitiativePosition += parent.GetNextRandom() / 10000f;
     this.Affected            = true;
     this.HealthRevealed      = false;
 }
Ejemplo n.º 3
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);
        }