Elin Decompiled Documentation EA 23.130 Nightly
Loading...
Searching...
No Matches
CalcMoney.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class CalcMoney : EClass
4{
5 public static int Negotiate(int a, float mod = 1.5f)
6 {
7 return Mathf.Max((int)((float)((long)a * 100L) / (100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(291)) * mod)), 1);
8 }
9
10 public static int Invest(long a, float mod = 2f)
11 {
12 long num = a * 100 / (long)(100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(292)) * mod);
13 if (num >= 0 && num < 100000000)
14 {
15 return (int)num;
16 }
17 return 100000000;
18 }
19
20 public static int Meal(Chara c)
21 {
23 }
24
25 public static int Heal(Chara c)
26 {
28 }
29
30 public static int Picklock(Chara c, Thing t)
31 {
32 return Negotiate(Guild.Fighter.ServicePrice(t.c_lockLv * 65 + 75));
33 }
34
35 public static int Identify(Chara c, bool superior)
36 {
37 return Negotiate(Guild.Fighter.ServicePrice(superior ? 750 : 50));
38 }
39
40 public static int Revive(Chara c)
41 {
42 return Negotiate((c.LV + 5) * (c.LV + 5) * 3);
43 }
44
45 public static int BuySlave(Chara c)
46 {
47 return Negotiate((c.LV + 5) * (c.LV + 5) * 20 + Rand.rndSeed(c.LV * 20, c.uid));
48 }
49
50 public static int SellSlave(Chara c)
51 {
52 return (c.LV + 5) * (c.LV + 5) * 5;
53 }
54
55 public static int Whore(Chara seller, Chara buyer)
56 {
57 int num = Mathf.Max(seller.CHA * 6, 20) * ((!buyer.IsWealthy) ? 1 : 2);
58 int num2 = Mathf.Max(buyer.CHA * 12, 20) * ((!buyer.IsWealthy) ? 1 : 2);
59 Debug.Log("seller:" + num + " buyer:" + num2 + " wealthy:" + buyer.IsWealthy);
60 if (num > num2)
61 {
62 num = num2;
63 }
64 return num;
65 }
66
67 public static int InvestShop(Chara c, Chara tc)
68 {
69 long a = Guild.Merchant.InvestPrice(tc.c_invest * 700);
70 return Mathf.Max(b: Invest(Guild.Merchant.InvestPrice(tc.c_invest * tc.c_invest * 80 + 200)), a: Invest(a));
71 }
72
73 public static int InvestZone(Chara c)
74 {
75 long a = EClass._zone.development * 50;
76 return Mathf.Max(b: Invest((long)EClass._zone.development * (long)EClass._zone.development / 4 + 500), a: Invest(a));
77 }
78}
static int Negotiate(int a, float mod=1.5f)
Definition: CalcMoney.cs:5
static int Picklock(Chara c, Thing t)
Definition: CalcMoney.cs:30
static int Invest(long a, float mod=2f)
Definition: CalcMoney.cs:10
static int SellSlave(Chara c)
Definition: CalcMoney.cs:50
static int Heal(Chara c)
Definition: CalcMoney.cs:25
static int InvestZone(Chara c)
Definition: CalcMoney.cs:73
static int Identify(Chara c, bool superior)
Definition: CalcMoney.cs:35
static int BuySlave(Chara c)
Definition: CalcMoney.cs:45
static int InvestShop(Chara c, Chara tc)
Definition: CalcMoney.cs:67
static int Whore(Chara seller, Chara buyer)
Definition: CalcMoney.cs:55
static int Revive(Chara c)
Definition: CalcMoney.cs:40
static int Meal(Chara c)
Definition: CalcMoney.cs:20
int c_invest
Definition: Card.cs:1253
int c_lockLv
Definition: Card.cs:924
int CHA
Definition: Card.cs:2247
int uid
Definition: Card.cs:118
int Evalue(int ele)
Definition: Card.cs:2471
int LV
Definition: Card.cs:370
Definition: Chara.cs:10
bool IsWealthy
Definition: Chara.cs:883
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static Chara pc
Definition: EClass.cs:14
int ServicePrice(int a)
Definition: GuildFighter.cs:17
long InvestPrice(long a)
Definition: GuildMerchant.cs:7
Definition: Guild.cs:2
static GuildMerchant Merchant
Definition: Guild.cs:29
static GuildFighter Fighter
Definition: Guild.cs:23
Definition: Rand.cs:4
static int rndSeed(int a, int seed)
Definition: Rand.cs:29
int development
Definition: Spatial.cs:238
Definition: Thing.cs:8