internal override void Export(string table) { base.Export(table); table = GetType().Name; var vals = new List <object> { Id, HfId.DBExport(), EntityId.DBExport(), SiteId.DBExport(), SkillAtTime, ItemType.DBExport(Item.ItemTypes), ItemSubType.DBExport(Item.ItemSubTypes), Mat.DBExport(Item.Materials), ImprovementType.DBExport(ImprovementTypes), //ImprovementSubType.DBExport(), //TODO: Uncomment this ImprovementMat.DBExport(Item.Materials), ArtId.DBExport(), ArtSubId.DBExport() }; Database.ExportWorldItem(table, vals); }
void ImproveSelectedCell(ImprovementType type) { if (hoveringCell != null) { gameManager.ImproveCell(hoveringCell, type); } }
public Cluster(String n, Implant s, Implant b, Implant f, ImprovementType type) { ClusterName = n; Shining = s; Bright = b; Faded = f; Category = type; ID = NextID++; }
public CityViewTiles(int id, ImprovementType type, Bitmap sourceBmp, Rectangle sourceRect, Point drawOffset, int altTileId) { id = id; Type = type; SourceBmp = sourceBmp; SourceRect = sourceRect; DrawOffset = drawOffset; AlternativeTileId = altTileId; }
public void ImproveCell(HexCell cell, ImprovementType type) { if (cell.owner.gold < cell.GetImprovementCost(type)) { return; } if (cell.goldImprovementCount == cell.maxImprovementCount && type == ImprovementType.GoldProductionRate || cell.unitRateImprovementCount == cell.maxImprovementCount && type == ImprovementType.UnitSpawnRate || cell.unitCapacityImprovementCount == cell.maxImprovementCount && type == ImprovementType.UnitCapacity) { return; } cell.owner.gold -= cell.GetImprovementCost(type); cell.Improve(type); }
public bool CanBeImproved(ImprovementType type) { if (type == ImprovementType.GoldProductionRate) { return(owner.gold >= GetImprovementCost(ImprovementType.GoldProductionRate) && goldImprovementCount < maxImprovementCount); } if (type == ImprovementType.UnitCapacity) { return(owner.gold >= GetImprovementCost(ImprovementType.UnitCapacity) && unitCapacityImprovementCount < maxImprovementCount); } if (type == ImprovementType.UnitSpawnRate) { return(owner.gold >= GetImprovementCost(ImprovementType.UnitSpawnRate) && unitRateImprovementCount < maxImprovementCount); } return(false); }
public int GetImprovementCost(ImprovementType type) { if (type == ImprovementType.GoldProductionRate) { return(goldImprovementCount * costMuliplier + 15); } if (type == ImprovementType.UnitCapacity) { return(unitCapacityImprovementCount * costMuliplier + 8); } if (type == ImprovementType.UnitSpawnRate) { return(unitRateImprovementCount * costMuliplier + 12); } return(0); }
public void Improve(ImprovementType type) { if (type == ImprovementType.GoldProductionRate && goldImprovementCount < maxImprovementCount) { goldImprovementCount++; } if (type == ImprovementType.UnitCapacity && unitCapacityImprovementCount < maxImprovementCount) { unitCapacityImprovementCount++; } if (type == ImprovementType.UnitSpawnRate && unitRateImprovementCount < maxImprovementCount) { unitRateImprovementCount++; } UpdateStats(); }
public bool ImprovementExists(ImprovementType improvement) => _improvements.Exists(i => i.Type == improvement);
/// <summary> /// Load the CharacterAttribute from the XmlNode. /// </summary> /// <param name="objNode">XmlNode to load.</param> public void Load(XmlNode objNode) { Log.Enter("Load"); try { _strUniqueName = objNode["unique"].InnerText; } catch { } _strImprovedName = objNode["improvedname"].InnerText; _strSourceName = objNode["sourcename"].InnerText; try { _intMin = Convert.ToInt32(objNode["min"].InnerText); } catch { } _intMax = Convert.ToInt32(objNode["max"].InnerText); _intAug = Convert.ToInt32(objNode["aug"].InnerText); _intAugMax = Convert.ToInt32(objNode["augmax"].InnerText); _intVal = Convert.ToInt32(objNode["val"].InnerText); _intRating = Convert.ToInt32(objNode["rating"].InnerText); _strExclude = objNode["exclude"].InnerText; _objImprovementType = ConvertToImprovementType(objNode["improvementttype"].InnerText); _objImprovementSource = ConvertToImprovementSource(objNode["improvementsource"].InnerText); _blnCustom = Convert.ToBoolean(objNode["custom"].InnerText); _strCustomName = objNode["customname"].InnerText; try { _strCustomId = objNode["customid"].InnerText; } catch { } try { _strCustomGroup = objNode["customgroup"].InnerText; } catch { } try { _blnAddToRating = Convert.ToBoolean(objNode["addtorating"].InnerText); } catch { } try { _blnEnabled = Convert.ToBoolean(objNode["enabled"].InnerText); } catch { } try { _strNotes = objNode["notes"].InnerText; } catch { } try { _intOrder = Convert.ToInt32(objNode["order"].InnerText); } catch { } Log.Exit("Load"); }
public Improvement(ImprovementType type) { Type = type; }