1using System.Collections.Generic;
50 elomap.SetZone(zone.x, zone.y, zone);
56 foreach (
Cell cell
in cells)
63 if (tileInfo !=
null && tileInfo.
source !=
null && tileInfo.
source.idBiome.IsEmpty(
"Plain") ==
"Sand")
66 cell.impassable =
false;
82 TryAddZone(
"cave_fairy");
83 TryAddZone(
"foxtown_nefu");
84 TryAddZone(
"little_garden");
85 TryAddZone(
"cave_yeek");
86 TryAddZone(
"village_exile");
87 TryAddZone(
"temple_undersea");
89 void TryAddZone(
string id)
112 int num = 70 - list.Count;
117 for (
int i = 0; i < num; i++)
152 if (idSource.IsEmpty())
180 zone._dangerLv = Mathf.Max(1,
lv);
181 zone.isRandomSite =
true;
203 for (
int i = 0; i < 1000; i++)
219 for (
int i = 0; i < 1000; i++)
221 point.x = orgX +
Rand.
Range(-radius / 2, radius / 2);
222 point.z = orgY +
Rand.
Range(-radius / 2, radius / 2);
223 if (i % 100 == 0 && increaseRadius)
239 for (
int i = 0; i < 1000; i++)
241 point.x = orgX +
Rand.
Range(-maxRadius, maxRadius);
242 point.z = orgY +
Rand.
Range(-maxRadius, maxRadius);
269 List<Zone> list =
new List<Zone>();
274 list.Add(value as
Zone);
284 for (
int i = 0; i < 5; i++)
286 zone = list.RandomItem();
301 List<Zone> list =
new List<Zone>();
304 if (zone.
Dist(center) <= radius && zone != center && !(zone.
source.parent != base.source.id))
315 List<Zone> list =
new List<Zone>();
352 if (randomPoint !=
null)
358 ShouldPass = (
SourceChara.
Row s) => s.biome == biome.name || s.biome.IsEmpty()
370 List<Chara> list =
new List<Chara>();
string GetRandomCharaId()
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-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()
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)