提高学习经验获取速度&修改工作超模算法

This commit is contained in:
ZouJin 2023-10-25 22:11:30 +08:00
parent 48982da3c5
commit 51140bb091
7 changed files with 29 additions and 19 deletions

View File

@ -198,7 +198,7 @@ namespace VPet_Simulator.Core
}
if (addhealth > 0)
Core.Save.Health += addhealth * TimePass;
var addmoney = Math.Max(0, TimePass * (nowwork.MoneyBase * (efficiency) + Core.Save.Level * nowwork.MoneyLevel * (efficiency - 0.5) * 2));
var addmoney = Math.Max(0, TimePass * (nowwork.MoneyBase * (efficiency) + Math.Sqrt(Core.Save.Level) * nowwork.MoneyLevel * (efficiency - 0.5) * 2));
if (nowwork.Type == GraphHelper.Work.WorkType.Work)
Core.Save.Money += addmoney;
else

View File

@ -14,6 +14,10 @@ namespace VPet_Simulator.Windows.Interface
{
public static class ExtensionFunction
{
/// <summary>
/// 工作计算等级
/// </summary>
public static readonly int[] WorkCalLevel = new int[] { 1, 5, 10, 20, 30, 40, 50, 75, 100, 200 };
/// <summary>
/// 判断这个工作是否超模
/// </summary>
@ -27,7 +31,12 @@ namespace VPet_Simulator.Windows.Interface
(work.StrengthDrink >= 0 ? 1 : -1) * Math.Pow(work.StrengthDrink * 2 + 1, 2) / 9 +
(work.Feeling >= 0 ? 1 : -1) * Math.Pow((work.Type == Work.WorkType.Play ? -1 : 1) * work.Feeling * 2 + 1, 2) / 12) *
(Math.Pow(work.LevelLimit / 2 + 1, 0.5) / 4 + 1) - 0.5;
var get = (work.MoneyBase + work.MoneyLevel * 10) * (work.MoneyLevel + 1) * (1 + work.FinishBonus / 2);
double get = 0;
foreach (var lv in WorkCalLevel)
{
get += (work.MoneyBase + Math.Sqrt(lv) * work.MoneyLevel) * (1 + work.FinishBonus / 2);
}
get /= WorkCalLevel.Length;
if (work.Type != Work.WorkType.Work)
{
get /= 12;//经验值换算
@ -35,9 +44,9 @@ namespace VPet_Simulator.Windows.Interface
var rel = get / spend;
if (rel < 0)
return true;
if (Math.Abs(get) > (work.LevelLimit + 4) * 6) //等级获取速率限制
if (Math.Abs(get) > (work.LevelLimit + 4) * 3) //等级获取速率限制
return true;
return rel > 2; // 推荐rel为1.0-1.4之间 超过2.0就是超模
return rel > 0.75; // 推荐rel为0.5左右 超过0.75就是超模
}
public static string FoodToDescription(this IFood food)

View File

@ -948,14 +948,15 @@ namespace VPet_Simulator.Windows
(work.StrengthDrink >= 0 ? 1 : -1) * Math.Pow(work.StrengthDrink * 2 + 1, 2) / 9 +
(work.Feeling >= 0 ? 1 : -1) * Math.Pow((work.Type == Work.WorkType.Play ? -1 : 1) * work.Feeling * 2 + 1, 2) / 12) *
(Math.Pow(work.LevelLimit / 2 + 1, 0.5) / 4 + 1) - 0.5;
var get = (work.MoneyBase + work.MoneyLevel * 10) * (work.MoneyLevel + 1) * (1 + work.FinishBonus / 2);
if (work.Type != Work.WorkType.Work)
double get = 0;
foreach (var lv in WorkCalLevel)
{
get /= 12;//经验值换算
get += (work.MoneyBase + Math.Sqrt(lv) * work.MoneyLevel) * (1 + work.FinishBonus / 2);
}
get /= WorkCalLevel.Length;
var rel = get / spend;
if (MessageBoxX.Show("当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐<1.5\n盈利速度:{1:f0} 推荐<{2}"
.Translate(rel, get, (work.LevelLimit + 4) * 6), "超模工作提醒".Translate(), MessageBoxButton.YesNo) != MessageBoxResult.Yes)
if (MessageBoxX.Show("当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐=0.5<0.75\n盈利速度:{1:f0} 推荐<{2}"
.Translate(rel, get, (work.LevelLimit + 4) * 3), "超模工作提醒".Translate(), MessageBoxButton.YesNo) != MessageBoxResult.Yes)
{
return false;
}

View File

@ -26,7 +26,7 @@
该选项重启后生效#This option takes effect after restart:|
当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}#The current food/item attribute supermodel, whether to continue to use?\nUsing supermodel food may cause the game to have unexpected errors\nUsing supermodel food does not affect most of the achievements to unlock\nThe recommended price for this item is {0:f0}:|
超模食物/物品使用提醒#Supermodel food/item use reminder:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐<1.5\n盈利速度:{1:f0} 推荐<{2}#The current work data attribute supermodel, whether to continue to work?\nSupermodel work may cause the game to have unexpected errors\nSupermodel work does not affect most of the achievements to unlock\nCurrent data ratio {0:f2} recommended <1.5\nProfit speed: {1:f0} recommended <{2}:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐=0.5<0.75\n盈利速度:{1:f0} 推荐<{2}#The current work data attribute supermodel, whether to continue to work?\nSupermodel work may cause the game to have unexpected errors\nSupermodel work does not affect most of the achievements to unlock\nCurrent data ratio {0:f2} recommended =0.5<0.75\nProfit speed: {1:f0} recommended <{2}:|
是没有修改过存档/使用超模MOD的玩家专属标志#Is there no modified archive/supermodel MOD player exclusive logo:|
重新开始#Restart New Game:|
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#Restart a new game, reset statistics and other information\rIt is very helpful for those who want to get out of the supermodel and get achievements.:|

View File

@ -26,7 +26,7 @@
该选项重启后生效#该选项重启后生效:|
当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}#当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}:|
超模食物/物品使用提醒#超模食物/物品使用提醒:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐<1.5\n盈利速度:{1:f0} 推荐<{2}#当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐<1.5\n盈利速度:{1:f0} 推荐<{2}:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐=0.5<0.75\n盈利速度:{1:f0} 推荐<{2}#当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐=0.5<0.75\n盈利速度:{1:f0} 推荐<{2}:|
超模工作提醒#超模工作提醒:|
是没有修改过存档/使用超模MOD的玩家专属标志#是没有修改过存档/使用超模MOD的玩家专属标志:|
重新开始#重新开始:|

View File

@ -26,7 +26,7 @@
该选项重启后生效#本選項在遊戲重新啟動後生效:|
当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}#當前食物物品屬性過於OP是否繼續使用\n使用OP食物可能會使遊戲發生不可預料的錯誤\n使用OP食物不影響大部分成就解鎖\n本物品建議售價為{0:f0}:|
超模食物/物品使用提醒#OP食物物品使用提醒:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐<1.5\n盈利速度:{1:f0} 推荐<{2}#當前工作的屬性過於OP是否繼續工作\n繼續工作可能會導致遊戲發生不可預料的錯誤\n進行OP工作不影響大部分成就解鎖\n當前資料比率{0:f2},建議<1.5\n盈利速度{1:f0},建議<{2}:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2} 推荐=0.5<0.75\n盈利速度:{1:f0} 推荐<{2}#當前工作的屬性過於OP是否繼續工作\n繼續工作可能會導致遊戲發生不可預料的錯誤\n進行OP工作不影響大部分成就解鎖\n當前資料比率{0:f2},建議=0.5<0.75\n盈利速度{1:f0},建議<{2}:|
超模工作提醒#OP工作提醒:|
是没有修改过存档/使用超模MOD的玩家专属标志#是沒有修改過存檔使用過OP模組的玩家專屬徽章:|
重新开始#重新開始:|

View File

@ -3,13 +3,13 @@ touchhead:|px#159:|py#16:|sw#189:|sh#178:|
touchbody:|px#166:|py#206:|sw#163:|sh#136:|
touchraised:|happy_px#0:|happy_py#50:|happy_sw#500:|happy_sh#200:|nomal_px#0:|nomal_py#50:|nomal_sw#500:|nomal_sh#200:|poorcondition_px#0:|poorcondition_py#50:|poorcondition_sw#500:|poorcondition_sh#200:|ill_px#0:|ill_py#200:|ill_sw#500:|ill_sh#300:|
raisepoint:|happy_x#290:|happy_y#128:|nomal_x#290:|nomal_y#128:|poorcondition_x#290:|poorcondition_y#128:|ill_x#225:|ill_y#115:|
work:|Type#Work:|Name#文案:|MoneyBase#8:|MoneyLevel#0.5:|Graph#workone:|StrengthFood#3.5:|StrengthDrink#2.5:|Feeling#1.5:|Time#60:|FinishBonus#0.1:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Work:|Name#清屏:|MoneyBase#16:|MoneyLevel#1:|Graph#workclean:|StrengthFood#5:|StrengthDrink#4:|Feeling#2.5:|Time#90:|FinishBonus#0.2:|LevelLimit#10:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Work:|Name#直播:|MoneyBase#30:|MoneyLevel#1.5:|Graph#worktwo:|StrengthFood#4.5:|StrengthDrink#8.5:|Feeling#3:|Time#180:|FinishBonus#0.25:|LevelLimit#20:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Study:|Name#学习:|MoneyBase#30:|MoneyLevel#2:|Graph#study:|StrengthFood#1.5:|StrengthDrink#2:|Feeling#3:|Time#45:|FinishBonus#0.2:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Study:|Name#研究:|MoneyBase#60:|MoneyLevel#3:|Graph#studytwo:|StrengthFood#1.5:|StrengthDrink#3.5:|Feeling#4:|Time#75:|FinishBonus#0.4:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|LevelLimit#15:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Play:|Name#玩游戏:|MoneyBase#10:|MoneyLevel#2:|Graph#playone:|StrengthFood#1:|StrengthDrink#0.5:|Feeling#4:|Time#30:|FinishBonus#0.2:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Play:|Name#删错误:|MoneyBase#10:|MoneyLevel#2:|Graph#removeobject:|StrengthFood#0.5:|StrengthDrink#0.5:|Feeling#4:|Time#60:|FinishBonus#0.25:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|LevelLimit#6:|
work:|Type#Work:|Name#文案:|MoneyBase#8:|MoneyLevel#0.2:|Graph#workone:|StrengthFood#3.5:|StrengthDrink#2.5:|Feeling#1.5:|Time#60:|FinishBonus#0.1:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Work:|Name#清屏:|MoneyBase#16:|MoneyLevel#1.2:|Graph#workclean:|StrengthFood#5:|StrengthDrink#4:|Feeling#2.5:|Time#90:|FinishBonus#0.2:|LevelLimit#10:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Work:|Name#直播:|MoneyBase#30:|MoneyLevel#2.5:|Graph#worktwo:|StrengthFood#4.5:|StrengthDrink#8.5:|Feeling#3:|Time#180:|FinishBonus#0.25:|LevelLimit#20:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Study:|Name#学习:|MoneyBase#40:|MoneyLevel#3.5:|Graph#study:|StrengthFood#1.5:|StrengthDrink#2:|Feeling#3:|Time#45:|FinishBonus#0.2:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Study:|Name#研究:|MoneyBase#78:|MoneyLevel#10:|Graph#studytwo:|StrengthFood#1.5:|StrengthDrink#3.5:|Feeling#4:|Time#75:|FinishBonus#0.4:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|LevelLimit#15:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Play:|Name#玩游戏:|MoneyBase#20:|MoneyLevel#2.4:|Graph#playone:|StrengthFood#1:|StrengthDrink#0.5:|Feeling#4:|Time#30:|FinishBonus#0.2:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|
work:|Type#Play:|Name#删错误:|MoneyBase#20:|MoneyLevel#3:|Graph#removeobject:|StrengthFood#0.5:|StrengthDrink#0.5:|Feeling#4:|Time#60:|FinishBonus#0.25:|BorderBrush#000000:|Background#413d39:|ButtonBackground#322e2b:|ButtonForeground#FFFFFF:|Foreground#ccbdad:|Left#113:|Top#315:|Width#280:|LevelLimit#6:|
move:|graph#climb.left:|LocateType#Left:|LocateLength#145:|TriggerLeft#100:|TriggerTop#200:|TriggerType#65:|CheckType#64:|CheckTop#100:|SpeedY#-10:|Distance#7:|ModeType#14:|
move:|graph#climb.left:|LocateType#Left:|LocateLength#145:|TriggerLeft#100:|TriggerBottom#200:|TriggerType#129:|CheckType#128:|CheckBottom#100:|SpeedY#10:|Distance#7:|ModeType#14:|
move:|graph#climb.right:|LocateType#Right:|LocateLength#185:|TriggerRight#100:|TriggerTop#200:|TriggerType#66:|CheckType#64:|CheckTop#100:|SpeedY#-10:|Distance#7:|ModeType#14:|