Elin Decompiled Documentation EA 23.258 Nightly
Loading...
Searching...
No Matches
ConVampire.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using UnityEngine;
3
4public class ConVampire : Condition
5{
6 public static int[] List_Vampire = new int[13]
7 {
8 70, 72, 71, 77, 74, 75, 76, 73, 60, 61,
9 79, 300, 301
10 };
11
12 [JsonProperty]
14
15 public override int GetPhase()
16 {
17 return 0;
18 }
19
21 {
22 return ec;
23 }
24
25 public override void Tick()
26 {
27 if (EClass.rnd(2) != 0)
28 {
29 return;
30 }
31 int num = List_Vampire.RandomItem();
32 int num2 = ec.Value(num);
33 int num3 = owner.elements.Base(num) / 7 + 5;
35 {
36 switch (num)
37 {
38 case 60:
39 case 61:
40 num3 = 20;
41 break;
42 case 79:
43 num3 = 20;
44 break;
45 }
46 if (num2 < num3 && (float)EClass.rnd(100) >= 99f * (float)num2 / (float)num3)
47 {
48 ec.ModBase(num, Mathf.Clamp(num3 / 10, 1, num3 - num2));
49 }
50 }
51 else if (num2 > 0)
52 {
53 ec.ModBase(num, -Mathf.Clamp(num3 / 4, 1, num2));
54 }
55 }
56
57 public override void SetOwner(Chara _owner, bool onDeserialize = false)
58 {
59 base.SetOwner(_owner);
61 }
62
63 public override void OnRemoved()
64 {
65 ec.SetParent();
66 }
67}
ElementContainerCard elements
Definition: Card.cs:42
Definition: Chara.cs:10
override int GetPhase()
Definition: ConVampire.cs:15
ElementContainer ec
Definition: ConVampire.cs:13
override void OnRemoved()
Definition: ConVampire.cs:63
static int[] List_Vampire
Definition: ConVampire.cs:6
override void Tick()
Definition: ConVampire.cs:25
override ElementContainer GetElementContainer()
Definition: ConVampire.cs:20
override void SetOwner(Chara _owner, bool onDeserialize=false)
Definition: ConVampire.cs:57
bool IsNight
Definition: Date.cs:112
Definition: EClass.cs:6
static World world
Definition: EClass.cs:41
static int rnd(long a)
Definition: EClass.cs:59
void SetParent(Card c)
int Value(int ele)
Element ModBase(int ele, int v)
GameDate date
Definition: World.cs:6