Elin Decompiled Documentation EA 23.102 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 (int)Mathf.Max((long)a * 100L / (long)(100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(291)) * mod), 1f);
8 }
9
10 public static int Invest(int a, float mod = 2f)
11 {
12 return (int)Mathf.Max((long)a * 100L / (long)(100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(292)) * mod), 1f);
13 }
14
15 public static int Meal(Chara c)
16 {
18 }
19
20 public static int Heal(Chara c)
21 {
23 }
24
25 public static int Picklock(Chara c, Thing t)
26 {
27 return Negotiate(Guild.Fighter.ServicePrice(t.c_lockLv * 65 + 75));
28 }
29
30 public static int Identify(Chara c, bool superior)
31 {
32 return Negotiate(Guild.Fighter.ServicePrice(superior ? 750 : 50));
33 }
34
35 public static int Revive(Chara c)
36 {
37 return Negotiate((c.LV + 5) * (c.LV + 5) * 3);
38 }
39
40 public static int BuySlave(Chara c)
41 {
42 return Negotiate((c.LV + 5) * (c.LV + 5) * 20 + Rand.rndSeed(c.LV * 20, c.uid));
43 }
44
45 public static int SellSlave(Chara c)
46 {
47 return (c.LV + 5) * (c.LV + 5) * 5;
48 }
49
50 public static int Whore(Chara seller, Chara buyer)
51 {
52 int num = Mathf.Max(seller.CHA * 6, 20) * ((!buyer.IsWealthy) ? 1 : 2);
53 int num2 = Mathf.Max(buyer.CHA * 12, 20) * ((!buyer.IsWealthy) ? 1 : 2);
54 Debug.Log("seller:" + num + " buyer:" + num2 + " wealthy:" + buyer.IsWealthy);
55 if (num > num2)
56 {
57 num = num2;
58 }
59 return num;
60 }
61
62 public static int InvestShop(Chara c, Chara tc)
63 {
64 return Invest(Guild.Merchant.InvestPrice(Mathf.Max(tc.c_invest * 700, Mathf.Min(tc.c_invest, 4000) * Mathf.Min(tc.c_invest, 4000) * 80) + 200));
65 }
66
67 public static int InvestZone(Chara c)
68 {
69 return Invest((int)Mathf.Max((long)EClass._zone.development * 50L, Mathf.Min(EClass._zone.development, 80000) * Mathf.Min(EClass._zone.development, 80000) / 4) + 500);
70 }
71}
static int Negotiate(int a, float mod=1.5f)
Definition: CalcMoney.cs:5
static int Invest(int a, float mod=2f)
Definition: CalcMoney.cs:10
static int Picklock(Chara c, Thing t)
Definition: CalcMoney.cs:25
static int SellSlave(Chara c)
Definition: CalcMoney.cs:45
static int Heal(Chara c)
Definition: CalcMoney.cs:20
static int InvestZone(Chara c)
Definition: CalcMoney.cs:67
static int Identify(Chara c, bool superior)
Definition: CalcMoney.cs:30
static int BuySlave(Chara c)
Definition: CalcMoney.cs:40
static int InvestShop(Chara c, Chara tc)
Definition: CalcMoney.cs:62
static int Whore(Chara seller, Chara buyer)
Definition: CalcMoney.cs:50
static int Revive(Chara c)
Definition: CalcMoney.cs:35
static int Meal(Chara c)
Definition: CalcMoney.cs:15
int c_invest
Definition: Card.cs:1229
int c_lockLv
Definition: Card.cs:924
int CHA
Definition: Card.cs:2207
int uid
Definition: Card.cs:118
int Evalue(int ele)
Definition: Card.cs:2431
int LV
Definition: Card.cs:370
Definition: Chara.cs:10
bool IsWealthy
Definition: Chara.cs:878
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
int InvestPrice(int 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