Beispiel #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);
        }
Beispiel #2
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;
 }
Beispiel #3
0
 public GameObject(ISceneParentRef parent, IPlayerParentRef owner, int x, int y, float z)
     : base(parent)
 {
     this.Owner   = owner;
     this.isAlive = true;
     this.X       = x;
     this.Y       = y;
     this.Z       = parent.Tiles[x][y].Height + z;
 }
Beispiel #4
0
 public SpecEffect(ISceneParentRef parent, IPlayerParentRef owner, int x, int y, string visualization, float?z, SpecEffectNative native, float?duration, float?mod)
     : base(parent, owner, x, y, z ?? native.DefaultZ)
 {
     this.Visualization = visualization ?? native.DefaultVisualisation;
     this.Duration      = duration ?? native.DefaultDuration ?? null;
     this.Native        = native;
     this.Mod           = mod ?? native.DefaultMod;
     this.Affected      = true;
 }
Beispiel #5
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;
 }
        public static bool DefeatConditionDuel(ISceneParentRef scene, IPlayerParentRef player)
        {
            foreach (Actor actor in player.KeyActors)
            {
                if (actor.IsAlive)
                {
                    return(false);
                }
            }

            return(true);
        }
Beispiel #7
0
        public Tile ChangeTile(string nativeName, int x, int y, float?height, IPlayerParentRef owner)
        {
            if (Tiles[x][y] == null)
            {
                return(null);
            }

            Tile tile = Tiles[x][y];

            tile.Owner    = owner;
            tile.Native   = NativeManager.GetTileNative(nativeName);
            tile.Affected = true;
            if (height != null)
            {
                tile.Height = height.Value;
            }

            if (tile.Native.Unbearable && tile.TempObject != null)
            {
                tile.TempObject.Kill();
            }

            if (tile.TempObject != null)
            {
                if (tile.TempObject is Actor actor)
                {
                    actor.BuffManager.RemoveTileBuffs();
                }

                if (!tile.Revealed)
                {
                    tile.Affected = true;
                    tile.Revealed = true;
                }

                tile.Native.OnStepAction(this, Tiles[x][y]);
            }

            return(tile);
        }
 public static bool DefeatConditionDummy(ISceneParentRef scene, IPlayerParentRef player)
 {
     return(false);
 }