2using System.Collections.Generic;
3using System.Reflection;
10 public class Row : BaseRow
195 return base.GetName();
212 image.color =
Color.white;
218 return GetText(
"altname").Split(
',').TryGet(i);
266 return cat.IsChildOf(
"weapon");
268 if (!cat.IsChildOf(
"shield"))
270 return cat.IsChildOf(
"martial");
279 public static readonly IReadOnlyDictionary<string, int>
RowMapping =
new Dictionary<string, int>
290 [
"parentFactor"] = 9,
306 [
"categorySub"] = 25,
307 [
"abilityType"] = 26,
319 [
"levelBonus_JP"] = 38,
325 [
"textPhase_JP"] = 45,
327 [
"textExtra_JP"] = 47,
335 [
"adjective_JP"] = 55,
339 public static readonly IReadOnlyDictionary<string, string>
TypeMapping =
new Dictionary<string, string>
342 [
"alias"] =
"string",
343 [
"name_JP"] =
"string",
345 [
"altname_JP"] =
"string",
346 [
"altname"] =
"string",
347 [
"aliasParent"] =
"string",
348 [
"aliasRef"] =
"string",
349 [
"aliasMtp"] =
"string",
350 [
"parentFactor"] =
"float",
351 [
"lvFactor"] =
"int",
352 [
"encFactor"] =
"int",
353 [
"encSlot"] =
"string",
359 [
"geneSlot"] =
"int",
361 [
"target"] =
"string",
362 [
"proc"] =
"string[]",
364 [
"group"] =
"string",
365 [
"category"] =
"string",
366 [
"categorySub"] =
"string",
367 [
"abilityType"] =
"string[]",
368 [
"tag"] =
"string[]",
369 [
"thing"] =
"string",
371 [
"cooldown"] =
"int",
373 [
"radius"] =
"float",
375 [
"req"] =
"string[]",
376 [
"idTrainer"] =
"string",
377 [
"partySkill"] =
"int",
378 [
"tagTrainer"] =
"string",
379 [
"levelBonus_JP"] =
"string",
380 [
"levelBonus"] =
"string",
381 [
"foodEffect"] =
"string[]",
382 [
"langAct"] =
"string[]",
383 [
"detail_JP"] =
"string",
384 [
"detail"] =
"string",
385 [
"textPhase_JP"] =
"string",
386 [
"textPhase"] =
"string",
387 [
"textExtra_JP"] =
"string",
388 [
"textExtra"] =
"string",
389 [
"textInc_JP"] =
"string",
390 [
"textInc"] =
"string",
391 [
"textDec_JP"] =
"string",
392 [
"textDec"] =
"string",
393 [
"textAlt_JP"] =
"string[]",
394 [
"textAlt"] =
"string[]",
395 [
"adjective_JP"] =
"string[]",
396 [
"adjective"] =
"string[]"
403 public Dictionary<string, string>
fuzzyAlias =
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
405 public override string[]
ImportFields =>
new string[8] {
"altname",
"textPhase",
"textExtra",
"textInc",
"textDec",
"textAlt",
"adjective",
"levelBonus" };
551 foreach (
Row row
in rows)
553 if (row.
id >= 100 && row.
id < 400)
557 row.isAttribute = row.category ==
"attribute";
558 row.isPrimaryAttribute = row.isAttribute && row.
tag.Contains(
"primary");
559 row.isSkill = row.category ==
"skill";
560 row.isSpell = row.categorySub ==
"spell";
561 row.isTrait = row.
tag.Contains(
"trait");
564 foreach (
string key
in alias.Keys)
575 foreach (
Row row
in rows)
582 for (
int i = 910; i < 927; i++)
585 AddRow(ele, num + num2 + 100,
"ball_");
586 AddRow(ele, num + num2 + 200,
"breathe_");
587 AddRow(ele, num + num2 + 300,
"bolt_");
588 AddRow(ele, num + num2 + 400,
"hand_");
589 AddRow(ele, num + num2 + 500,
"arrow_");
590 AddRow(ele, num + num2 + 600,
"funnel_");
591 AddRow(ele, num + num2 + 700,
"miasma_");
592 AddRow(ele, num + num2 + 800,
"weapon_");
593 AddRow(ele, num + num2 + 900,
"puddle_");
594 AddRow(ele, num + num2 + 1000,
"sword_");
595 AddRow(ele, num + num2 + 1100,
"bit_");
596 AddRow(ele, num + num2 + 1200,
"flare_");
604 if (map.ContainsKey(
id))
609 Dictionary<string, System.Reflection.FieldInfo> rowFields = row.GetRowFields();
611 foreach (System.Reflection.FieldInfo value in rowFields.Values)
613 value.SetValue(row2, value.GetValue(row));
616 row2.idMold = row.
id;
617 row2.alias = row.alias + ele.
alias.Remove(0, 3);
618 row2.aliasRef = ele.
alias;
620 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)