Elin Decompiled Documentation
EA 23.187 Stable
Loading...
Searching...
No Matches
AI_Mofu.cs
Go to the documentation of this file.
1
using
System.Collections.Generic;
2
using
System.Linq;
3
4
public
class
AI_Mofu
:
AIWork
5
{
6
public
Chara
mofu
;
7
8
public
override
int
MaxRestart
=> 100;
9
10
public
Chara
GetMofu
()
11
{
12
return
EClass
.
_map
.
charas
.Where((
Chara
c) => c.
IsMofuable
).RandomItem();
13
}
14
15
public
override
IEnumerable<Status>
Run
()
16
{
17
yield
return
DoWait
(3 +
EClass
.
rnd
(10));
18
if
(
mofu
==
null
)
19
{
20
mofu
=
GetMofu
();
21
}
22
if
(
mofu
==
null
|| !
mofu
.
ExistsOnMap
)
23
{
24
yield
return
Success
();
25
}
26
if
(
owner
.
Dist
(
mofu
) > 1)
27
{
28
yield
return
DoGoto
(
mofu
);
29
}
30
if
(
mofu
==
null
|| !
mofu
.
ExistsOnMap
)
31
{
32
yield
return
Success
();
33
}
34
owner
.
Cuddle
(
mofu
);
35
if
(
EClass
.
rnd
(222) != 0)
36
{
37
yield
return
Restart
();
38
}
39
}
40
}
AIAct.owner
new Chara owner
Definition:
AIAct.cs:14
AIAct.Status.Success
@ Success
AIAct.DoWait
Status DoWait(int count=1)
Definition:
AIAct.cs:532
AIAct.DoGoto
Status DoGoto(Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
Definition:
AIAct.cs:432
AIAct.Restart
Status Restart()
Definition:
AIAct.cs:237
AIWork
Definition:
AIWork.cs:6
AI_Mofu
Definition:
AI_Mofu.cs:5
AI_Mofu.MaxRestart
override int MaxRestart
Definition:
AI_Mofu.cs:8
AI_Mofu.GetMofu
Chara GetMofu()
Definition:
AI_Mofu.cs:10
AI_Mofu.mofu
Chara mofu
Definition:
AI_Mofu.cs:6
AI_Mofu.Run
override IEnumerable< Status > Run()
Definition:
AI_Mofu.cs:15
Card.ExistsOnMap
bool ExistsOnMap
Definition:
Card.cs:2047
Card.Dist
int Dist(Card c)
Definition:
Card.cs:7315
Chara
Definition:
Chara.cs:10
Chara.Cuddle
void Cuddle(Chara c, bool headpat=false)
Definition:
Chara.cs:5962
Chara.IsMofuable
bool IsMofuable
Definition:
Chara.cs:1081
EClass
Definition:
EClass.cs:5
EClass._map
static Map _map
Definition:
EClass.cs:18
EClass.rnd
static int rnd(long a)
Definition:
EClass.cs:58
Map.charas
List< Chara > charas
Definition:
Map.cs:81
Elin
AI_Mofu.cs
Generated by
1.9.6