Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
ActItem.cs
Go to the documentation of this file.
1
using
System;
2
3
public
class
ActItem
:
Act
4
{
5
public
Act
_act
;
6
7
public
override
bool
CanPerform
()
8
{
9
return
_act
!=
null
;
10
}
11
12
public
int
BuildAct
(
Chara
c)
13
{
14
_act
=
null
;
15
int
p = 110 - 110 * c.hp / c.
MaxHP
;
16
if
(c.
hp
< c.
MaxHP
* 2 / 3)
17
{
18
foreach
(
Thing
thing
in
c.
things
)
19
{
20
if
(thing.
IsIdentified
)
21
{
22
Action healAction = thing.
trait
.
GetHealAction
(c);
23
if
(healAction !=
null
)
24
{
25
return
ReturnAct
(healAction, p);
26
}
27
}
28
}
29
}
30
return
0;
31
}
32
33
public
int
ReturnAct
(Action a,
int
p)
34
{
35
_act
=
new
DynamicAct
(
"ActItem"
, delegate
36
{
37
a();
38
return
true
;
39
});
40
return
p;
41
}
42
43
public
override
bool
Perform
()
44
{
45
return
_act
.
Perform
(
Act
.
CC
);
46
}
47
}
ActItem
Definition:
ActItem.cs:4
ActItem._act
Act _act
Definition:
ActItem.cs:5
ActItem.ReturnAct
int ReturnAct(Action a, int p)
Definition:
ActItem.cs:33
ActItem.BuildAct
int BuildAct(Chara c)
Definition:
ActItem.cs:12
ActItem.CanPerform
override bool CanPerform()
Definition:
ActItem.cs:7
ActItem.Perform
override bool Perform()
Definition:
ActItem.cs:43
Act
Definition:
ACT.cs:62
Act.Perform
virtual bool Perform()
Definition:
ACT.cs:264
Act.CC
static Chara CC
Definition:
ACT.cs:77
Card.hp
int hp
Definition:
Card.cs:226
Card.trait
Trait trait
Definition:
Card.cs:49
Card.things
ThingContainer things
Definition:
Card.cs:34
Card.IsIdentified
bool IsIdentified
Definition:
Card.cs:2237
Chara
Definition:
Chara.cs:10
Chara.MaxHP
override int MaxHP
Definition:
Chara.cs:693
DynamicAct
Definition:
DynamicAct.cs:4
Thing
Definition:
Thing.cs:8
Trait.GetHealAction
virtual Action GetHealAction(Chara c)
Definition:
Trait.cs:553
Elin
ActItem.cs
Generated by
1.9.6