2using System.Collections.Generic;
3using System.Reflection;
10 public class Row : BaseRow
200 return base.GetName();
217 image.color =
Color.white;
223 return GetText(
"altname").Split(
',').TryGet(i);
271 return cat.IsChildOf(
"weapon");
273 if (!cat.IsChildOf(
"shield"))
275 return cat.IsChildOf(
"martial");
284 public static readonly IReadOnlyDictionary<string, int>
RowMapping =
new Dictionary<string, int>
295 [
"parentFactor"] = 9,
311 [
"categorySub"] = 25,
312 [
"abilityType"] = 26,
324 [
"levelBonus_JP"] = 38,
330 [
"textPhase_JP"] = 45,
332 [
"textExtra_JP"] = 47,
340 [
"adjective_JP"] = 55,
344 public static readonly IReadOnlyDictionary<string, string>
TypeMapping =
new Dictionary<string, string>
347 [
"alias"] =
"string",
348 [
"name_JP"] =
"string",
350 [
"altname_JP"] =
"string",
351 [
"altname"] =
"string",
352 [
"aliasParent"] =
"string",
353 [
"aliasRef"] =
"string",
354 [
"aliasMtp"] =
"string",
355 [
"parentFactor"] =
"float",
356 [
"lvFactor"] =
"int",
357 [
"encFactor"] =
"int",
358 [
"encSlot"] =
"string",
364 [
"geneSlot"] =
"int",
366 [
"target"] =
"string",
367 [
"proc"] =
"string[]",
369 [
"group"] =
"string",
370 [
"category"] =
"string",
371 [
"categorySub"] =
"string",
372 [
"abilityType"] =
"string[]",
373 [
"tag"] =
"string[]",
374 [
"thing"] =
"string",
376 [
"cooldown"] =
"int",
378 [
"radius"] =
"float",
380 [
"req"] =
"string[]",
381 [
"idTrainer"] =
"string",
382 [
"partySkill"] =
"int",
383 [
"tagTrainer"] =
"string",
384 [
"levelBonus_JP"] =
"string",
385 [
"levelBonus"] =
"string",
386 [
"foodEffect"] =
"string[]",
387 [
"langAct"] =
"string[]",
388 [
"detail_JP"] =
"string",
389 [
"detail"] =
"string",
390 [
"textPhase_JP"] =
"string",
391 [
"textPhase"] =
"string",
392 [
"textExtra_JP"] =
"string",
393 [
"textExtra"] =
"string",
394 [
"textInc_JP"] =
"string",
395 [
"textInc"] =
"string",
396 [
"textDec_JP"] =
"string",
397 [
"textDec"] =
"string",
398 [
"textAlt_JP"] =
"string[]",
399 [
"textAlt"] =
"string[]",
400 [
"adjective_JP"] =
"string[]",
401 [
"adjective"] =
"string[]"
408 public Dictionary<string, string>
fuzzyAlias =
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
410 public override string[]
ImportFields =>
new string[8] {
"altname",
"textPhase",
"textExtra",
"textInc",
"textDec",
"textAlt",
"adjective",
"levelBonus" };
556 foreach (
Row row
in rows)
558 if (row.
id >= 100 && row.
id < 400)
562 row.isAttribute = row.category ==
"attribute";
563 row.isPrimaryAttribute = row.isAttribute && row.
tag.Contains(
"primary");
564 row.isSkill = row.category ==
"skill";
565 row.isSpell = row.categorySub ==
"spell";
566 row.isTrait = row.
tag.Contains(
"trait");
569 foreach (
string key
in alias.Keys)
580 foreach (
Row row
in rows)
587 for (
int i = 910; i < 927; i++)
590 AddRow(ele, num + num2 + 100,
"ball_");
591 AddRow(ele, num + num2 + 200,
"breathe_");
592 AddRow(ele, num + num2 + 300,
"bolt_");
593 AddRow(ele, num + num2 + 400,
"hand_");
594 AddRow(ele, num + num2 + 500,
"arrow_");
595 AddRow(ele, num + num2 + 600,
"funnel_");
596 AddRow(ele, num + num2 + 700,
"miasma_");
597 AddRow(ele, num + num2 + 800,
"weapon_");
598 AddRow(ele, num + num2 + 900,
"puddle_");
599 AddRow(ele, num + num2 + 1000,
"sword_");
600 AddRow(ele, num + num2 + 1100,
"bit_");
601 AddRow(ele, num + num2 + 1200,
"flare_");
602 AddRow(ele, num + num2 + 1300,
"comet_");
603 AddRow(ele, num + num2 + 1400,
"missile_");
611 if (map.ContainsKey(
id))
616 Dictionary<string, System.Reflection.FieldInfo> rowFields = row.GetRowFields();
618 foreach (System.Reflection.FieldInfo value in rowFields.Values)
620 value.SetValue(row2, value.GetValue(row));
623 row2.idMold = row.
id;
624 row2.alias = row.alias + ele.
alias.Remove(0, 3);
625 row2.aliasRef = ele.
alias;
627 row2.chance = row.chance * ele.chance / 100;
bool IsEquipmentOrRangedOrAmmo
static Core SetCurrent(Core _current=null)
static SourceManager sources
static GameSetting setting
UD_String_ElementRef elements
static float GetFloat(int id)
static string[] GetStringArray(int id)
static string GetString(int id)
static int GetInt(int id)
static int[] GetIntArray(int id)
bool IsEncAppliable(SourceCategory.Row cat)
override string GetName()
void SetImage(Image image)
bool IsMaterialEncAppliable(Thing t)
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
override void OnAfterImportData()
static readonly IReadOnlyDictionary< string, int > RowMapping
override IReadOnlyDictionary< string, int > GetRowMapping()
static readonly IReadOnlyDictionary< string, string > TypeMapping
void AddRow(Row ele, int id, string idOrg)
override void SetRow(Row r)
Dictionary< string, string > fuzzyAlias
override string[] ImportFields
override IReadOnlyDictionary< string, string > GetTypeMapping()
static Sprite Get(string id)