1using System.Collections.Generic;
3using System.Runtime.Serialization;
51 elomap.SetZone(zone.x, zone.y, zone);
57 foreach (
Cell cell
in cells)
64 if (tileInfo !=
null && tileInfo.
source !=
null && tileInfo.
source.idBiome.IsEmpty(
"Plain") ==
"Sand")
67 cell.impassable =
false;
83 TryAddZone(
"cave_fairy");
84 TryAddZone(
"foxtown_nefu");
85 TryAddZone(
"little_garden");
86 TryAddZone(
"cave_yeek");
87 TryAddZone(
"cave_dragon");
88 TryAddZone(
"cave_mino");
89 TryAddZone(
"village_exile");
90 TryAddZone(
"temple_undersea");
91 TryAddZone(
"curryruin");
92 TryAddZone(
"cave_dead");
94 void TryAddZone(
string id)
117 int num = 70 - list.Count;
122 for (
int i = 0; i < num; i++)
157 if (idSource.IsEmpty())
185 zone._dangerLv = Mathf.Max(1,
lv);
186 zone.isRandomSite =
true;
208 for (
int i = 0; i < 1000; i++)
224 for (
int i = 0; i < 1000; i++)
226 point.x = orgX +
Rand.
Range(-radius / 2, radius / 2);
227 point.z = orgY +
Rand.
Range(-radius / 2, radius / 2);
228 if (i % 100 == 0 && increaseRadius)
244 for (
int i = 0; i < 1000; i++)
246 point.x = orgX +
Rand.
Range(-maxRadius, maxRadius);
247 point.z = orgY +
Rand.
Range(-maxRadius, maxRadius);
274 List<Zone> list =
new List<Zone>();
279 list.Add(value as
Zone);
289 for (
int i = 0; i < 5; i++)
291 zone = list.RandomItem();
306 List<Zone> list =
new List<Zone>();
309 if (zone.
Dist(center) <= radius && zone != center && !(zone.
source.parent != base.source.id))
320 List<Zone> list =
new List<Zone>();
357 if (randomPoint !=
null)
363 ShouldPass = (
SourceChara.
Row s) => s.biome == biome.name || s.biome.IsEmpty()
376 List<Chara> list =
new List<Chara>();
390 for (
int num = children.Count - 1; num >= 0; num--)
394 RemoveChild(children[num]);
string GetRandomCharaId()
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
static Chara Create(string id, int lv=-1)
int GetRaw(int offsetHours=0)
static SourceManager sources
static int rndHalf(int a)
void Initialize(EloMap _elomap)
SourceGlobalTile.Row source
void SetZone(int gx, int gy, Zone z, bool updateMesh=false)
bool IsSnow(int gx, int gy)
bool CanBuildSite(int gx, int gy, int radius=0, ElomapSiteType type=ElomapSiteType.Nefia)
bool IsWater(int gx, int gy)
TileInfo GetTileInfo(int gx, int gy)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
int CountKeyItem(string alias)
Point Set(int _x, int _z)
static int Range(int min, int max)
Point GetRandomPoint(ElomapSiteType type=ElomapSiteType.Nefia)
SourceZone.Row GetRandomSiteSource()
bool CanCreateZone(Point pos)
Point GetRandomPoint(int orgX, int orgY, int minRadius, int maxRadius)
override void OnAdvanceHour()
override bool BlockBorderExit
override void OnActivate()
override ActionMode DefaultActionMode
List< Zone > ListTravelZones(int radius=100)
override bool WillAutoSave
Zone CreateZone(Point pos)
List< Zone > ListRandomSites()
void _OnDeserialized(StreamingContext context)
Zone CreateRandomSite(Zone center, int radius=8, string idSource=null, bool updateMesh=true, int lv=0)
List< Zone > ListZonesInRadius(Zone center, int radius=10)
Zone CreateRandomSite(Point pos, string idSource, bool updateMesh, int lv=0)
Point GetRandomPoint(int orgX, int orgY, int radius=8, bool increaseRadius=false, ElomapSiteType type=ElomapSiteType.Nefia)
static Spatial Create(string id, Spatial parent, bool register, int x=-99999, int y=-99999, int icon=0)
virtual bool CanFastTravel
static SpawnList Get(string id, string parent=null, CardFilter filter=null)
Card AddCard(Card t, Point point)