Inheritance: Entity
Example #1
0
 public IEnumerable<IProperty> GetProperties(Champion champion)
 {
     LoadProperty load;
     return new IProperty[]
     {
         load = new LoadProperty(champion),
         new HealthProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(0, 4))),
         new StaminaProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(4, 4))),
         new ManaProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(8, 4))),
         new LuckProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(0, 2))),
         new StrengthProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(2, 2))),
         new DextrityProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(4, 2)), load),
         new WisdomProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(6, 2))),
         new VitalityProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(8, 2))),
         new AntiMagicProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(10, 2))),
         new AntiFireProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(12, 2))),
     };
 }
Example #2
0
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
        {
            descriptor = FindChampionDescriptor(context).Split('|');

            var champion = new Champion(context.ChampionToken, context.CreatureToken.ToEnumerable(), this)
            {
                Name = descriptor[0],
                Title = descriptor[1] + descriptor[2],
                IsMale = descriptor[3] == "M",
            };

            var items = context.WallActuatorCreator.CurrentGrabableItems.Select(k => context.ItemCreator.CreateItem(k, currentTile));

            var res = new ChampoinActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), champion);
            ((CubeGraphic)res.Graphics).Texture = context.WallTextures[matchedSequence[0].Decoration - 1];

            return res;
        }
Example #3
0
 public void RemoveChampoin() => Champion = null;
Example #4
0
 public ChampoinActuator(Vector3 position, Champion champion)   
 {
     Champion = champion;
 }
Example #5
0
        public IEnumerable<ISkill> GetSkills(Champion champion)
        {
            SkillBase fighter, ninja, priest, wizard;
            return new ISkill[]
            {
                fighter = new FighterSkill(champion),
                ninja = new NinjaSkill(champion),
                priest = new PriestSkill(champion),
                wizard = new WizardSkill(champion),

                new SwingSkill(champion, fighter, GetValueOfDMHexEncoding(descriptor[6][0])),
                new ThrustSkill(champion, fighter,GetValueOfDMHexEncoding(descriptor[6][1])),
                new ClubSkill(champion, fighter,GetValueOfDMHexEncoding(descriptor[6][2])),
                new ParrySkill(champion, fighter,GetValueOfDMHexEncoding(descriptor[6][3])),

                new FightSkill(champion, ninja,GetValueOfDMHexEncoding(descriptor[6][4])),
                new StealSkill(champion, ninja,GetValueOfDMHexEncoding(descriptor[6][5])),
                new ThrowSkill(champion, ninja,GetValueOfDMHexEncoding(descriptor[6][6])),
                new ShootSkill(champion, ninja,GetValueOfDMHexEncoding(descriptor[6][7])),

                new IdentifySkill(champion, priest,GetValueOfDMHexEncoding(descriptor[6][8])),
                new HealSkill(champion, priest,GetValueOfDMHexEncoding(descriptor[6][9])),
                new InfluenceSkill(champion, priest,GetValueOfDMHexEncoding(descriptor[6][10])),
                new DeffendSkill(champion, priest,GetValueOfDMHexEncoding(descriptor[6][11])),

                new FireSkill(champion, wizard,GetValueOfDMHexEncoding(descriptor[6][12])),
                new AirSkill(champion, wizard,GetValueOfDMHexEncoding(descriptor[6][13])),
                new EarthSkill(champion, wizard,GetValueOfDMHexEncoding(descriptor[6][14])),
                new WaterSkill(champion, wizard,GetValueOfDMHexEncoding(descriptor[6][15])),
            };
        }
Example #6
0
        public bool AddChampoinToGroup(Champion champion)
        {
            if (partyGoup.Count == 4)
                return false;

            var freeSpace = Small4GroupLayout.Instance.AllSpaces.Except(partyGoup.Select(ch => ch.Location?.Space).Where(x => x != null)).First();
            champion.Location = new FourthSpaceRouteElement(freeSpace, Location);
            partyGoup.Add(champion);
            return true;
        }