예제 #1
0
    public void LoadTexture()
    {
        //check to see if PlayerPrefs (our save location) HasKey (has a save file...you will need to reference the name of a file)
        if (!PlayerPrefs.HasKey("CharacterName"))
        {
            //if it doesnt then load the CustomSet level
            SceneManager.LoadScene("CharacterSettings");
        }
        else
        {
            //if it does have a save file then load and SetTexture Skin, Hair, Mouth and Eyes from PlayerPrefs
            SetTexture("Skin", PlayerPrefs.GetInt("SkinIndex"));
            SetTexture("Hair", PlayerPrefs.GetInt("HairIndex"));
            SetTexture("Mouth", PlayerPrefs.GetInt("MouthIndex"));
            SetTexture("Eyes", PlayerPrefs.GetInt("EyesIndex"));
            SetTexture("Armour", PlayerPrefs.GetInt("ArmourIndex"));
            SetTexture("Clothes", PlayerPrefs.GetInt("ClothesIndex"));
            //grab the gameObject in scene that is our character and set its Object name to the Characters name
            gameObject.name = PlayerPrefs.GetString("CharacterName");
            //get character class
            characterClass = PlayerPrefs.GetString("CharacterClass");
            //get character skills stats
            Strength     = PlayerPrefs.GetInt("Strength");
            Dexterity    = PlayerPrefs.GetInt("Dexterity");
            Constitution = PlayerPrefs.GetInt("Constitution");
            Intelligence = PlayerPrefs.GetInt("Intelligence");
            Wisdom       = PlayerPrefs.GetInt("Wisdom");
            Charisma     = PlayerPrefs.GetInt("Charisma");

            Debug.Log(gameObject.name + "  " + characterClass);
            Debug.Log("Strength:" + Strength.ToString() + "  Dexterity:" + Dexterity.ToString()
                      + "  Constitution:" + Constitution.ToString() + "  Intelligence:" + Intelligence.ToString()
                      + "  Wisdom:" + Wisdom.ToString() + "  Charisma:" + Charisma.ToString());
        }
    }
예제 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Wisdomid,Wissaveprof,Wisvalue,Animalhandid,Perceptionid,Insightid,Survivalid")] Wisdom wisdom)
        {
            if (id != wisdom.Wisdomid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(wisdom);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!WisdomExists(wisdom.Wisdomid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Animalhandid"] = new SelectList(_context.AnimalHandling, "AnimalHandlingId", "AnimalHandlingId", wisdom.Animalhandid);
            ViewData["Insightid"]    = new SelectList(_context.Insight, "Insightid", "Insightid", wisdom.Insightid);
            ViewData["Perceptionid"] = new SelectList(_context.Perception, "Perceptionid", "Perceptionid", wisdom.Perceptionid);
            ViewData["Survivalid"]   = new SelectList(_context.Survival, "Survivalid", "Survivalid", wisdom.Survivalid);
            return(View(wisdom));
        }
예제 #3
0
 public Entity(int strength, int dex, int con, int intelligence, int wisdom, int charisma)
 {
     Ammunition = new List <Ammunition>();
     Purse      = new CoinPurse();
     Weapons    = new List <Weapon>();
     Strength   = new Strength()
     {
         Score = strength
     };
     Dexterity = new Dexterity()
     {
         Score = dex
     };
     Constitution = new Constitution()
     {
         Score = con
     };
     Intelligence = new Intelligence()
     {
         Score = intelligence
     };
     Wisdom = new Wisdom()
     {
         Score = wisdom
     };
     Charisma = new Charisma()
     {
         Score = charisma
     };
 }
 public InorganicsOwner(Entity[] entitys, IMapGate gate, Wisdom wisdom)
 {
     _Wisdom  = wisdom;
     _Entitys = entitys;
     _Gate    = gate;
     _Updater = new Updater();
 }
예제 #5
0
        /// <summary>
        /// Saves properties
        /// </summary>
        /// <param name="writer">XmlWriter</param>
        /// <returns>True if saved</returns>
        public virtual bool Save(XmlWriter writer)
        {
            if (writer == null || writer.WriteState != WriteState.Element)
            {
                return(false);
            }

            HitPoint.Save(writer);
            Strength.Save("strength", writer);
            Intelligence.Save("intelligence", writer);
            Wisdom.Save("wisdom", writer);
            Dexterity.Save("dexterity", writer);
            Constitution.Save("constitution", writer);
            Charisma.Save("charisma", writer);

            writer.WriteStartElement("alignment");
            writer.WriteAttributeString("value", Alignment.ToString());
            writer.WriteEndElement();

            writer.WriteStartElement("movespeed");
            writer.WriteAttributeString("value", MoveSpeed.TotalMilliseconds.ToString());
            writer.WriteEndElement();


            return(true);
        }
 /// <summary>
 /// 根据快检单号检索云平台是否有数据
 /// </summary>
 private void SearchCloud()
 {
     try
     {
         Wisdom.GETSAMPLE_REQUEST = new getsample.Request()
         {
             deviceid = Wisdom.DeviceID,
             sampleid = tb_SAMPLENUM.Text.Trim()
         };
         string json                = Wisdom.HttpPostRequest(Wisdom.GETSAMPLE);
         JavaScriptSerializer js    = new JavaScriptSerializer();
         getsample.Response   model = js.Deserialize <getsample.Response>(json);
         if (model.result.Equals("0"))
         {
             model.sampleid            = sampleId;
             Wisdom.GETSAMPLE_RESPONSE = model;
             Insert();
         }
         else
         {
             MessageBox.Show("未在云平台上检索到该快检单号!\r\n请确保平台已录入,或核对快检单号是否填写正确!", "操作提示", MessageBoxButton.YesNo, MessageBoxImage.Question);
             //if (MessageBox.Show("未在云平台上检索到该快检单号,是否手动添加快检单号?", "操作提示", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
             //{
             //    AddSampleid();
             //}
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally { Lb_SearchInfo.Visibility = Visibility.Collapsed; }
 }
 public InorganicsOwner(Entity[] entitys, IMapGate gate , Wisdom wisdom)
 {
     _Wisdom = wisdom;
     _Entitys = entitys;
     _Gate = gate;
     _Updater = new Updater();
 }
예제 #8
0
 public StatArray(byte str, byte dex, byte con, byte intel, byte wis, byte cha)
 {
     Strength     = new Strength(str);
     Dexterity    = new Dexterity(dex);
     Constitution = new Constitution(con);
     Intelligence = new Intelligence(intel);
     Wisdom       = new Wisdom(wis);
     Charisma     = new Charisma(cha);
 }
예제 #9
0
 public StatArray()
 {
     Strength     = new Strength();
     Dexterity    = new Dexterity();
     Constitution = new Constitution();
     Intelligence = new Intelligence();
     Wisdom       = new Wisdom();
     Charisma     = new Charisma();
 }
예제 #10
0
파일: Stats.cs 프로젝트: Monaghar/ToonWorld
 public override string ToString()
 {
     return(Stregnth.ToString() + ' ' +
            Dexterity.ToString() + ' ' +
            Constitution.ToString() + ' ' +
            Intelligence.ToString() + ' ' +
            Wisdom.ToString() + ' ' +
            Charisma.ToString());
 }
예제 #11
0
 public bool Equals(StatBlock other)
 {
     return(Strength.Equals(other.Strength) &&
            Dexterity.Equals(other.Dexterity) &&
            Constitution.Equals(other.Constitution) &&
            Intelligence.Equals(other.Intelligence) &&
            Wisdom.Equals(other.Wisdom) &&
            Charisma.Equals(other.Charisma));
 }
예제 #12
0
 public Aboriginal(IMapFinder map, IMapGate gate, Entity actor, Wisdom wisdom)
 {
     _Gate    = gate;
     _Wisdom  = wisdom;
     _Updater = new Updater();
     _Map     = map;
     _Actor   = actor;
     _Machine = new StageMachine();
 }
예제 #13
0
 public Aboriginal(IMapFinder map,IMapGate gate, Entity actor ,  Wisdom wisdom)
 {
     _Gate = gate;
     _Wisdom = wisdom;
     _Updater = new Updater();
     _Map = map;
     _Actor = actor;
     _Machine = new StageMachine();
 }
예제 #14
0
        public void Bonus_WisdomSpecified_ShouldWork()
        {
            SetupCharacter();

            SavingThrows wisdom = new Wisdom(true);

            Assert.AreEqual(-5, wisdom.Bonus);
            Assert.IsTrue(wisdom.Proficiency);
        }
예제 #15
0
 public ActionResult Create(Wisdom wisdomToAdd)
 {
     if (ModelState.IsValid)
     {
         _db.WisdomSet.Add(wisdomToAdd);
         _db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(wisdomToAdd));
 }
예제 #16
0
 public static DndCharacter Generate()
 {
     Strength     = Strength.Ability();
     Dexterity    = Dexterity.Ability();
     Constitution = Constitution.Ability();
     Intelligence = Intelligence.Ability();
     Wisdom       = Wisdom.Ability();
     Charisma     = Charisma.Ability();
     Hitpoints    = 10 + Modifier();
 }
예제 #17
0
 public ActionResult Edit(Wisdom wisdomToEdit)
 {
     if (ModelState.IsValid)
     {
         _db.Entry(wisdomToEdit).State = EntityState.Modified;
         _db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(wisdomToEdit));
 }
예제 #18
0
        public Personality()
        {
            description = new List <string>();

            theCharisma       = new Charisma();
            theIntelligence   = new Intelligence();
            theSocialOpenness = new SocialOpenness();
            theSpeechStyle    = new SpeechStyle();
            theWisdom         = new Wisdom();
        }
예제 #19
0
 public AbilityScores DeepCopy()
 {
     return(new AbilityScores
     {
         Strength = Strength.DeepCopy(),
         Dexterity = Dexterity.DeepCopy(),
         Constitution = Constitution.DeepCopy(),
         Intelligence = Intelligence.DeepCopy(),
         Wisdom = Wisdom.DeepCopy(),
         Charisma = Charisma.DeepCopy(),
     });
 }
예제 #20
0
 public Entity()
 {
     Strength     = new Strength();
     Dexterity    = new Dexterity();
     Constitution = new Constitution();
     Intelligence = new Intelligence();
     Wisdom       = new Wisdom();
     Charisma     = new Charisma();
     Weapons      = new List <Weapon>();
     Ammunition   = new List <Ammunition>();
     Purse        = new CoinPurse();
 }
 public IResettable Reset()
 {
     Name = "";
     Strength.Reset();
     Dexterity.Reset();
     Constitution.Reset();
     Intelligence.Reset();
     Wisdom.Reset();
     Charisma.Reset();
     Level.Reset();
     Race = Race.Unset;
     return(this);
 }
예제 #22
0
 public override string ToString()
 {
     return(String.Format("Race: {0}\nStrength: {1}\nDexterity: {2}\nConstitution: {3}\nIntelligence: {4}\nWisdom: {5}\nCharisma: {6}\nArcane: {7}\nDivine: {8}\nDeviation Index: {9}",
                          Race.ToString(),
                          Strength.ToString(),
                          Dexterity.ToString(),
                          Constitution.ToString(),
                          Intelligence.ToString(),
                          Wisdom.ToString(),
                          Charisma.ToString(),
                          Arcane.ToString(),
                          Divine.ToString(),
                          DeviationIndex));
 }
예제 #23
0
        //Delete general
        //GET: Wisdom/Delete/{id}
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Wisdom wisdomToRemove = _db.WisdomSet.Find(id);

            if (wisdomToRemove == null)
            {
                return(HttpNotFound());
            }
            return(View(wisdomToRemove));
        }
예제 #24
0
 public Abilities(
     Strength strength,
     Dexterity dexterity,
     Constitution constitution,
     Intelligence intelligence,
     Wisdom wisdom, Charisma charisma)
 {
     Strength     = strength;
     Dexterity    = dexterity;
     Constitution = constitution;
     Intelligence = intelligence;
     Wisdom       = wisdom;
     Charisma     = charisma;
 }
예제 #25
0
        public async Task <IActionResult> Create([Bind("Wisdomid,Wissaveprof,Wisvalue,Animalhandid,Perceptionid,Insightid,Survivalid")] Wisdom wisdom)
        {
            if (ModelState.IsValid)
            {
                _context.Add(wisdom);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Animalhandid"] = new SelectList(_context.AnimalHandling, "AnimalHandlingId", "AnimalHandlingId", wisdom.Animalhandid);
            ViewData["Insightid"]    = new SelectList(_context.Insight, "Insightid", "Insightid", wisdom.Insightid);
            ViewData["Perceptionid"] = new SelectList(_context.Perception, "Perceptionid", "Perceptionid", wisdom.Perceptionid);
            ViewData["Survivalid"]   = new SelectList(_context.Survival, "Survivalid", "Survivalid", wisdom.Survivalid);
            return(View(wisdom));
        }
예제 #26
0
        public bool CreateNote(WisdomBasicItem wisdomToCreate)
        {
            var entity =
                new Wisdom()
            {
                Content     = wisdomToCreate.Content,
                WisdomGenre = wisdomToCreate.WisdomGenre
            };

            using (var ctx = new ApplicationDbContext())
            {
                entity.Author    = ctx.AuthorTable.Find(wisdomToCreate.AuthorId);
                entity.CreatedAt = DateTime.Now;
                ctx.WisdomTable.Add(entity);
            }
        }
예제 #27
0
    //Use this for initialization
    void Start()
    {
        currentHealth = maxHealth;
        currentStamina = maxStamina;
        currentMS = 0;

        strength = GetComponent<Strength>();
        agility = GetComponent<Agility>();
        haste = GetComponent<Haste>();
        perception = GetComponent<Perception>();
        intelligence = GetComponent<Intelligence>();
        wisdom = GetComponent<Wisdom>();

        cont = GetComponent<CharacterController>();
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible = false;
        cameraReference = GameObject.FindWithTag("cameraReference");
        lookTarget = GameObject.FindWithTag("LookTarget");
    }
예제 #28
0
        }                                                      // modiferDict -> key: MemberName as string. Value: int modifier

        public Character(string name, string race, int str, int dex, int con, int intelligence, int wis, int cha, AbstractClass charClass, AbstractWeapon weapon, AbstractArmor armor, bool shield, int team, int level = 1)
        {
            Name = name;
            Race = race;

            Str   = new Strength(str);
            Dex   = new Dexterity(dex);
            Con   = new Constitution(con);
            Int   = new Intelligence(intelligence);
            Wis   = new Wisdom(wis);
            Cha   = new Charisma(cha);
            Class = new Fighter(level);

            EquippedArmor  = armor;
            EquippedWeapon = weapon;
            ShieldEquipped = shield;

            CalculateHitPoints();
            CalculateAC();
            CalculateAttackBonus();

            Team = team;
        }
 /// <summary>
 /// 根据快检单号检索云平台是否有数据 有数据返回true,没有则返回false
 /// </summary>
 private Boolean SearchCloud()
 {
     try
     {
         Wisdom.GETSAMPLE_REQUEST = new DYSeriesDataSet.getsample.Request()
         {
             deviceid = Wisdom.DeviceID,
             sampleid = tb_sampleid.Text.Trim()
         };
         String json                = Wisdom.HttpPostRequest(Wisdom.GETSAMPLE);
         JavaScriptSerializer js    = new JavaScriptSerializer();
         getsample.Response   model = js.Deserialize <getsample.Response>(json);
         if (model.result.Equals("0"))
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(false);
 }
예제 #30
0
        public CharacterCharacteristicsInformations GetCharacterCharacteristics(Character character)
        {
            ulong expFloor     = ExperienceRecord.GetExperienceForLevel(character.Level).Player;
            ulong expNextFloor = ExperienceRecord.GetExperienceForNextLevel(character.Level).Player;

            CharacterCharacteristicsInformations informations = new CharacterCharacteristicsInformations()
            {
                actionPoints            = ActionPoints.GetBaseCharacteristic(),
                actionPointsCurrent     = ActionPoints.TotalInContext(),
                additionnalPoints       = 0,
                agility                 = Agility.GetBaseCharacteristic(),
                airDamageBonus          = AirDamageBonus.GetBaseCharacteristic(),
                airElementReduction     = AirReduction.GetBaseCharacteristic(),
                airElementResistPercent = AirResistPercent.GetBaseCharacteristic(),
                alignmentInfos          = character.Record.Alignment.GetActorExtendedAlignement(),
                allDamagesBonus         = AllDamagesBonus.GetBaseCharacteristic(),
                chance = Chance.GetBaseCharacteristic(),
                criticalDamageBonus          = CriticalDamageBonus.GetBaseCharacteristic(),
                criticalDamageReduction      = CriticalDamageReduction.GetBaseCharacteristic(),
                criticalHit                  = CriticalHit.GetBaseCharacteristic(),
                criticalHitWeapon            = CriticalHitWeapon,
                criticalMiss                 = Characteristic.Zero().GetBaseCharacteristic(),
                damagesBonusPercent          = DamagesBonusPercent.GetBaseCharacteristic(),
                dodgePALostProbability       = DodgePAProbability.GetBaseCharacteristic(),
                dodgePMLostProbability       = DodgePMProbability.GetBaseCharacteristic(),
                earthDamageBonus             = EarthDamageBonus.GetBaseCharacteristic(),
                earthElementReduction        = EarthReduction.GetBaseCharacteristic(),
                earthElementResistPercent    = EarthResistPercent.GetBaseCharacteristic(),
                pvpEarthElementReduction     = PvPEarthReduction.GetBaseCharacteristic(),
                pvpEarthElementResistPercent = PvPEarthResistPercent.GetBaseCharacteristic(),
                fireDamageBonus              = FireDamageBonus.GetBaseCharacteristic(),
                fireElementReduction         = FireReduction.GetBaseCharacteristic(),
                fireElementResistPercent     = FireResistPercent.GetBaseCharacteristic(),
                pvpFireElementReduction      = PvPFireReduction.GetBaseCharacteristic(),
                pvpFireElementResistPercent  = PvPFireResistPercent.GetBaseCharacteristic(),
                glyphBonusPercent            = GlyphBonusPercent.GetBaseCharacteristic(),
                healBonus                      = HealBonus.GetBaseCharacteristic(),
                initiative                     = new CharacterBaseCharacteristic((short)FormulasProvider.Instance.BaseInitiative(this), 0, Initiative.Total(), 0, 0),
                intelligence                   = Intelligence.GetBaseCharacteristic(),
                kamas                          = character.Record.Kamas,
                lifePoints                     = (uint)LifePoints,
                maxEnergyPoints                = MaxEnergyPoints,
                maxLifePoints                  = (uint)MaxLifePoints,
                movementPoints                 = MovementPoints.GetBaseCharacteristic(),
                movementPointsCurrent          = MovementPoints.TotalInContext(),
                PMAttack                       = PMAttack.GetBaseCharacteristic(),
                PAAttack                       = PAAttack.GetBaseCharacteristic(),
                pvpAirElementReduction         = PvPAirReduction.GetBaseCharacteristic(),
                pvpAirElementResistPercent     = PvPAirResistPercent.GetBaseCharacteristic(),
                pvpNeutralElementReduction     = PvPNeutralReduction.GetBaseCharacteristic(),
                pvpNeutralElementResistPercent = PvPNeutralResistPercent.GetBaseCharacteristic(),
                pvpWaterElementReduction       = PvPWaterReduction.GetBaseCharacteristic(),
                pvpWaterElementResistPercent   = PvPWaterResistPercent.GetBaseCharacteristic(),
                energyPoints                   = Energy,
                experience                     = character.Experience,
                experienceLevelFloor           = expFloor,
                experienceNextLevelFloor       = expNextFloor,
                neutralDamageBonus             = NeutralDamageBonus.GetBaseCharacteristic(),
                neutralElementReduction        = NeutralReduction.GetBaseCharacteristic(),
                neutralElementResistPercent    = NeutralResistPercent.GetBaseCharacteristic(),
                tackleEvade                    = TackleEvade.GetBaseCharacteristic(),
                tackleBlock                    = TackleBlock.GetBaseCharacteristic(),
                range                          = Range.GetBaseCharacteristic(),
                waterElementReduction          = WaterReduction.GetBaseCharacteristic(),
                waterDamageBonus               = WaterDamageBonus.GetBaseCharacteristic(),
                waterElementResistPercent      = WaterResistPercent.GetBaseCharacteristic(),
                reflect                        = Reflect.GetBaseCharacteristic(),
                permanentDamagePercent         = PermanentDamagePercent.GetBaseCharacteristic(),
                prospecting                    = Prospecting.GetBaseCharacteristic(),
                pushDamageBonus                = PushDamageBonus.GetBaseCharacteristic(),
                pushDamageReduction            = PushDamageReduction.GetBaseCharacteristic(),
                runeBonusPercent               = RuneBonusPercent.GetBaseCharacteristic(),
                spellModifications             = new CharacterSpellModification[0],
                spellsPoints                   = character.Record.SpellPoints,
                statsPoints                    = character.Record.StatsPoints,
                vitality                       = Vitality.GetBaseCharacteristic(),
                strength                       = Strength.GetBaseCharacteristic(),
                summonableCreaturesBoost       = SummonableCreaturesBoost.GetBaseCharacteristic(),
                trapBonus                      = TrapBonus.GetBaseCharacteristic(),
                trapBonusPercent               = TrapBonusPercent.GetBaseCharacteristic(),
                weaponDamagesBonusPercent      = WeaponDamagesBonusPercent.GetBaseCharacteristic(),
                wisdom                         = Wisdom.GetBaseCharacteristic(),
                probationTime                  = 0,
            };

            return(informations);
        }
예제 #31
0
 public override void Serialize(IDataWriter writer)
 {
     writer.WriteVarUhLong(Experience);
     writer.WriteVarUhLong(ExperienceLevelFloor);
     writer.WriteVarUhLong(ExperienceNextLevelFloor);
     writer.WriteVarUhLong(ExperienceBonusLimit);
     writer.WriteVarUhLong(Kamas);
     writer.WriteVarUhShort(StatsPoints);
     writer.WriteVarUhShort(AdditionnalPoints);
     writer.WriteVarUhShort(SpellsPoints);
     AlignmentInfos.Serialize(writer);
     writer.WriteVarUhInt(LifePoints);
     writer.WriteVarUhInt(MaxLifePoints);
     writer.WriteVarUhShort(EnergyPoints);
     writer.WriteVarUhShort(MaxEnergyPoints);
     writer.WriteVarShort(ActionPointsCurrent);
     writer.WriteVarShort(MovementPointsCurrent);
     Initiative.Serialize(writer);
     Prospecting.Serialize(writer);
     ActionPoints.Serialize(writer);
     MovementPoints.Serialize(writer);
     Strength.Serialize(writer);
     Vitality.Serialize(writer);
     Wisdom.Serialize(writer);
     Chance.Serialize(writer);
     Agility.Serialize(writer);
     Intelligence.Serialize(writer);
     Range.Serialize(writer);
     SummonableCreaturesBoost.Serialize(writer);
     Reflect.Serialize(writer);
     CriticalHit.Serialize(writer);
     writer.WriteVarUhShort(CriticalHitWeapon);
     CriticalMiss.Serialize(writer);
     HealBonus.Serialize(writer);
     AllDamagesBonus.Serialize(writer);
     WeaponDamagesBonusPercent.Serialize(writer);
     DamagesBonusPercent.Serialize(writer);
     TrapBonus.Serialize(writer);
     TrapBonusPercent.Serialize(writer);
     GlyphBonusPercent.Serialize(writer);
     RuneBonusPercent.Serialize(writer);
     PermanentDamagePercent.Serialize(writer);
     TackleBlock.Serialize(writer);
     TackleEvade.Serialize(writer);
     PAAttack.Serialize(writer);
     PMAttack.Serialize(writer);
     PushDamageBonus.Serialize(writer);
     CriticalDamageBonus.Serialize(writer);
     NeutralDamageBonus.Serialize(writer);
     EarthDamageBonus.Serialize(writer);
     WaterDamageBonus.Serialize(writer);
     AirDamageBonus.Serialize(writer);
     FireDamageBonus.Serialize(writer);
     DodgePALostProbability.Serialize(writer);
     DodgePMLostProbability.Serialize(writer);
     NeutralElementResistPercent.Serialize(writer);
     EarthElementResistPercent.Serialize(writer);
     WaterElementResistPercent.Serialize(writer);
     AirElementResistPercent.Serialize(writer);
     FireElementResistPercent.Serialize(writer);
     NeutralElementReduction.Serialize(writer);
     EarthElementReduction.Serialize(writer);
     WaterElementReduction.Serialize(writer);
     AirElementReduction.Serialize(writer);
     FireElementReduction.Serialize(writer);
     PushDamageReduction.Serialize(writer);
     CriticalDamageReduction.Serialize(writer);
     PvpNeutralElementResistPercent.Serialize(writer);
     PvpEarthElementResistPercent.Serialize(writer);
     PvpWaterElementResistPercent.Serialize(writer);
     PvpAirElementResistPercent.Serialize(writer);
     PvpFireElementResistPercent.Serialize(writer);
     PvpNeutralElementReduction.Serialize(writer);
     PvpEarthElementReduction.Serialize(writer);
     PvpWaterElementReduction.Serialize(writer);
     PvpAirElementReduction.Serialize(writer);
     PvpFireElementReduction.Serialize(writer);
     MeleeDamageDonePercent.Serialize(writer);
     MeleeDamageReceivedPercent.Serialize(writer);
     RangedDamageDonePercent.Serialize(writer);
     RangedDamageReceivedPercent.Serialize(writer);
     WeaponDamageDonePercent.Serialize(writer);
     WeaponDamageReceivedPercent.Serialize(writer);
     SpellDamageDonePercent.Serialize(writer);
     SpellDamageReceivedPercent.Serialize(writer);
     writer.WriteShort((short)SpellModifications.Count);
     foreach (var x in SpellModifications)
     {
         x.Serialize(writer);
     }
     writer.WriteInt(ProbationTime);
 }
예제 #32
0
        public void InitializeSummon(Fighter owner, bool summonStats)
        {
            this.Summoned   = true;
            this.SummonerId = owner.Id;


            if (summonStats)
            {
                this.CurrentLifePoints = this.CurrentMaxLifePoints = this.MaxLifePoints = this.LifePoints = FormulasProvider.Instance.GetSummonedCharacteristicDelta(CurrentLifePoints, owner.Level);

                this.Strength.Base = (short)FormulasProvider.Instance.GetSummonedCharacteristicDelta(Strength.Total(), owner.Level);

                this.Agility.Base = (short)FormulasProvider.Instance.GetSummonedCharacteristicDelta(Agility.Total(), owner.Level);

                this.Intelligence.Base = (short)FormulasProvider.Instance.GetSummonedCharacteristicDelta(Intelligence.Total(), owner.Level);

                this.Chance.Base = (short)FormulasProvider.Instance.GetSummonedCharacteristicDelta(Chance.Total(), owner.Level);

                this.Wisdom.Base = (short)FormulasProvider.Instance.GetSummonedCharacteristicDelta(Wisdom.Total(), owner.Level);
            }
        }
예제 #33
0
        public override void WritePropertyXML(XmlWriter xmlWriter)
        {
            base.WritePropertyXML(xmlWriter);

            xmlWriter.WriteStartElement("Type");
            xmlWriter.WriteString(Methods.GetCreatureTypeString(Type));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ChallengeRating");
            xmlWriter.WriteString(ChallengeRating.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("AttackSets");
            foreach (AttackSet attackSet in AttackSets)
            {
                attackSet.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Strength");
            xmlWriter.WriteString(Strength.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Dexterity");
            xmlWriter.WriteString(Dexterity.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Constitution");
            xmlWriter.WriteString(Constitution.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Intelligence");
            xmlWriter.WriteString(Intelligence.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Wisdom");
            xmlWriter.WriteString(Wisdom.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Charisma");
            xmlWriter.WriteString(Charisma.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("BaseAttackBonus");
            xmlWriter.WriteString(BaseAttackBonus.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("GrappleModifier");
            xmlWriter.WriteString(GrappleModifier.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitPoints");
            xmlWriter.WriteString(HitPoints.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitDice");
            xmlWriter.WriteString(HitDice.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitDieType");
            xmlWriter.WriteString(Methods.GetDieTypeString(HitDieType));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ArmorClass");
            xmlWriter.WriteString(ArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("TouchArmorClass");
            xmlWriter.WriteString(TouchArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FlatFootedArmorClass");
            xmlWriter.WriteString(FlatFootedArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Speed");
            Speed.WriteXML(xmlWriter);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FortitudeSave");
            xmlWriter.WriteString(FortitudeSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ReflexSave");
            xmlWriter.WriteString(ReflexSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("WillSave");
            xmlWriter.WriteString(WillSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Feats");
            foreach (string feat in Feats)
            {
                xmlWriter.WriteStartElement("Feat");
                xmlWriter.WriteString(feat);
                xmlWriter.WriteEndElement();
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Space");
            xmlWriter.WriteString(Space.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Reach");
            xmlWriter.WriteString(Reach.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Size");
            xmlWriter.WriteString(Methods.GetSizeString(Size));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("DamageReductions");
            foreach (DamageReduction dr in DamageReductions)
            {
                dr.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Immunities");
            Immunities.WriteXML(xmlWriter);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("EnergyResistances");
            foreach (EnergyResistance er in EnergyResistances)
            {
                er.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpellResistance");
            xmlWriter.WriteString(SpellResistance.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FastHealing");
            xmlWriter.WriteString(FastHealing.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpecialAttacks");
            xmlWriter.WriteString(SpecialAttacks);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpecialQualities");
            xmlWriter.WriteString(String.Join(", ", SpecialQualities));
            xmlWriter.WriteEndElement();
        }
예제 #34
0
 public GameStage(ISoulBinder binder, IMapFinder map, IMapGate gate, Entity entity, Wisdom wisdom)
     : this(binder, map, gate, entity)
 {
     _Wisdom = wisdom;
 }