Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ZonePreEnterBoutWin.cs
Go to the documentation of this file.
1using UnityEngine;
2
4{
5 public Chara target;
6
7 public override void Execute()
8 {
9 if (target == null)
10 {
11 Debug.LogError("exception: target not found:" + target);
12 return;
13 }
14 Thing thing = null;
15 int num = 0;
16 foreach (Thing thing2 in target.things)
17 {
18 if (thing2.isEquipped && !thing2.isGifted && (thing2.GetPrice() > num || thing2.rarity >= Rarity.Artifact))
19 {
20 thing = thing2;
21 num = thing2.GetPrice();
22 }
23 }
24 if (thing == null)
25 {
26 thing = ThingGen.Create("plat").SetNum(EClass.rndHalf(target.LV / 10 + 2));
27 }
28 else
29 {
30 target.RemoveCard(thing);
31 target.EQ_CAT(thing.category.id);
32 }
33 target.SetInt(111, target.GetInt(111) + 1);
34 SE.Play("questComplete");
36 EClass.player.ModFame(EClass.rndHalf(Mathf.Max(10, 10 + (target.LV - EClass.pc.LV) * 3)));
37 }
38}
Rarity
Definition: Rarity.cs:2
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:6449
Rarity rarity
Definition: Card.cs:298
Thing SetNum(int a)
Definition: Card.cs:3242
Point pos
Definition: Card.cs:55
ThingContainer things
Definition: Card.cs:34
bool isGifted
Definition: Card.cs:754
void RemoveCard(Card c)
Definition: Card.cs:2892
int LV
Definition: Card.cs:370
Definition: Chara.cs:10
void EQ_CAT(string s)
Definition: Chara.cs:4589
Definition: EClass.cs:5
static Map _map
Definition: EClass.cs:18
static int rndHalf(int a)
Definition: EClass.cs:74
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
void TrySmoothPick(Cell cell, Thing t, Chara c)
Definition: Map.cs:1791
void ModFame(int a)
Definition: Player.cs:1879
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
bool isEquipped
Definition: Thing.cs:17
override void Execute()