Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TraitRecipeCat.cs
Go to the documentation of this file.
2{
3 public string Cat => GetParam(1);
4
5 public override int GetValue()
6 {
7 return base.GetValue() * (100 + (owner.LV - 5) * 10) / 100;
8 }
9
10 public override void OnRead(Chara c)
11 {
12 string randomRecipe = RecipeManager.GetRandomRecipe(owner.LV, Cat, onlyUnlearned: true);
13 if (randomRecipe.IsEmpty())
14 {
16 return;
17 }
18 EClass.player.recipes.Add(randomRecipe);
19 owner.ModNum(-1);
20 }
21
22 public override void SetName(ref string s)
23 {
24 s = s + " Lv." + owner.LV;
25 }
26
27 public override bool CanStackTo(Thing to)
28 {
29 if (base.CanStackTo(to))
30 {
31 return owner.LV == to.LV;
32 }
33 return false;
34 }
35}
void ModNum(int a, bool notify=true)
Definition: Card.cs:3262
int LV
Definition: Card.cs:370
Definition: Chara.cs:10
Definition: EClass.cs:5
static Player player
Definition: EClass.cs:12
Definition: Msg.cs:5
static string SayNothingHappen()
Definition: Msg.cs:96
RecipeManager recipes
Definition: Player.cs:898
void Add(string id, bool showEffect=true)
static string GetRandomRecipe(int lvBonus, string cat=null, bool onlyUnlearned=false)
Definition: Thing.cs:8
override bool CanStackTo(Thing to)
override int GetValue()
override void OnRead(Chara c)
override void SetName(ref string s)
string GetParam(int i, string def=null)
Definition: Trait.cs:515
Card owner
Definition: Trait.cs:26