Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ActSummonGuard.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3
4public class ActSummonGuard : Act
5{
7
8 public override bool Perform()
9 {
10 List<Chara> list = EClass._map.charas.Where((Chara c) => c.trait is TraitGuard).ToList();
11 if (list.Count > 0)
12 {
13 Chara chara = list.RandomItem();
14 Act.CC.Say("calledGuard", Act.CC);
15 chara.Teleport(Act.TC.pos.GetNearestPoint(allowBlock: false, allowChara: false));
16 chara.PlaySound("teleport_guard");
17 chara.DoHostileAction(Act.TC);
18 Effect.Get("smoke").Play(chara.pos);
19 Effect.Get("smoke").Play(chara.pos);
20 }
21 return true;
22 }
23}
override bool Perform()
Definition: ACT.cs:62
static Card TC
Definition: ACT.cs:79
static Chara CC
Definition: ACT.cs:77
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:5153
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5404
Point pos
Definition: Card.cs:55
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
Definition: Chara.cs:10
new TraitChara trait
Definition: Chara.cs:488
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:5707
Definition: EClass.cs:5
static Map _map
Definition: EClass.cs:18
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
List< Chara > charas
Definition: Map.cs:81
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false)
Definition: Point.cs:595
static TargetTypeChara Chara
Definition: TargetType.cs:17