2using System.Collections.Generic;
5using System.Runtime.Serialization;
214 SetBonus(1000000000, 50000);
215 SetBonus(100000000, 20000);
216 SetBonus(10000000, 10000);
217 SetBonus(500000, 5000);
218 SetBonus(250000, 3000);
219 SetBonus(100000, 2000);
220 SetBonus(20000, 1000);
225 void SetBonus(
int threshold,
int div)
229 p += (_a - threshold) / div;
247 public int[]
ints =
new int[50];
263 public Dictionary<string, ExcelData>
storyExcel =
new Dictionary<string, ExcelData>();
658 bits.Bits = (uint)
ints[0];
671 if (
build == 0 && r.
id ==
"workbench")
686 if (
item[
"step"] == idStep)
688 return item[
"id"].ToInt();
694 public Dictionary<string, string>
GetStoryRow(
string idBook,
int id)
698 if (
item[
"id"].ToInt() ==
id)
709 if (excelData ==
null)
712 excelData.path = CorePath.DramaData + idBook +
".xlsx";
719 public bool PlayStory(
string idBook,
int id,
bool fromBook =
false)
725 Dictionary<string, string> storyRow =
GetStoryRow(idBook,
id);
726 SoundManager.ForceBGM();
727 LayerDrama.fromBook = fromBook;
960 public Dictionary<string, int>
dialogFlags =
new Dictionary<string, int>();
963 public Dictionary<string, string>
hangIcons =
new Dictionary<string, string>();
966 public Dictionary<string, KnownSong>
knownSongs =
new Dictionary<string, KnownSong>();
969 public Dictionary<string, string>
lastRecipes =
new Dictionary<string, string>();
972 public Dictionary<string, List<string>>
priorityActions =
new Dictionary<string, List<string>>();
1038 public Dictionary<int, int>
keyItems =
new Dictionary<int, int>();
1047 public Dictionary<string, HashSet<string>>
noRestocks =
new Dictionary<string, HashSet<string>>();
1213 return quest.phase >= 10;
1226 return quest.phase >= 10;
1239 return quest.phase >= 10;
1252 return quest.phase >= 10;
1275 chara.c_idTone =
"default";
1281 Fav fav = IO.LoadFile<Fav>(CorePath.user +
"PCC/fav" +
EClass.
rnd(3));
1282 chara.pccData = IO.Duplicate(fav.data);
1286 _agent.c_altName =
"stash".lang();
1287 EClass.player.title =
"master".lang();
1293 pref.sort_ascending_shop =
true;
1294 EClass.game.config.preference.autoEat =
true;
1295 flags.toggleHotbarHighlightDisabled =
true;
1296 layerAbilityConfig.hideDepletedSpell =
true;
1297 layerAbilityConfig.bgAlpha = 70;
1307 EClass.player.questTracker =
true;
1319 List<Element> list =
new List<Element>();
1326 if (
item.Value == 0)
1330 else if (
item.HasTag(
"primary"))
1332 item.vTempPotential = Mathf.Max(30, (
item.ValueWithoutLink - 8) * 7);
1345 EClass.pc.hunger.value = 30;
1370 t.c_windowSaveData =
null;
1371 }, onlyAccessible:
false);
1380 foreach (
Window componentsInDirectChild
in layer.GetComponentsInDirectChildren<
Window>())
1398 p.ForeachReverse(delegate(
string i)
1420 if (!
id.IsEmpty() && t !=
null)
1423 if (list !=
null && list.Contains(t.
id))
1435 string text =
"time_warn_" +
realHour;
1445 for (
int i = 0; i <
EClass.
pc.
job.domain.Length; i += 2)
1454 foreach (
int domain
in domains)
1456 elementContainer.GetOrCreateElement(domain).vSource = 1;
1458 return elementContainer;
1466 if (row2.categorySub ==
"eleAttack" && !row2.tag.Contains(
"hidden") && (!row2.tag.Contains(
"high") ||
EClass.
pc.
job.domain.Contains(row2.id)))
1489 }, delegate(List<UIList.ButtonPair> list)
1491 bool flag = EClass.player.domains.Count >= 3 +
EClass.
pc.
Evalue(1402);
1500 if (row.id == domain2)
1505 button.SetCheck(flag3);
1506 for (
int i = 0; i < ((EClass.pc.job.id ==
"swordsage") ? 5 : 3); i++)
1513 button.interactable = !flag2 && (!flag || flag3);
1514 button.GetComponent<CanvasGroup>().enabled = !button.interactable;
1516 }).SetOnKill(delegate
1524 int num =
MaxAlly - EClass.pc.party.members.Count + 1;
1544 StringBuilder stringBuilder =
new StringBuilder(IO.LoadText(
GameIO.
pathCurrentSave +
"background.txt"));
1551 stringBuilder.Replace(
"#job",
EClass.
pc.
job.GetName().AddArticle());
1555 stringBuilder.Replace(
"#he", (
EClass.
pc.
IsMale ?
"he" :
"she").lang());
1556 stringBuilder.Replace(
"#his", (
EClass.
pc.
IsMale ?
"his" :
"her").lang());
1557 stringBuilder.Replace(
"#him", (
EClass.
pc.
IsMale ?
"him" :
"her").lang());
1558 string separator =
"_period".lang();
1559 stringBuilder.ToString().Split(separator);
1560 return stringBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray());
1580 bool firstSpellbook =
true;
1611 string[] tag = element.
source.tag;
1612 foreach (
string text2
in tag)
1656 firstSpellbook =
false;
1659 t.c_charges = charge;
1677 string[] tag = element.
source.tag;
1678 foreach (
string text2
in tag)
1712 if (list.Count != 0)
1716 int mtp = ((num == 0) ? 100 : (75 + num * 25));
1717 if (num > 0 || element2 ==
null || element2.
vPotential == 0)
1732 if (child.
owner != currentZone)
1753 string textDialog = (flag ?
"ExitZoneEscort" :
"ExitZone").lang(
EClass.
_zone.
Name);
1754 bool flag2 = EClass.pc.pos.x == EClass._map.bounds.x || EClass.pc.pos.x == EClass._map.bounds.x + EClass._map.bounds.Width - 1 || EClass.pc.pos.z == EClass._map.bounds.z || EClass.pc.pos.z == EClass._map.bounds.z + EClass._map.bounds.Height - 1;
1768 p.TrySetAct(
"actNewZone", delegate
1784 p.TrySetAct(
"actNewZone", delegate
1820 else if (p.
x <= bounds.
maxX)
1822 num2 = ((p.z >= bounds.
z) ? 1 : (-1));
1834 float ratePos = ((num == 1 || num == -1) ? ((
float)(p.z - bounds.
z) / (
float)bounds.
Height) : ((
float)(p.x - bounds.
x) / (
float)bounds.
Width));
1871 int num2 = Mathf.Clamp(roadDist - 4, 0, 200) + Mathf.Clamp(num / 4, 0, 10);
1874 num2 += roadDist - 20;
1880 Debug.Log(
"encounter roadiDist:" + roadDist +
" homeDist:" + num +
" lv:" + num2);
1882 zone._dangerLv = num2;
1883 enemies = 2 + Mathf.Min(num2 / 10, 4) +
EClass.
rnd(3 + Mathf.Min(num2 / 10, 4));
1908 Msg.
Say(
"zoneNoEntrance");
1926 roadDist = roadDist,
1934 CursorSystem.ignoreCount = 15;
1935 EClass.
ui.hud.transRight.SetActive(enable:
false);
1959 int num = elapsedHour / 24;
2009 Msg.
Say(
"gainFameLimit");
2020 Msg.
Say(
"gainFame", a.ToString() ??
"");
2024 Msg.
Say(
"looseFame", (-a).ToString() ??
"");
2032 public void ModKeyItem(
string alias,
int num = 1,
bool msg =
true)
2053 SE.Play(
"keyitem_lose");
2142 WidgetHotbar.dirtyCurrentItem =
false;
2150 item.invs[0].RefreshHighlight();
2202 int num = 999999999;
2205 List<Chara> list =
new List<Chara>();
2252 Msg.
Say(
"noTargetFound");
2320 lastMarkedHighlight.highlight = 0;
2356 bool canSee =
false;
2387 Msg.
Say(
"DingKnowledge");
2404 Msg.
Say(
"DingInfluence");
2416 bool flag =
karma < 0;
2418 Msg.
Say((a > 0) ?
"karmaUp" :
"karmaDown", a.ToString() ??
"");
2419 if (
karma < 0 && !flag)
2421 Msg.
Say(
"becomeCriminal");
2426 if (
karma >= 0 && flag)
2428 Msg.
Say(
"becomeNonCriminal");
2454 Msg.
Say(
"tooHeavyToMove");
void SetInt(int id, int value=0)
List< Action > actionsNextFrame
ElementContainerCard elements
Thing AddThing(string id, int lv=-1)
void AddEditorTag(EditorTag tag)
void ForeachPoint(Action< Point, bool > action)
virtual void SetBlessedState(BlessedState s)
void ModExp(string alias, int a)
Thing Add(string id, int num=1, int lv=1)
void AddBodyPart(int ele, Thing thing=null)
void Unequip(Thing thing, bool refresh=true)
static Chara Create(string id, int lv=-1)
void Refresh(bool calledRecursive=false)
override bool IsAliveInCurrentZone
void SetFaction(Faction f)
bool CanSeeLos(Card c, int dist=-1)
void HoldCard(Card t, int num=-1)
void PickHeld(bool msg=false)
bool HasCondition(string alias)
override CardRenderer _CreateRenderer()
void CalculateMaxStamina()
override bool IsDeadOrSleeping
void GainAbility(int ele, int mtp=100)
void RefreshFaithElement()
void RefreshSpeed(Element.BonusInfo info=null)
override bool IsMultisize
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
bool TryIdentify(Thing t, int count=1, bool show=true)
void MoveZone(string alias)
static CursorInfo MoveZone
int GetElapsedHour(int rawDate)
int GetRaw(int offsetHours=0)
string GetText(TextFormat format)
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
static SourceManager sources
static GameSetting setting
Dictionary< int, Element > dict
void ModExp(int ele, int a, bool chain=false)
int GetFeatRef(int ele, int idx=0)
Element SetBase(string alias, int v, int potential=0)
Element GetElement(string alias)
static Element Create(int id, int v=0)
int GetRoadDist(int gx, int gy)
List< Dictionary< string, string > > BuildList(string sheetName="_default")
List< FactionBranch > GetChildren()
static string pathCurrentSave
ReligionManager religions
virtual void OnUnsetCurrentItem()
virtual void OnMarkMapHighlights()
virtual void OnSetCurrentItem()
static bool Has(string id)
static LayerDrama Activate(string book, string idSheet, string idStep, Chara target=null, Card ref1=null, string tag="")
static List< LayerInventory > listInv
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
bool IsStoryPlayed(int flag)
void _OnSerializing(StreamingContext context)
bool canComupWithFoodRecipe
int GetStoryRowID(string idBook, string idStep)
bool toggleHotbarHighlightDisabled
bool PlayStory(int id, bool fromBook=false)
void _OnDeserialized(StreamingContext context)
Dictionary< string, string > GetStoryRow(string idBook, int id)
ExcelData GetStoryExcelData(string idBook)
bool abilityHighlightDisabled
bool PlayStory(string idBook, int id, bool fromBook=false)
List< int > availableStories
bool helpHighlightDisabled
Dictionary< string, ExcelData > storyExcel
bool toggleHotbarHighlightActivated
List< string > reservedTutorial
List< int > playedStories
HashSet< int > pleaseDontTouch
int daysAfterQuestExploration
bool backpackHighlightDisabled
bool pickedMelilithTreasure
UIList.SortMode sortResearch
LayerPeople.ShowMode modePoeple
UIList.SortMode sortInvShop
UIList.SortMode sortAbility
UIList.SortMode sortResources
UIList.SortMode sortPeople
UIInventory.InteractMode interactMode
int GetShippingBonus(long _a)
ZoneTransition lastTransition
Dictionary< string, string > lastRecipes
Layer SelectDomain(Action onKill=null)
List< int > uidPickOnLoad
bool IsFighterGuildMember
bool IsPriorityAction(string id, Thing t)
Dictionary< string, KnownSong > knownSongs
void SetPriorityAction(string id, Thing t)
WidgetManager.SaveData widgets
Window.SaveData windowAllyInv
CinemaConfig cinemaConfig
bool CanExitBorder(Point p)
void ResetCurrentHotItem()
void ToggleFavMoongate(string id)
void OnExitBorder(Point p)
void EquipTool(Thing a, bool setHotItem=true)
List< Cell > lastMarkedHighlights
bool HasKeyItem(string alias)
bool HasValidRangedTarget()
void AddInventory(Card c)
Dictionary< string, int > dialogFlags
void EndTurn(bool consume=true)
ElementContainer GetDomains()
void EnterLocalZone(bool encounter=false, Chara mob=null)
HashSet< int > doneBackers
int ContainerSearchDistance
void AddExpKnowledge(int a)
HashSet< string > trackedCategories
int CountKeyItem(string alias)
HashSet< int > knownCraft
WidgetManager.SaveData subWidgets
Dictionary< string, HashSet< string > > noRestocks
Dictionary< string, Window.SaveData > dataWindow
HashSet< int > favAbility
void GenerateBackgroundText()
void ModKeyItem(string alias, int num=1, bool msg=true)
List< ShippingResult > shippingResults
void ModKeyItem(int id, int num=1, bool msg=true)
void ExitBorder(ActPlan p=null)
Dictionary< string, string > hangIcons
Dictionary< string, List< string > > priorityActions
KnowledgeManager knowledges
Thing DropReward(Thing t, bool silent=false)
HashSet< string > trackedCards
WidgetManager.SaveData mainWidgets
Window.SaveData windowDataCopy
static int seedHallucination
void EnterLocalZone(Point p, ZoneTransition trans=null, bool encounter=false, Chara mob=null)
HotItemNoItem hotItemNoItem
void AddExpInfluence(int a)
bool TryAbortAutoCombat(bool immediate=true)
void ClearMapHighlights()
LayerAbility.Config layerAbilityConfig
List< string > favMoongate
HashSet< int > trackedElements
string GetBackgroundText()
void RefreshCurrentHotItem()
void EditBackgroundText()
Dictionary< int, int > keyItems
bool IsMerchantGuildMember
void SetCurrentHotItem(HotItem item)
Point Set(int _x, int _z)
bool Equals(int _x, int _z)
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Quest Start(string id, string idGlobalChara)
bool HasFarAwayEscort(bool execute=false)
virtual void OnModKarma(int a)
static int Set(Zone zone)
bool CanCreateZone(Point pos)
Zone CreateZone(Point pos)
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
void DestroyAll(Func< Thing, bool > funcExclude=null)
void SetSize(int w, int h)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
static Thing CreateRedBook(string id, int num=1)
static Thing CreateSpellbook(string alias, int num=1)
static Thing CreateCurrency(int a, string id="money")
static Thing Create(string id, int idMat=-1, int lv=-1)
override bool OnUse(Chara c)
virtual HotItem GetHotItem()
virtual bool CanOnlyCarry
static void Reserve(string idStep, Action onBeforePlay=null)
static UIResourceTrack Instance
static Dictionary< string, SaveData > dictData
void AddPreEnter(ZonePreEnterEvent e, bool executeIfActiveZone=true)
static EnterState DirToState(int dir)
virtual bool BlockBorderExit
virtual ZoneTransition.EnterState RegionEnterState
Zone GetZoneAt(int _x, int _y)
Card AddCard(Card t, Point point)