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