15 return EClass.sources.materials.rows[88];
20 public static SourceMaterial.Row GetRandomMaterial(
int lv,
string group =
null,
bool tryLevelMatTier =
false)
24 group = ((
EClass.rnd(2) == 0) ?
"metal" :
"leather");
26 if (!(group ==
"metal"))
28 if (group ==
"leather")
36 else if (
EClass.rnd(15) == 0)
44 num = Mathf.Clamp(lv / 15, 0, tierList.tiers.Length - 1);
45 num = Mathf.Clamp(num +
EClass.rnd(2) -
EClass.rnd(2), 0, tierList.tiers.Length - 1);
49 int min = (lv >= 60) ? 2 : ((lv >= 25) ? 1 : 0);
50 num = Mathf.Clamp(
EClass.rnd(
EClass.rnd(
EClass.rnd(lv / 10 + 2) + 1) + 1), min, tierList.tiers.Length - 1);
54 if (tier.list.Count == 0)
56 Debug.Log(
string.Concat(
new string[]
72 return MATERIAL.GetRandomMaterialFromCategory(lv,
new string[]
81 int min = (lv >= 60) ? 2 : ((lv >= 25) ? 1 : 0);
85 where cat.Contains(m.category) && m.tier <= idTier
89 return list.RandomItemWeighted((
SourceMaterial.
Row a) => (
float)(a.chance * ((a.tier == idTier) ? 5 : 1)));
95 public const byte oak = 1;
98 public const byte granite = 3;
101 public const byte mud = 4;
104 public const byte sand = 8;
107 public const byte soil = 45;
110 public const byte snow = 48;
113 public const byte water = 66;
116 public const byte water_fresh = 67;
119 public const byte ice = 61;
122 public const byte gold = 12;
125 public const byte water_sea = 88;
128 public const byte process = 94;
131 public const byte sand_sea = 97;