public static SkillData FromConfig(DisassemblygirlSkillConfig config) { SkillData skill = new SkillData(); skill.id = config.id; skill.name = config.name; skill.iconID = config.iconID; skill.WOE = config.WOE; skill.CD = config.CD; skill.type = config.type; skill.vibrateType = (SkillVibrateType)config.vibrateType; skill.resourceID = config.resourceID; skill.hitEffectID = config.hitEffectID; skill.physicsType = (PhysicsType)config.physicsType; skill.attributeBox = AttributeBox.CreateDefault(); skill.attributeBox.SetAttribute(AttributeKeys.ATK, AttributeSetTypes.BaseValue, config.ATK); skill.attributeBox.SetAttribute(AttributeKeys.CRT, AttributeSetTypes.BaseValue, config.CRT); skill.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, config.SPD); skill.effectors = new List <EffectorData>(); foreach (string effectorID in config.effectors.Split('|')) { EffectorData effector = EffectorData.FromConfig(int.Parse(effectorID)); if (effector != null) { skill.effectors.Add(effector); } } return(skill); }
public static MonsterData FromConfig(DisassemblygirlMonsterConfig config) { MonsterData monster = new MonsterData(); monster.id = config.id; monster.name = config.name; monster.level = config.level; monster.resourceID = config.resourceID; monster.explosionID = config.explosionID; monster.type = config.type; monster.groundDamping = config.groundDamping; monster.airDamping = config.airDamping; monster.componentDatas = new List <EntityComponentData>(); monster.missileData = new MissileData(); monster.missileData.resourceID = config.missileResourceID; if (!string.IsNullOrEmpty(config.components) && config.components != "0") { string[] components = config.components.Split('|'); foreach (string component in components) { EntityComponentData data = EntityComponentData.Parse(component); monster.componentDatas.Add(data); } } monster.attributeBox = AttributeBox.CreateDefault(); monster.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, config.SPD); monster.attributeBox.SetAttribute(AttributeKeys.ANTI, AttributeSetTypes.BaseValue, config.ANTI); monster.attributeBox.SetAttribute(AttributeKeys.HP, AttributeSetTypes.BaseValue, config.HP); monster.attributeBox.SetAttribute(AttributeKeys.MaxHP, AttributeSetTypes.BaseValue, config.HP); monster.attributeBox.SetAttribute(AttributeKeys.DEF, AttributeSetTypes.BaseValue, config.DEF); monster.attributeBox.SetAttribute(AttributeKeys.RP, AttributeSetTypes.BaseValue, config.RP); monster.attributeBox.SetAttribute(AttributeKeys.GP, AttributeSetTypes.BaseValue, config.GP); monster.immunityEffectors = new List <int>(); foreach (string effectorID in config.immunityEffectors.Split('|')) { if (effectorID != "0") { monster.immunityEffectors.Add(int.Parse(effectorID)); } } return(monster); }
public static UserData CreateDefault() { UserData user = new UserData(); user.dungeonIndex = 26; user.girlID = 1; user.functions = new List <FunctionData>(); user.guides = new HashSet <int>(); user.petDatas = new List <PetData>(); user.attributeBox = AttributeBox.CreateDefault(); user.attributeBox.SetAttribute(AttributeKeys.GP, AttributeSetTypes.BaseValue, 999999); user.attributeBox.SetAttribute(AttributeKeys.RP, AttributeSetTypes.BaseValue, 999999); // Attach Pets user.petDatas.Add(PetData.FromConfig(ConfigMgr.GetInstance().DisassemblygirlPet.GetConfigById(1))); user.petDatas.Add(PetData.FromConfig(ConfigMgr.GetInstance().DisassemblygirlPet.GetConfigById(7))); user.petDatas.Add(PetData.FromConfig(ConfigMgr.GetInstance().DisassemblygirlPet.GetConfigById(13))); DisassemblygirlGirlConfig config = ConfigMgr.GetInstance().DisassemblygirlGirl.GetConfigById(user.girlID); user.girl = GirlData.FromConfig(config); // Attach Weapons user.girl.AddWeapon(7); user.girl.AddWeapon(13); user.girl.AddWeapon(19); user.girl.AddWeapon(25); user.girl.AddWeapon(31); user.girl.AddWeapon(37); // Shop Items user.shopData = new ShopData(); user.shopData.attributeBox = AttributeBox.CreateDefault(); user.shopData.attributeBox.SetAttribute(AttributeKeys.STR, AttributeSetTypes.BaseValue, 0f); user.shopData.attributeBox.SetAttribute(AttributeKeys.VIT, AttributeSetTypes.BaseValue, 0f); user.shopData.attributeBox.SetAttribute(AttributeKeys.DEX, AttributeSetTypes.BaseValue, 0f); user.shopData.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, 0f); // Trophies user.trophyDatas = new List <TrophyData>(); foreach (DisassemblygirlTrophyConfig trophyConfig in ConfigMgr.GetInstance().DisassemblygirlTrophy.configs.Values) { user.trophyDatas.Add(TrophyData.FromConfig(trophyConfig)); } return(user); }
public static WeaponData FromConfig(DisassemblygirlWeaponConfig config) { WeaponData weapon = new WeaponData(); weapon.id = config.id; weapon.level = config.level; weapon.name = config.name; weapon.iconID = config.iconID; weapon.attributeBox = AttributeBox.CreateDefault(); weapon.attributeBox.SetAttribute(AttributeKeys.ATK, AttributeSetTypes.BaseValue, config.ATK); weapon.attributeBox.SetAttribute(AttributeKeys.CRT, AttributeSetTypes.BaseValue, config.CRT); weapon.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, config.SPD); weapon.WOE = config.WOE; weapon.CD = config.CD; weapon.GP = config.GP; weapon.RP = config.RP; weapon.resourceID = config.resourceID; weapon.hitEffectID = config.hitEffectID; weapon.audioID = config.audioID; weapon.offsetX = config.offsetX; weapon.offsetY = config.offsetY; weapon.physicsType = (PhysicsType)config.physicsType; if (config.skillID != 0) { weapon.skillData = SkillData.FromConfig(config.skillID); } weapon.effectors = new List <EffectorData>(); foreach (string effectorID in config.effectors.Split('|')) { EffectorData effector = EffectorData.FromConfig(int.Parse(effectorID)); if (effector != null) { weapon.effectors.Add(effector); } } return(weapon); }
public static GirlData FromConfig(DisassemblygirlGirlConfig config) { GirlData girl = new GirlData(); girl.id = config.id; girl.name = config.name; girl.level = config.level; girl.resourceID = config.resourceID; girl.attributeBox = AttributeBox.CreateDefault(); girl.attributeBox.SetAttribute(AttributeKeys.DEX, AttributeSetTypes.BaseValue, config.DEX); girl.attributeBox.SetAttribute(AttributeKeys.VIT, AttributeSetTypes.BaseValue, config.VIT); girl.attributeBox.SetAttribute(AttributeKeys.STR, AttributeSetTypes.BaseValue, config.STR); girl.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, config.SPD); girl.weapons = new List <WeaponData>(); foreach (int weaponID in new int[] { config.weaponA, config.weaponB, config.weaponC }) { girl.AddWeapon(weaponID); } return(girl); }
public static PetData FromConfig(DisassemblygirlPetConfig config) { PetData pet = new PetData(); pet.id = config.id; pet.level = config.level; pet.name = config.name; pet.iconID = config.iconID; pet.GP = config.GP; pet.RP = config.RP; pet.resourceID = config.resourceID; pet.missileData = new MissileData(); pet.missileData.attributeBox = AttributeBox.CreateDefault(); pet.missileData.attributeBox.SetAttribute(AttributeKeys.ATK, AttributeSetTypes.BaseValue, config.ATK); pet.missileData.attributeBox.SetAttribute(AttributeKeys.CRT, AttributeSetTypes.BaseValue, config.CRT); pet.missileData.attributeBox.SetAttribute(AttributeKeys.SPD, AttributeSetTypes.BaseValue, config.SPD); pet.missileData.WOE = config.WOE; pet.missileData.resourceID = config.missileResourceID; pet.missileData.hitEffectID = config.missileHitEffectID; pet.missileData.audioID = config.missileAudioID; pet.missileData.physicsType = (PhysicsType)config.physicsType; pet.missileData.effectors = new List <EffectorData>(); foreach (string effectorID in config.effectors.Split('|')) { EffectorData effector = EffectorData.FromConfig(int.Parse(effectorID)); if (effector != null) { pet.missileData.effectors.Add(effector); } } return(pet); }