/// <summary> /// Total Initiative = ( Bonus Caractéristiques + Bonus initiative) x ( Points de vie actuels / Points de vie max ) /// </summary> /// <param name="character"></param> public static void Create(Character character) { var breed = BreedRecord.GetBreed(character.Record.Breed); character.Record.SpellPoints = (ushort)ConfigurationManager.Instance.StartLevel; character.Record.StatsPoints = 0; var stats = new StatsRecord(character.Id, breed.StartLifePoints, (short)(ConfigurationManager.Instance.StartLevel * 10), breed.StartLifePoints, breed.StartProspecting, 6, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); character.CurrentStats = new BasicStats((ushort)stats.MaxEnergyPoints, (uint)stats.LifePoints); SaveTask.AddElement(stats); }
// voir les GetBase(0) public static CharacterCharacteristicsInformations GetCharacterCharacteristics(StatsRecord stats, Character character) { var align = character.GetActorExtendedAlignement(); var expFloor = ExperienceRecord.GetExperienceForLevel(character.Record.Level); var mpMax = character.StatsRecord.MovementPoints; var apMax = character.StatsRecord.ActionPoints; if (character.FighterInstance != null) { mpMax = character.FighterInstance.FighterStats.RealStats.MovementPoints; apMax = character.FighterInstance.FighterStats.RealStats.ActionPoints; } var expNextFloor = ExperienceRecord.GetExperienceForLevel((uint)(character.Record.Level + 1)); var detailedstats = new CharacterCharacteristicsInformations(character.Record.Exp, expFloor, expNextFloor, character.Record.Kamas, character.Record.StatsPoints, 0, character.Record.SpellPoints, align, (uint)(character.CurrentStats.LifePoints), (uint)stats.LifePoints, character.CurrentStats.Energy, (ushort)stats.MaxEnergyPoints, stats.ActionPoints, stats.MovementPoints, GetBase((short)character.Initiative), GetBase(stats.Prospecting), GetBase((short)apMax), GetBase((short)mpMax), GetBase(stats.BaseStrength,stats.ContextStrength,stats.PermanentStrenght), GetBase(stats.BaseVitality,stats.ContextVitality,stats.PermanentVitality), GetBase(stats.BaseWisdom,stats.ContextWisdom,stats.PermanentWisdom), GetBase(stats.BaseChance,stats.ContextChance,stats.PermanentChance), GetBase(stats.BaseAgility,stats.ContextAgility,stats.PermanentAgility), GetBase(stats.BaseIntelligence,stats.ContextIntelligence,stats.PermanentIntelligence), GetBase(stats._Range), GetBase(stats.SummonableCreaturesBoost), GetBase(stats.Reflect), GetBase(stats.CriticalHit), (ushort)stats.CriticalHitWeapon, GetBase(0), GetBase(stats.HealBonus), GetBase(stats.AllDamagesBonus), GetBase(stats.WeaponDamagesBonusPercent), GetBase(stats.AllDamagesBonusPercent), GetBase(stats.TrapBonus), GetBase(stats.TrapBonusPercent), GetBase(stats.GlyphBonusPercent), GetBase(0), GetBase(0), GetBase(0), GetBase(stats.APReduction,stats.ContextAPReduction), GetBase(0), GetBase(stats.PushDamageBonus), GetBase(stats.CriticalDamageBonus), GetBase(stats.NeutralDamageBonus), GetBase(stats.EarthDamageBonus), GetBase(stats.WaterDamageBonus), GetBase(stats.AirDamageBonus), GetBase(stats.FireDamageBonus), GetBase(stats.DodgePA), GetBase(stats.DodgePM), GetBase(stats.NeutralResistPercent), GetBase(stats.EarthResistPercent), GetBase(stats.WaterResistPercent), GetBase(stats.AirResistPercent), GetBase(stats.FireResistPercent), GetBase(stats.NeutralReduction), GetBase(stats.EarthReduction), GetBase(stats.WaterReduction), GetBase(stats.AirReduction), GetBase(stats.FireReduction), GetBase(stats.PushDamageReduction), GetBase(stats.CriticalDamageReduction), GetBase(stats.PvPNeutralResistPercent), GetBase(stats.PvPEarthResistPercent), GetBase(stats.PvPWaterResistPercent), GetBase(stats.PvPAirResistPercent), GetBase(stats.PvPFireResistPercent), GetBase(stats.PvPNeutralReduction), GetBase(stats.PvPEarthReduction), GetBase(stats.PvPWaterReduction), GetBase(stats.PvPAirReduction), GetBase(stats.PvPFireReduction), new CharacterSpellModification[0], 0); return detailedstats; }
/// <summary> /// Total Initiative = ( Bonus Caractéristiques + Bonus initiative) x ( Points de vie actuels / Points de vie max ) /// </summary> /// <param name="character"></param> public static void Create(Character character) { var breed = BreedRecord.GetBreed(character.Record.Breed); character.Record.SpellPoints = (ushort)ConfigurationManager.Instance.StartLevel; character.Record.StatsPoints = 0; var stats = new StatsRecord(character.Id, breed.StartLifePoints, (short)(ConfigurationManager.Instance.StartLevel * 10), breed.StartLifePoints, breed.StartProspecting, 6, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0); character.CurrentStats = new BasicStats((ushort)stats.MaxEnergyPoints, (uint)stats.LifePoints); SaveTask.AddElement(stats); }
public static UInt16ReflectedStat GetReflectedStat(StatsRecord host, int characteristicid) { CharacteristicRecord record = Characteristics.Find(x => x.Id == characteristicid); return(new UInt16ReflectedStat(StatsRecord.GetFieldInfo(record.Keyword), host)); }
static UInt16ReflectedStat GetReflectedStat(StatsRecord stats, StatsBoostTypeEnum type) { var fieldInfo = StatsRecord.GetFieldInfo("Base"+type.ToString()); return new UInt16ReflectedStat(fieldInfo, stats); }
public UInt16ReflectedStat(FieldInfo field,StatsRecord host) { this.Field = field; this.Host = host; }
public static CharacterCharacteristicsInformations GetCharacterCharacteristics(StatsRecord stats, Character character) // voir les GetBase(0) { var align = character.GetActorExtendedAlignement(); var expFloor = ExperienceRecord.GetExperienceForLevel(character.Record.Level); var mpMax = character.StatsRecord.MovementPoints; var apMax = character.StatsRecord.ActionPoints; if (character.FighterInstance != null) { mpMax = character.FighterInstance.FighterStats.RealStats.MovementPoints; apMax = character.FighterInstance.FighterStats.RealStats.ActionPoints; } var expNextFloor = ExperienceRecord.GetExperienceForLevel((uint)(character.Record.Level + 1)); var detailedstats = new CharacterCharacteristicsInformations(character.Record.Exp, expFloor, expNextFloor, character.Record.Kamas, character.Record.StatsPoints, 0, character.Record.SpellPoints, align, (uint)(character.CurrentStats.LifePoints), (uint)stats.LifePoints, character.CurrentStats.Energy, (ushort)stats.MaxEnergyPoints, stats.ActionPoints, stats.MovementPoints, GetBase((short)character.Initiative), GetBase(stats.Prospecting), GetBase((short)apMax), GetBase((short)mpMax), GetBase(stats.BaseStrength, stats.ContextStrength, stats.PermanentStrenght), GetBase(stats.BaseVitality, stats.ContextVitality, stats.PermanentVitality), GetBase(stats.BaseWisdom, stats.ContextWisdom, stats.PermanentWisdom), GetBase(stats.BaseChance, stats.ContextChance, stats.PermanentChance), GetBase(stats.BaseAgility, stats.ContextAgility, stats.PermanentAgility), GetBase(stats.BaseIntelligence, stats.ContextIntelligence, stats.PermanentIntelligence), GetBase(stats._Range), GetBase(stats.SummonableCreaturesBoost), GetBase(stats.Reflect), GetBase(stats.CriticalHit), (ushort)stats.CriticalHitWeapon, GetBase(0), GetBase(stats.HealBonus), GetBase(stats.AllDamagesBonus), GetBase(stats.WeaponDamagesBonusPercent), GetBase(stats.AllDamagesBonusPercent), GetBase(stats.TrapBonus), GetBase(stats.TrapBonusPercent), GetBase(stats.GlyphBonusPercent), GetBase(0), GetBase(0), GetBase(0), GetBase(stats.APReduction, stats.ContextAPReduction), GetBase(0), GetBase(stats.PushDamageBonus), GetBase(stats.CriticalDamageBonus), GetBase(stats.NeutralDamageBonus), GetBase(stats.EarthDamageBonus), GetBase(stats.WaterDamageBonus), GetBase(stats.AirDamageBonus), GetBase(stats.FireDamageBonus), GetBase(stats.DodgePA), GetBase(stats.DodgePM), GetBase(stats.NeutralResistPercent), GetBase(stats.EarthResistPercent), GetBase(stats.WaterResistPercent), GetBase(stats.AirResistPercent), GetBase(stats.FireResistPercent), GetBase(stats.NeutralReduction), GetBase(stats.EarthReduction), GetBase(stats.WaterReduction), GetBase(stats.AirReduction), GetBase(stats.FireReduction), GetBase(stats.PushDamageReduction), GetBase(stats.CriticalDamageReduction), GetBase(stats.PvPNeutralResistPercent), GetBase(stats.PvPEarthResistPercent), GetBase(stats.PvPWaterResistPercent), GetBase(stats.PvPAirResistPercent), GetBase(stats.PvPFireResistPercent), GetBase(stats.PvPNeutralReduction), GetBase(stats.PvPEarthReduction), GetBase(stats.PvPWaterReduction), GetBase(stats.PvPAirReduction), GetBase(stats.PvPFireReduction), new CharacterSpellModification[0], 0); return(detailedstats); }
public static UInt16ReflectedStat GetReflectedStat(StatsRecord host,int characteristicid) { CharacteristicRecord record = Characteristics.Find(x => x.Id == characteristicid); return new UInt16ReflectedStat(StatsRecord.GetFieldInfo(record.Keyword), host); }