Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
QuestDefenseGame.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using UnityEngine;
3
5{
6 public static int lastWave;
7
8 public static int bonus;
9
10 [JsonProperty]
11 public Thing thing;
12
13 public override string IdZone => "instance_arena";
14
15 public override string RefDrama1 => thing.NameSimple;
16
17 public override string RewardSuffix => "Defense";
18
19 public override int FameOnComplete => (lastWave * 8 + difficulty * 10) * (100 + bonus * 5) / 100;
20
21 public override ZoneEventQuest CreateEvent()
22 {
23 return new ZoneEventDefenseGame();
24 }
25
27 {
28 return new ZoneInstanceDefense();
29 }
30
31 public override void OnInit()
32 {
33 thing = ThingGen.CreateFromFilter("thing", 30);
34 }
35
36 public override void OnBeforeComplete()
37 {
38 Debug.Log("QuestDefenseGame: " + lastWave + "/" + bonus);
39 bonusMoney += EClass.rndHalf(lastWave * 400 * (100 + bonus * 5) / 100);
40 }
41
42 public override string GetTextProgress()
43 {
44 return "progressDefenseGame".lang(lastWave.ToString() ?? "");
45 }
46}
string NameSimple
Definition: Card.cs:2015
Definition: EClass.cs:5
static int rndHalf(int a)
Definition: EClass.cs:74
static int lastWave
override string RefDrama1
override string IdZone
override string RewardSuffix
override int FameOnComplete
override string GetTextProgress()
override ZoneInstanceRandomQuest CreateInstance()
override void OnInit()
override ZoneEventQuest CreateEvent()
override void OnBeforeComplete()
int bonusMoney
Definition: Quest.cs:55
int difficulty
Definition: Quest.cs:49
static Thing CreateFromFilter(string id, int lv=-1)
Definition: ThingGen.cs:63
Definition: Thing.cs:8