Elin Decompiled Documentation
EA 23.258 Nightly
Loading...
Searching...
No Matches
ConVampire.cs
Go to the documentation of this file.
1
using
Newtonsoft.Json;
2
using
UnityEngine;
3
4
public
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]
13
private
ElementContainer
ec
=
new
ElementContainer
();
14
15
public
override
int
GetPhase
()
16
{
17
return
0;
18
}
19
20
public
override
ElementContainer
GetElementContainer
()
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;
34
if
(
EClass
.
world
.
date
.
IsNight
)
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);
60
ec
.
SetParent
(
owner
);
61
}
62
63
public
override
void
OnRemoved
()
64
{
65
ec
.
SetParent
();
66
}
67
}
BaseCondition.owner
Chara owner
Definition:
BaseCondition.cs:15
Card.elements
ElementContainerCard elements
Definition:
Card.cs:42
Chara
Definition:
Chara.cs:10
ConVampire
Definition:
ConVampire.cs:5
ConVampire.GetPhase
override int GetPhase()
Definition:
ConVampire.cs:15
ConVampire.ec
ElementContainer ec
Definition:
ConVampire.cs:13
ConVampire.OnRemoved
override void OnRemoved()
Definition:
ConVampire.cs:63
ConVampire.List_Vampire
static int[] List_Vampire
Definition:
ConVampire.cs:6
ConVampire.Tick
override void Tick()
Definition:
ConVampire.cs:25
ConVampire.GetElementContainer
override ElementContainer GetElementContainer()
Definition:
ConVampire.cs:20
ConVampire.SetOwner
override void SetOwner(Chara _owner, bool onDeserialize=false)
Definition:
ConVampire.cs:57
Condition
Definition:
Condition.cs:4
Date.IsNight
bool IsNight
Definition:
Date.cs:112
EClass
Definition:
EClass.cs:6
EClass.world
static World world
Definition:
EClass.cs:41
EClass.rnd
static int rnd(long a)
Definition:
EClass.cs:59
ElementContainer
Definition:
ElementContainer.cs:9
ElementContainer.SetParent
void SetParent(Card c)
Definition:
ElementContainer.cs:535
ElementContainer.Base
int Base(int ele)
Definition:
ElementContainer.cs:260
ElementContainer.Value
int Value(int ele)
Definition:
ElementContainer.cs:166
ElementContainer.ModBase
Element ModBase(int ele, int v)
Definition:
ElementContainer.cs:416
World.date
GameDate date
Definition:
World.cs:6
Elin
ConVampire.cs
Generated by
1.9.6